/* ============ 登录页（/login.html） ============ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f0f2f5;
  --shadow-lg: 0 12px 40px rgba(20, 30, 50, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image: radial-gradient(1200px 400px at 50% -10%, #e6efff 0%, rgba(245, 247, 250, 0) 70%);
}

.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0 18px 32px; }

/* 顶部 */
.login-top {
  width: 100%;
  max-width: 1080px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.login-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: .15s;
}
.login-back:hover { background: #eef2f8; color: var(--text); }
.login-top-hint { font-size: 12px; color: var(--text-3); }

/* 卡片 */
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 34px 30px 26px;
  margin-top: 22px;
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
  overflow: hidden;
}
.login-logo.logo-image { background: none; box-shadow: none; }
.login-logo.logo-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 15px; }
.login-title { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.login-sub { font-size: 12.5px; color: var(--text-2); margin-top: 5px; }

.login-loading { text-align: center; font-size: 12.5px; color: var(--text-3); padding: 26px 0; }

/* 主按钮 */
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  border-radius: 11px;
  border: none;
  font-size: 14.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: .15s;
}
.login-btn.wecom { background: #07c160; color: #fff; }
.login-btn.wecom:hover { background: #06ad56; }
.login-btn.primary { background: var(--primary); color: #fff; }
.login-btn.primary:hover { background: var(--primary-dark); }
.login-btn.ghost {
  background: #fff;
  color: var(--text-2);
  border: 1px solid var(--border);
  height: 42px;
  font-size: 13px;
}
.login-btn.ghost:hover { border-color: #cbd5e1; color: var(--text); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; }

.login-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  font-size: 11.5px;
  color: var(--text-3);
}
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }

/* 二维码 */
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-wrap #ww_login { width: 200px; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.qr-tip { font-size: 12px; color: var(--text-3); }
.qr-fallback { font-size: 12px; color: var(--text-3); text-align: center; padding: 30px 10px; }

/* 提示块 */
.login-note {
  font-size: 12.5px;
  line-height: 1.7;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 14px;
}
.login-note.demo { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.login-note.warn { background: #f8fafc; color: var(--text-2); border: 1px solid var(--border); }
.login-note.info { background: #eff6ff; color: #1e40af; border: 1px solid #dbeafe; }
.login-note b { font-weight: 600; }

/* 模拟成员选择 */
.wl-members { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 2px; }
.wl-member {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: .14s;
}
.wl-member:hover { border-color: var(--primary); background: #f8fbff; transform: translateY(-1px); }
.wl-member:disabled { opacity: .6; cursor: default; transform: none; }
.wl-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}
.wl-info { flex: 1; min-width: 0; }
.wl-name { display: block; font-size: 13.5px; color: var(--text); font-weight: 500; }
.wl-dept { display: block; font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-go { color: var(--text-3); font-size: 14px; flex-shrink: 0; }
.wl-member:hover .wl-go { color: var(--primary); }

.login-foot { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--border-light); text-align: center; }
.login-foot .btn-link { font-size: 12.5px; color: var(--text-2); background: none; border: none; cursor: pointer; font-family: inherit; padding: 4px 6px; }
.login-foot .btn-link:hover { color: var(--primary); }
.login-foot .sep { color: var(--border); margin: 0 4px; }

.login-copyright { margin-top: auto; padding-top: 26px; font-size: 11.5px; color: var(--text-3); text-align: center; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, .9);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 9px;
  display: none;
  z-index: 99;
}

@media (max-width: 480px) {
  .login-top { height: 52px; }
  .login-card { padding: 26px 20px 20px; border-radius: 16px; margin-top: 10px; }
  .login-logo { width: 48px; height: 48px; font-size: 22px; border-radius: 13px; }
  .login-title { font-size: 17.5px; }
  .wl-members { max-height: none; }
}
