/* ========== 今喜初 · 登录页（左右分栏，参考校园平台排版） ========== */
html.login-root,
html.login-root body.login-page {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body.login-page.admin-font-large,
body.login-page.admin-font-xlarge,
body.login-page.admin-font-care {
  overflow: auto;
}

.login-page {
  min-height: 100%;
  height: 100%;
  margin: 0;
  background: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-page .login-shell {
  min-height: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-page .login-brand,
.login-page .login-panel {
  min-width: 0;
}

/* ---- 左侧品牌（浅色 + 居中） ---- */
.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 5vw, 64px);
  color: #1c1917;
  background:
    radial-gradient(circle at 18% 22%, rgba(229, 57, 53, 0.08), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(229, 57, 53, 0.06), transparent 38%),
    linear-gradient(180deg, #fff8f7 0%, #fff1f0 48%, #ffeceb 100%);
  overflow: hidden;
}

.brand-watermark {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.brand-watermark-1 {
  width: clamp(220px, 28vw, 360px);
  height: clamp(220px, 28vw, 360px);
  top: 8%;
  left: -6%;
  background: rgba(229, 57, 53, 0.06);
}

.brand-watermark-2 {
  width: clamp(160px, 20vw, 260px);
  height: clamp(160px, 20vw, 260px);
  bottom: 18%;
  right: 6%;
  background: rgba(229, 57, 53, 0.05);
}

.brand-watermark-3 {
  width: clamp(100px, 12vw, 160px);
  height: clamp(100px, 12vw, 160px);
  top: 52%;
  left: 12%;
  border: 1px solid rgba(229, 57, 53, 0.1);
  background: rgba(255, 255, 255, 0.35);
}

.brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: login-fade-in 0.6s ease both;
}

.brand-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 28px;
  border-radius: 18px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(229, 57, 53, 0.12);
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

.brand-title {
  margin: 0 0 10px;
  font-size: clamp(32px, 3.6vw, 42px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: #c62828;
}

.brand-subtitle {
  margin: 0;
  font-size: 15px;
  color: #78716c;
  letter-spacing: 0.04em;
}

.brand-features {
  position: absolute;
  left: 50%;
  bottom: clamp(72px, 10vh, 96px);
  transform: translateX(-50%);
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(28px, 5vw, 56px);
}

.brand-features li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 72px;
  font-size: 13px;
  font-weight: 500;
  color: #57534e;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 57, 53, 0.1);
  color: #e53935;
  font-size: 20px;
}

.brand-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(24px, 4vh, 36px);
  z-index: 1;
  text-align: center;
  font-size: 12px;
  color: #a8a29e;
}

/* ---- 右侧表单（白底 + 斜纹网格） ---- */
.login-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 56px);
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
}

.panel-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(135deg, rgba(229, 57, 53, 0.04) 1px, transparent 1px),
    linear-gradient(45deg, rgba(229, 57, 53, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 50%, #000 30%, transparent 85%);
}

.login-box {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(400px, 100%);
  animation: login-fade-in 0.6s 0.08s ease both;
}

.login-settings-entry {
  position: absolute;
  top: -8px;
  right: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #f0ece8;
  border-radius: 999px;
  background: #fff;
  color: #78716c;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.login-settings-entry .layui-icon {
  font-size: 16px;
  color: #e53935;
}

.login-settings-entry:hover {
  color: #e53935;
  border-color: #ffcdd2;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.login-alert .layui-icon {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 18px;
}

.login-alert-error,
.login-alert-danger {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.login-alert-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.login-alert-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.form-header {
  margin-bottom: 36px;
}

.form-header h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 700;
  color: #1c1917;
  letter-spacing: 0.02em;
}

.form-header p {
  margin: 0;
  font-size: 14px;
  color: #a8a29e;
}

.form-field {
  margin-bottom: 22px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #57534e;
}

.field-box {
  position: relative;
}

.login-form .field-box > .layui-icon:first-child {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: #a8a29e;
  z-index: 2;
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-form .field-box:focus-within > .layui-icon:first-child {
  color: #e53935;
}

.field-box .layui-input {
  height: 50px;
  padding: 0 48px;
  border-radius: 12px;
  border: 1.5px solid #e7e5e4;
  background: #fafafa;
  font-size: 15px;
  color: #1c1917;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-box .layui-input::placeholder {
  color: #d6d3d1;
}

.field-box .layui-input:focus {
  border-color: #e53935 !important;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.08) !important;
}

.field-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: #a8a29e;
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: color 0.2s, background 0.2s;
}

.field-toggle:hover {
  color: #e53935;
  background: #fff5f5;
}

.form-submit {
  width: 100%;
  height: 52px;
  line-height: 52px;
  margin-top: 8px;
  border: none !important;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff !important;
  background: linear-gradient(180deg, #ef5350 0%, #e53935 48%, #c62828 100%) !important;
  box-shadow: 0 10px 24px rgba(229, 57, 53, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(229, 57, 53, 0.3);
}

.form-submit.is-loading {
  opacity: 0.85;
  pointer-events: none;
}

.form-demo {
  margin-top: 28px;
  text-align: center;
}

.form-demo-label {
  margin: 0 0 12px;
  font-size: 13px;
  color: #a8a29e;
}

.form-demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: #57534e;
  background: #fafafa;
  border: 1px solid #f0ece8;
}

.form-demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53935;
  flex-shrink: 0;
}

.form-footer {
  margin: 24px 0 0;
  text-align: center;
  font-size: 12px;
  color: #d6d3d1;
}

@keyframes login-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 视口较窄：上下堆叠 */
@media (max-width: 960px) {
  .login-page .login-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100%;
  }

  html.login-root,
  html.login-root body.login-page {
    overflow: auto;
  }

  .login-brand {
    min-height: auto;
    padding: 40px 28px 100px;
  }

  .brand-features {
    position: static;
    transform: none;
    margin-top: 36px;
    gap: 24px;
  }

  .brand-footer {
    position: static;
    margin-top: 28px;
  }

  .login-panel {
    padding: 40px 28px 48px;
  }

  .login-settings-entry {
    top: 0;
  }
}

@media (max-width: 480px) {
  .login-brand {
    padding: 32px 22px 88px;
  }

  .brand-title {
    font-size: 28px;
  }

  .brand-logo {
    width: 60px;
    height: 60px;
  }

  .brand-features {
    gap: 16px;
  }

  .brand-features li {
    min-width: 64px;
    font-size: 12px;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .login-panel {
    padding: 32px 20px 40px;
  }

  .form-header h2 {
    font-size: 26px;
  }
}
