/* ══════════════════════════════════════════════════════════════
   商标管理控制台 — 登录页 Premium Design
   布局: 裂分式 (左品牌 / 右表单)  + 移动端纵向折叠
   ══════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* ── 登录页面容器 ── */
.auth-shell {
  display: flex;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0b1120;
  overflow: hidden;
}

/* ── 左侧品牌区 ── */
.auth-hero {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
  padding: 60px 48px;
  overflow: hidden;
}

/* 背景几何图案 */
.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(5, 150, 105, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* 网格线装饰 */
.auth-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* 浮动光点 */
.auth-dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}
.auth-dot-1 { width: 6px; height: 6px; background: rgba(37, 99, 235, 0.5); top: 25%; left: 20%; animation-delay: 0s; }
.auth-dot-2 { width: 4px; height: 4px; background: rgba(124, 58, 237, 0.4); top: 60%; left: 75%; animation-delay: -2s; }
.auth-dot-3 { width: 5px; height: 5px; background: rgba(5, 150, 105, 0.35); top: 40%; left: 50%; animation-delay: -4s; }
.auth-dot-4 { width: 3px; height: 3px; background: rgba(37, 99, 235, 0.3); top: 75%; left: 35%; animation-delay: -1s; }
.auth-dot-5 { width: 5px; height: 5px; background: rgba(245, 158, 11, 0.3); top: 15%; left: 60%; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50% { transform: translateY(-20px) scale(1.3); opacity: 0.8; }
}

/* 品牌内容居中卡片 */
.auth-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 420px;
}

.auth-hero-icon {
  display: inline-flex;
  margin-bottom: 28px;
  position: relative;
}
.auth-hero-icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(124, 58, 237, 0.15));
  filter: blur(16px);
  z-index: -1;
}

.auth-hero-logo {
  width: 280px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.auth-hero-title {
  font-size: 28px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.auth-hero-title span {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-hero-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto;
}

.auth-hero-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 40px;
}
.auth-hero-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #94a3b8;
}
.auth-hero-feature-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-hero-feature-icon svg { opacity: 0.7; }

/* ── 右侧表单区 ── */
.auth-form-section {
  flex: 1 1 52%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  padding: 60px 40px;
  position: relative;
}

.auth-form-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 44px 40px 40px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.06),
    0 20px 64px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.3s ease;
}
.auth-form-card:focus-within {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(37, 99, 235, 0.08),
    0 20px 64px rgba(37, 99, 235, 0.03);
}

.auth-mobile-brand {
  display: none;
  text-align: center;
  margin-bottom: 28px;
}
.auth-mobile-logo-img {
  width: 160px;
  height: auto;
  margin: 0 auto 12px;
  display: block;
}
.auth-mobile-logo { margin-bottom: 12px; }
.auth-mobile-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.auth-form-heading {
  margin-bottom: 28px;
}
.auth-form-heading h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.auth-form-heading p {
  font-size: 13px;
  color: #94a3b8;
}

/* ── 输入框 ── */
.auth-field {
  margin-bottom: 18px;
}
.auth-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.auth-field-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.auth-field-box:focus-within {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.06);
}
.auth-field-box:focus-within .auth-field-icon svg { color: #2563eb; }

.auth-field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  flex-shrink: 0;
  color: #94a3b8;
  transition: color 0.2s;
}

.auth-field-box input {
  flex: 1;
  padding: 12px 8px 12px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #0f172a;
  font-family: inherit;
  outline: none;
  min-width: 0;
}
.auth-field-box input::placeholder { color: #cbd5e1; }

.auth-eye {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 16px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.auth-eye:hover { color: #475569; }

/* 密码强度指示 (注册页) */
.auth-pw-strength { display: flex; gap: 4px; margin-top: 8px; }
.auth-pw-bar {
  height: 3px; flex: 1; border-radius: 2px;
  background: #e2e8f0; transition: background 0.3s;
}
.auth-pw-bar.low   { background: #ef4444; }
.auth-pw-bar.med   { background: #f59e0b; }
.auth-pw-bar.high  { background: #10b981; }

/* ── 错误消息 ── */
.auth-error {
  font-size: 12px;
  color: #ef4444;
  min-height: 20px;
  margin-bottom: 6px;
  display: none;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

/* ── 提交按钮 ── */
.auth-btn {
  width: 100%;
  padding: 13px;
  margin-top: 2px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25), 0 0 0 0 rgba(37, 99, 235, 0);
  position: relative;
  overflow: hidden;
}
.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35), 0 0 0 4px rgba(37, 99, 235, 0.08);
}
.auth-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 加载动画 */
.auth-btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 切换链接 ── */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: #94a3b8;
}
.auth-switch a {
  color: #2563eb;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-switch a:hover { color: #1d4ed8; }

/* ── 页脚 ── */
.auth-footer {
  text-align: center;
  margin-top: 32px;
  font-size: 11px;
  color: #cbd5e1;
}

/* ═══════════════════════════════════════════════════════
   响应式
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .auth-shell { flex-direction: column; }
  .auth-hero {
    flex: none;
    padding: 40px 24px 24px;
    min-height: auto;
  }
  .auth-hero-title { font-size: 22px; }
  .auth-hero-features { display: none; }
  .auth-hero-desc { display: none; }
  .auth-hero-icon { margin-bottom: 0; }
  .auth-hero-icon svg { width: 32px; height: 32px; }

  .auth-form-section {
    flex: 1;
    padding: 20px 20px 40px;
    align-items: flex-start;
  }
  .auth-form-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
    padding: 32px 24px;
    border-radius: 16px;
  }
  .auth-mobile-brand { display: block; }
  .auth-form-heading { display: none; }
}

@media (max-width: 420px) {
  .auth-form-card { padding: 28px 20px; }
}

/* ── 从 auth.js 注入的额外元素 ── */
.reg-confirm-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: -12px;
  margin-bottom: 16px;
}
