/* ═══════════════════════════════════════════════════════
   海丝管理后台 · 登录页样式  (login.css)
   风格：深海漆器 — 深蓝黑背景 + 居中暗棕漆器卡片 + 金色点缀
   ═══════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", -apple-system, sans-serif;
}

/* ── 全屏容器 ── */
.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: hidden;

  /* 深邃背景：深蓝黑多层渐变 */
  background:
    radial-gradient(ellipse 85% 55% at 18% 12%, rgba(10, 55, 95, 0.50) 0%, transparent 65%),
    radial-gradient(ellipse 65% 45% at 82% 88%, rgba(90, 42, 8, 0.28) 0%, transparent 60%),
    linear-gradient(155deg, #050D1A 0%, #081220 50%, #040C14 100%);
}

/* 页面颗粒纹理叠层 */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 320px 320px;
}

/* ── 环境光晕（2个浮动光球） ── */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(100px);
}

.bg-glow-1 {
  width: 720px;
  height: 520px;
  top: -200px;
  left: -220px;
  background: radial-gradient(ellipse, rgba(10, 60, 100, 0.42) 0%, transparent 70%);
  animation: glow-drift-1 16s ease-in-out infinite;
}

.bg-glow-2 {
  width: 600px;
  height: 420px;
  bottom: -130px;
  right: -160px;
  background: radial-gradient(ellipse, rgba(100, 48, 8, 0.32) 0%, transparent 70%);
  animation: glow-drift-2 20s ease-in-out infinite;
}

@keyframes glow-drift-1 {
  0%, 100% { transform: translate(0, 0); }
  40%       { transform: translate(45px, -28px); }
  70%       { transform: translate(-18px, 22px); }
}

@keyframes glow-drift-2 {
  0%, 100% { transform: translate(0, 0); }
  35%       { transform: translate(-32px, 22px); }
  65%       { transform: translate(28px, -18px); }
}

/* ── 登录卡片 ── */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 42px 44px 50px;

  /* 深棕漆器质感：微木纹叠层 + 深棕渐变底 */
  background:
    repeating-linear-gradient(
      158deg,
      rgba(255, 215, 100, 0.010) 0px,
      transparent 2px,
      transparent 9px,
      rgba(255, 215, 100, 0.005) 11px
    ),
    linear-gradient(148deg, rgba(46, 20, 6, 0.97) 0%, rgba(22, 9, 2, 0.99) 100%);

  backdrop-filter: blur(30px) saturate(1.4);
  -webkit-backdrop-filter: blur(30px) saturate(1.4);

  /* 金色边框：顶部最亮，两侧次之，底部最淡 */
  border-top:    2px solid rgba(212, 175, 55, 0.58);
  border-left:   1px solid rgba(212, 175, 55, 0.16);
  border-right:  1px solid rgba(212, 175, 55, 0.11);
  border-bottom: 1px solid rgba(212, 175, 55, 0.07);
  border-radius: 14px;

  /* 三层阴影：内发光 + 环境光 + 大气扩散 */
  box-shadow:
    inset 0  1px 0 rgba(212, 175, 55, 0.20),
    inset 0 -1px 0 rgba(0, 0, 0, 0.38),
    0  2px  8px rgba(0, 0, 0, 0.55),
    0 18px 52px rgba(0, 0, 0, 0.68),
    0  0  120px rgba(0, 0, 0, 0.48);

  animation: card-in 0.65s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

/* 左上角 L 形金色装饰角 */
.login-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -1px;
  width: 26px;
  height: 26px;
  border-top:  2px solid rgba(212, 175, 55, 0.90);
  border-left: 2px solid rgba(212, 175, 55, 0.72);
  border-radius: 14px 0 0 0;
  pointer-events: none;
}

/* 右下角 L 形金色装饰角 */
.login-card::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right:  -1px;
  width: 26px;
  height: 26px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.48);
  border-right:  1px solid rgba(212, 175, 55, 0.36);
  border-radius: 0 0 14px 0;
  pointer-events: none;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)     scale(1); }
}

/* ── 品牌块 ── */
.brand-block {
  text-align: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.brand-text-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

/* ── Logo 图标（严格遵循 skill 规范） ── */
.logo-icon {
  width: 58px;
  height: 58px;
  background: radial-gradient(circle at 30% 30%, #FFE5A0 0%, #D4AF37 50%, #B8860B 100%);
  border-radius: 12px;
  position: relative;
  box-shadow:
    0 4px 14px rgba(212, 175, 55, 0.48),
    inset 0  1px 2px rgba(255, 255, 255, 0.32),
    inset -1px -1px 3px rgba(139, 69, 19, 0.18);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(212, 175, 55, 0.48); }
  50%       { box-shadow: 0 6px 24px rgba(212, 175, 55, 0.72); }
}

.logo-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.18) 0%, transparent 45%);
  border-radius: 12px;
  z-index: 1;
}

.logo-icon::after {
  content: 'HS';
  position: absolute;
  z-index: 2;
  letter-spacing: -2px;
  font-size: 23px;
  font-weight: 900;
  font-family: 'Arial Black', 'Microsoft YaHei', sans-serif;
  color: rgba(139, 69, 19, 0.95);
  font-style: italic;
  transform: skewX(-5deg);
  text-shadow:
    -1px -1px 0 rgba(255, 255, 255, 0.70),
     1px  1px 0 rgba(139,  69, 19, 0.40),
     2px  2px 1px rgba(139, 69, 19, 0.35),
     3px  3px 2px rgba(139, 69, 19, 0.25),
     4px  4px 4px rgba(139, 69, 19, 0.15),
     0    0   8px rgba(255, 229, 160, 0.40);
}

/* ── 品牌名 & 口号 ── */
.brand-name {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #C8941E 0%, #FFD700 50%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 4px;
  line-height: 1.15;
}

.logo-slogan {
  font-size: 10px;
  color: rgba(212, 175, 55, 0.55);
  letter-spacing: 2px;
  font-weight: 400;
  line-height: 1;
}

.brand-subtitle {
  font-size: 11px;
  color: rgba(139, 111, 71, 0.48);
  letter-spacing: 2.5px;
  margin-top: 4px;
}

/* ── 金色分隔线 ── */
.brand-divider {
  height: 1px;
  margin: 28px 0 30px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.22) 18%,
    rgba(212, 175, 55, 0.58) 50%,
    rgba(212, 175, 55, 0.22) 82%,
    transparent 100%
  );
}

/* ── 表单字段 ── */
.layui-form-item {
  margin-bottom: 18px;
}

.layui-form-item .layui-input-block {
  margin-left: 0;
}

.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(139, 111, 71, 0.52);
  font-size: 15px;
  z-index: 2;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color var(--duration-base, 220ms) ease;
}

.field-wrap:focus-within .field-icon {
  color: rgba(212, 175, 55, 0.80);
}

/* ── 输入框（暗色磨砂玻璃底） ── */
.login-input.layui-input {
  height: 46px !important;
  padding-left: 42px !important;
  padding-right: 14px !important;
  background: rgba(255, 255, 255, 0.042) !important;
  border: 1px solid rgba(212, 175, 55, 0.18) !important;
  border-radius: 8px !important;
  color: rgba(245, 240, 220, 0.88) !important;
  font-size: 14px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0.3px;
  caret-color: rgba(212, 175, 55, 0.80);
  outline: none;
  transition:
    border-color var(--duration-base, 220ms) ease,
    box-shadow   var(--duration-base, 220ms) ease,
    background   var(--duration-base, 220ms) ease;
}

.login-input.layui-input::placeholder {
  color: rgba(139, 111, 71, 0.38);
  font-size: 13px;
  letter-spacing: 0;
}

.login-input.layui-input:focus {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(212, 175, 55, 0.46) !important;
  box-shadow:
    0 0 0 3px rgba(212, 175, 55, 0.10),
    inset 0 1px 4px rgba(0, 0, 0, 0.26) !important;
  outline: none;
}

/* ── 登录按钮 ── */
.login-btn-wrap {
  margin-top: 28px;
  margin-bottom: 0;
}

.layui-btn.layui-btn-fluid.login-btn {
  display: block;
  width: 100%;
  height: 48px !important;
  background: linear-gradient(
    135deg,
    #B8102A 0%,
    #C8102E 45%,
    #A00020 100%
  ) !important;
  border: none !important;
  border-top: 1px solid rgba(212, 175, 55, 0.26) !important;
  border-radius: 8px !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 8px;
  color: rgba(255, 229, 150, 0.92) !important;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(180, 10, 30, 0.32),
    inset 0 1px 0 rgba(255, 215, 0, 0.10);
  transition:
    transform   var(--duration-fast, 120ms) ease,
    box-shadow  var(--duration-base, 220ms) ease,
    opacity     var(--duration-base, 220ms) ease;
}

/* 金属光泽横扫 */
.layui-btn.layui-btn-fluid.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 220, 100, 0.22) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  transition: left 0.58s ease;
}

.layui-btn.layui-btn-fluid.login-btn:hover::before {
  left: 150%;
}

.layui-btn.layui-btn-fluid.login-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 7px 28px rgba(180, 10, 30, 0.52),
    0 0  22px rgba(212, 175, 55, 0.13),
    inset 0 1px 0 rgba(255, 215, 0, 0.10) !important;
}

.layui-btn.layui-btn-fluid.login-btn:active {
  transform: translateY(0);
  opacity: 0.88 !important;
  box-shadow:
    0 2px 12px rgba(180, 10, 30, 0.30),
    inset 0 2px 5px rgba(0, 0, 0, 0.22) !important;
}

.layui-btn.layui-btn-fluid.login-btn.layui-btn-disabled {
  opacity: 0.52 !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.layui-btn.layui-btn-fluid.login-btn.layui-btn-disabled::before {
  display: none;
}

/* ── 页脚 ── */
.login-footer {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  font-size: 11px;
  color: rgba(139, 111, 71, 0.36);
  letter-spacing: 2px;
  text-align: center;
  animation: card-in 0.65s cubic-bezier(0.2, 0.8, 0.3, 1) 0.12s both;
}

/* ── 移动端适配 ── */
@media (max-width: 480px) {
  .login-card {
    padding: 32px 28px 40px;
    border-radius: 12px;
  }

  .login-card::before { border-radius: 12px 0 0 0; }
  .login-card::after  { border-radius: 0 0 12px 0; }

  .brand-name    { font-size: 22px; }
  .logo-icon     { width: 50px; height: 50px; }
  .logo-icon::after { font-size: 20px; }
  .brand-logo    { gap: 12px; }
  .login-btn-wrap { margin-top: 22px; }
}

/* ── 减少动效（无障碍） ── */
@media (prefers-reduced-motion: reduce) {
  .logo-icon,
  .bg-glow,
  .login-card,
  .login-footer { animation: none !important; }

  .layui-btn.layui-btn-fluid.login-btn::before { display: none; }
}
