/* Shared Heyu account widget — match 归类通 login button, logged-in chip, and modal. */
.heyu-sso-slot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}
.heyu-sso-slot-fixed {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 80;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.heyu-sso-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Header login / logout — same as 归类通 .btn.ghost.sm */
.heyu-sso-btn {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #1e86fc;
  background: #fff;
  color: #1e86fc;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  padding: 0.28rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.15s ease;
}
.heyu-sso-btn:hover:not(:disabled) {
  background: #e8f3ff;
  border-color: #1e86fc;
  color: #1565c0;
}
.heyu-sso-btn:active:not(:disabled) {
  background: #d6eaff;
  border-color: #1565c0;
  color: #1565c0;
}
.heyu-sso-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.heyu-sso-btn-primary {
  border-color: #1e86fc;
  background: #1e86fc;
  color: #fff;
}
.heyu-sso-btn-primary:hover:not(:disabled) {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
}

/* Logged-in phone — same as 归类通 .auth-phone */
.heyu-sso-phone {
  font-size: 0.82rem;
  color: #1565c0;
  font-weight: 600;
  background: #e8f3ff;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0;
  max-width: 11em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heyu-sso-gate {
  position: sticky;
  top: 0;
  z-index: 70;
  background: #fff7ed;
  color: #9a3412;
  border-bottom: 1px solid #fdba74;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

.heyu-sso-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9998;
}
.heyu-sso-modal {
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 1.5rem));
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  color: #0f172a;
}
.heyu-sso-head {
  border-bottom: none;
  padding: 1rem 1.25rem 0;
  min-height: 2.4rem;
  position: relative;
}
.heyu-sso-head.no-title {
  padding: 0.7rem 1.25rem 0;
  min-height: 2.2rem;
}
.heyu-sso-head h3 {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 1.12rem;
  font-weight: 700;
  color: #1f2937;
}
.heyu-sso-head.no-title h3 { display: none; }
.heyu-sso-close {
  appearance: none;
  position: absolute;
  right: 0.65rem;
  top: 0.55rem;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
}
.heyu-sso-close:hover {
  color: #374151;
  background: #f3f4f6;
  border-radius: 50%;
}
.heyu-sso-body { padding: 0.35rem 1.75rem 1.6rem; }

.heyu-sso-tabs {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  margin: 0.15rem 0 1.35rem;
  padding: 0;
  border-bottom: none;
}
.heyu-sso-tab {
  flex: none;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.35rem 0.15rem 0.7rem;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  color: #111827;
  cursor: pointer;
  position: relative;
  border-radius: 0;
}
.heyu-sso-tab:hover {
  color: #1e86fc;
  background: transparent;
}
.heyu-sso-tab.active {
  color: #1e86fc;
  font-weight: 700;
}
.heyu-sso-tab.active::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0.15rem;
  height: 3px;
  border-radius: 2px;
  background: #1e86fc;
}

.heyu-sso-panel { display: block; }
.heyu-sso-pill {
  display: flex;
  align-items: center;
  background: #f3f5f7;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 0.25rem 0 1.15rem;
  margin: 0.85rem 0 0;
}
.heyu-sso-panel .heyu-sso-pill:first-child { margin-top: 0; }
.heyu-sso-pill:focus-within {
  border-color: #cfe3ff;
  background: #f7faff;
  box-shadow: 0 0 0 3px rgba(30, 134, 252, 0.12);
}
.heyu-sso-pill input {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0.7rem 1rem 0.7rem 0;
  border: none;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 0.95rem;
  color: #111827;
  box-shadow: none;
  border-radius: 0;
}
.heyu-sso-pill input:focus {
  border: none;
  box-shadow: none;
  outline: none;
}
.heyu-sso-pill input::placeholder { color: #c0c4cc; }

.heyu-sso-phone-pill { padding-left: 0; }
.heyu-sso-cc {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex: 0 0 auto;
  padding: 0 0.85rem 0 1.15rem;
  margin-right: 0.15rem;
  border-right: 1px solid #e5e7eb;
  color: #111827;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  user-select: none;
  white-space: nowrap;
}
.heyu-sso-cc-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #9ca3af;
  display: inline-block;
}
.heyu-sso-code-pill { padding-right: 0.35rem; }
.heyu-sso-get-code {
  flex: 0 0 auto;
  appearance: none;
  border: none;
  background: transparent;
  color: #1e86fc;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}
.heyu-sso-get-code:hover { color: #1565c0; }
.heyu-sso-get-code:disabled {
  color: #9ca3af;
  cursor: default;
}

.heyu-sso-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0.85rem 0 0 0.35rem;
  font-size: 0.86rem;
  color: #6b7280;
}
.heyu-sso-submit {
  display: block;
  width: 100%;
  appearance: none;
  border: none;
  margin-top: 1.15rem;
  height: 46px;
  border-radius: 999px;
  background: #1e86fc;
  color: #fff;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}
.heyu-sso-submit:hover { background: #1565c0; }
.heyu-sso-submit:disabled { opacity: 0.65; cursor: default; }
.heyu-sso-links {
  display: block;
  text-align: center;
  margin: 1.15rem 0 0;
  font-size: 0.88rem;
  color: #9ca3af;
}
.heyu-sso-links a {
  color: #6b7280;
  font-weight: 500;
  text-decoration: none;
}
.heyu-sso-links a:hover { color: #1e86fc; }
.heyu-sso-links .sep {
  margin: 0 0.7rem;
  color: #d1d5db;
}
.heyu-sso-hint {
  margin: 0.55rem 0 0 0.4rem;
  font-size: 0.76rem;
  color: #9ca3af;
}
.heyu-sso-err {
  text-align: center;
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  color: #dc2626;
}
.heyu-sso-panel[hidden],
.heyu-sso-tabs[hidden],
.heyu-sso-backdrop[hidden],
.heyu-sso-modal[hidden],
.heyu-sso-gate[hidden] { display: none !important; }
