/* ═══════════════════════════════════════════════════════════════
 * th-auth.css — TroveHall 会员制公共组件样式（2026-08-18）
 * 弹窗三视图 + 登录态导航（不依赖页面主题，独立于各页样式）
 * ═══════════════════════════════════════════════════════════════ */

/* ── 弹窗 ── */
.th-auth-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(15, 10, 6, 0.62);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(3px);
  animation: thAuthFade .18s ease-out;
}
@keyframes thAuthFade { from { opacity: 0; } to { opacity: 1; } }

.th-auth-box {
  background: #fff; color: #2b2118;
  width: 100%; max-width: 400px; max-height: 90vh; overflow-y: auto;
  border-radius: 16px; padding: 1.4rem 1.5rem 1.6rem;
  position: relative; box-shadow: 0 24px 64px rgba(0,0,0,.35);
  font-family: inherit;
}
.th-auth-close {
  position: absolute; top: 10px; right: 14px;
  font-size: 1.5rem; line-height: 1; cursor: pointer; color: #999;
  padding: 4px 8px; border-radius: 8px;
}
.th-auth-close:hover { color: #2b2118; background: #f3efe9; }

.th-auth-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; border-bottom: 2px solid #f0ebe3; }
.th-auth-tab {
  background: none; border: none; padding: .55rem 1rem; cursor: pointer;
  font-size: .95rem; font-weight: 600; color: #999; font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.th-auth-tab.active { color: #e94560; border-bottom-color: #e94560; }

.th-auth-view { display: flex; flex-direction: column; gap: .65rem; }
.th-auth-view input, .th-auth-view select {
  width: 100%; padding: .7rem .85rem; border: 1.5px solid #e2dbd0;
  border-radius: 10px; font-size: 1rem; font-family: inherit;
  background: #fff; color: #2b2118; box-sizing: border-box;
}
.th-auth-view input:focus, .th-auth-view select:focus {
  outline: none; border-color: #e94560;
}
.th-auth-why { font-size: .82rem; color: #8a7f70; margin: 0 0 .2rem; }

.th-auth-row { display: flex; gap: .5rem; align-items: stretch; }
.th-auth-row input { flex: 1; }
.th-auth-cap-img { cursor: pointer; display: inline-flex; align-items: center; }
.th-auth-cap-img img { display: block; }

.th-auth-btn {
  padding: .72rem 1rem; border-radius: 10px; border: none;
  font-size: .95rem; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: opacity .15s;
}
.th-auth-btn:disabled { opacity: .55; cursor: default; }
.th-auth-btn-primary { background: #e94560; color: #fff; width: 100%; }
.th-auth-btn-primary:hover:not(:disabled) { background: #d63a54; }
.th-auth-btn-ghost {
  background: #fff; color: #e94560; border: 1.5px solid #e94560;
  white-space: nowrap; padding: .5rem .9rem; font-size: .82rem;
}
.th-auth-btn-ghost:disabled { color: #aaa; border-color: #ddd; }

.th-auth-link {
  font-size: .85rem; color: #8a7f70; text-decoration: underline;
  cursor: pointer; text-align: center; margin-top: .2rem;
}

.th-auth-flash { font-size: .82rem; min-height: 1.1em; color: #999; }
.th-auth-flash.err { color: #c62828; }
.th-auth-flash.ok { color: #2e7d32; }

/* ── 导航登录态 ── */
.th-nav-btn {
  background: #e94560; color: #fff; border: none; border-radius: 999px;
  padding: .45rem 1.1rem; font-size: .85rem; font-weight: 700; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.th-nav-btn:hover { background: #d63a54; }

.th-nav-user { position: relative; display: inline-block; }
.th-nav-name {
  display: inline-block; cursor: pointer;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: #fff; padding: .45rem 1rem; border-radius: 999px;
  font-size: .85rem; font-weight: 700; max-width: 160px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.th-nav-drop {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18);
  min-width: 160px; padding: .4rem; z-index: 9999;
}
.th-nav-user:hover .th-nav-drop { display: block; }
.th-nav-drop a {
  display: block; padding: .6rem .9rem; border-radius: 8px;
  color: #2b2118; text-decoration: none; font-size: .9rem;
}
.th-nav-drop a:hover { background: #f7f3ec; color: #e94560; }

/* 浅色导航页面适配（如 account/orders 白色顶栏） */
.th-nav-light .th-nav-name {
  background: #fff; border-color: #e2dbd0; color: #2b2118;
}
.th-nav-light .th-nav-drop { box-shadow: 0 12px 32px rgba(0,0,0,.14); }

.th-auth-row select { width: auto; flex: 0 0 auto; }
