/*
 * cg-login.css —— 管理后台登录页
 * 版式：深蓝渐变 + 粒子连线背景，左侧品牌图 + 右侧表单卡片（还原客户目标系统登录页）
 */

.cg-login-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(47, 123, 246, 0.26), transparent 42%),
    radial-gradient(circle at 84% 88%, rgba(212, 175, 55, 0.13), transparent 40%),
    linear-gradient(135deg, #0A1545 0%, #0D1B4C 48%, #132A5E 100%);
  background-color: #0A1545;
  background-attachment: fixed;
}

#cgParticleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  opacity: 0.8;
  pointer-events: none;
}

.cg-login-stage {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 44px 24px 72px;
}

.cg-login-card {
  position: relative;
  z-index: 2;
  display: flex;
  width: 1000px;
  max-width: 100%;
  min-height: 480px;
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(2, 8, 32, 0.55), 0 4px 16px rgba(2, 8, 32, 0.35);
  animation: cg-card-in 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes cg-card-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cg-login-visual {
  position: relative;
  width: 55%;
  overflow: hidden;
  background: linear-gradient(90deg, #F0B153 0%, #E39A3F 55%, #D3863B 100%);
}

.cg-login-visual img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cg-login-panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 44px 52px;
  background: #fff;
}

.cg-login-logo {
  margin-bottom: 32px;
  text-align: center;
}

.cg-login-logo-img {
  display: block;
  width: auto;
  max-width: 200px;
  max-height: 72px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 8px 22px rgba(201, 161, 78, 0.18);
}

.cg-login-logo-title {
  margin-top: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 3px;
  color: #C9A14E;
  background: linear-gradient(180deg, #E9C877 0%, #D4A94E 55%, #B9862F 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cg-login-logo-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  font-size: 12px;
  color: #97A0BE;
  letter-spacing: 4px;
  text-indent: 6px;
}

.cg-login-logo-sub::before,
.cg-login-logo-sub::after {
  content: "";
  width: 28px;
  height: 1px;
  margin: 0 14px;
}

.cg-login-logo-sub::before {
  background: linear-gradient(90deg, transparent, #D9C08A);
}

.cg-login-logo-sub::after {
  background: linear-gradient(90deg, #D9C08A, transparent);
}

.cg-field {
  position: relative;
  margin-bottom: 20px;
}

.cg-login-form .layui-input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 0 44px;
  font-size: 14px;
  color: #333;
  border: 1px solid #DCDFE6;
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cg-login-form .layui-input:hover {
  border-color: #C0C6D4;
}

.cg-login-form .layui-input:focus {
  border-color: #2F7BF6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 123, 246, 0.12);
}

.cg-login-form .layui-input::placeholder {
  color: #B8BFCE;
}

.cg-login-form .layui-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
}

.cg-field-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  font-size: 18px;
  color: #9AA3BE;
  pointer-events: none;
  transform: translateY(-50%);
}

.cg-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  color: #B0B7C9;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
  transform: translateY(-50%);
}

.cg-eye:hover,
.cg-eye.cg-eye-on {
  color: #2F7BF6;
}

.cg-captcha-row {
  display: flex;
  align-items: flex-start;
}

.cg-captcha-field {
  flex: 1;
}

.cg-captcha-img {
  box-sizing: border-box;
  width: 116px;
  height: 46px;
  margin-left: 12px;
  cursor: pointer;
  border: 1px solid #E4E7F0;
  border-radius: 6px;
}

.cg-captcha-img:hover {
  border-color: #C0C6D4;
}

.cg-remember {
  margin: 16px 0 24px;
}

.cg-login-panel .layui-form-checkbox[lay-skin="primary"] > i {
  border-color: #C6CCDA !important;
}

.cg-login-panel .layui-form-checkbox[lay-skin="primary"]:hover > i {
  border-color: #2F7BF6 !important;
}

.cg-login-panel .layui-form-checked[lay-skin="primary"] > i {
  background-color: #2F7BF6 !important;
  border-color: #2F7BF6 !important;
}

.cg-login-panel .layui-form-checkbox > span {
  font-size: 13px;
  color: #8890AC;
}

.cg-login-form .layui-btn {
  width: 100%;
  height: 46px;
  line-height: 46px;
  padding: 0;
  font-size: 16px;
  letter-spacing: 12px;
  text-indent: 12px;
  color: #fff;
  border: none;
  border-radius: 6px;
  background: linear-gradient(90deg, #1CA7F2 0%, #0D84E3 100%);
  box-shadow: 0 10px 24px rgba(13, 132, 227, 0.32);
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}

.cg-login-form .layui-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(13, 132, 227, 0.4);
}

.cg-login-form .layui-btn:active {
  filter: brightness(0.98);
  transform: translateY(0);
}

.cg-links {
  min-height: 20px;
  margin-top: 18px;
  text-align: center;
}

.cg-link {
  font-size: 13px;
  color: #5E87D8;
}

.cg-link:hover {
  color: #2F6BE0;
}

.cg-login-footer {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  z-index: 2;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 1px;
  text-align: center;
}

.cg-login-footer a {
  color: rgba(255, 255, 255, 0.38);
}

.cg-login-footer a:hover {
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 900px) {
  .cg-login-visual {
    display: none;
  }

  .cg-login-card {
    width: 420px;
    min-height: 0;
  }

  .cg-login-panel {
    padding: 42px 36px;
  }
}

@media (max-width: 500px) {
  .cg-login-stage {
    padding: 24px 16px 64px;
  }

  .cg-login-card {
    width: 100%;
  }

  .cg-login-panel {
    padding: 36px 26px;
  }

  .cg-login-logo-title {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cg-login-card {
    animation: none;
  }
}
