/* 右上角账号 / 令牌控件 — 各页可单独引入（不依赖整站 demo-common 主题） */
.spot-ext-nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.spot-ext-nav-row #spot-global-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.spot-auth-shell {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  z-index: 60;
}
.spot-auth-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(280px, 72vw);
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  background: rgba(15, 23, 42, 0.92);
  color: var(--text, #f1f5f9);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.spot-auth-trigger:hover,
.spot-auth-shell.is-open .spot-auth-trigger {
  border-color: rgba(0, 229, 255, 0.55);
  background: rgba(0, 229, 255, 0.08);
}
.spot-auth-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #64748b;
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.25);
}
.spot-auth-shell.is-ok .spot-auth-dot {
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}
.spot-auth-shell.is-warn .spot-auth-dot {
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
}
#spot-auth-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.spot-auth-caret {
  color: var(--muted, rgba(241, 245, 249, 0.68));
  font-size: 0.7rem;
  flex-shrink: 0;
}
.spot-auth-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid rgba(0, 229, 255, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: var(--text, #f1f5f9);
}
.spot-auth-panel[hidden] {
  display: none !important;
}
.spot-auth-guide {
  font-size: 0.78rem;
  color: var(--muted, rgba(241, 245, 249, 0.68));
  margin: 0 0 10px;
  padding: 0;
  border: none;
  background: transparent;
  line-height: 1.45;
}
.spot-auth-guide.ok {
  color: var(--ok, #34d399);
}
.spot-auth-guide.warn {
  color: #fbbf24;
}
.spot-account-bar {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.spot-account-session,
.spot-account-guest {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.spot-auth-userline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.spot-auth-userline strong {
  color: var(--text, #f1f5f9);
  font-size: 0.88rem;
}
.spot-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.spot-auth-actions .btn,
.spot-auth-form .btn {
  margin: 0;
  padding: 7px 12px;
  font-size: 0.8rem;
}
.spot-auth-link {
  font-size: 0.8rem;
  color: var(--accent, #00e5ff);
  text-decoration: none;
  padding: 6px 4px;
}
.spot-auth-link:hover {
  text-decoration: underline;
}
.spot-auth-form label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted, rgba(241, 245, 249, 0.68));
  margin: 0 0 3px;
}
.spot-auth-form .field {
  margin: 0;
}
.spot-auth-form input,
.spot-auth-form select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: rgba(0, 0, 0, 0.28);
  color: var(--text, #f1f5f9);
  font-size: 0.84rem;
  font-family: inherit;
}
.spot-auth-form .captcha-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted, rgba(241, 245, 249, 0.68));
}
.spot-auth-form .captcha-row input {
  width: auto;
  max-width: 88px;
  flex: 1 1 72px;
}
.spot-token-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.spot-token-details summary {
  cursor: pointer;
  color: var(--muted, rgba(241, 245, 249, 0.68));
  font-size: 0.78rem;
  list-style: none;
}
.spot-token-details summary::-webkit-details-marker {
  display: none;
}
.spot-token-details[open] summary {
  color: var(--accent, #00e5ff);
  margin-bottom: 8px;
}
.spot-token-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}
.spot-token-fields .token-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.spot-token-fields input {
  flex: 1 1 140px;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: rgba(0, 0, 0, 0.28);
  color: var(--text, #f1f5f9);
}
.trial-token-status {
  font-size: 0.78rem;
}
.trial-token-status.ok {
  color: var(--ok, #34d399);
}
.trial-token-status.err {
  color: #fbbf24;
}
.spot-logged-label {
  display: none;
}

.spot-notify-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
}
.spot-notify-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: rgba(0, 0, 0, 0.22);
  color: var(--text, #f1f5f9);
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.spot-notify-bell:hover {
  border-color: rgba(0, 229, 255, 0.35);
}
.spot-notify-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #f59e0b;
  color: #111;
  font-size: 0.65rem;
  line-height: 16px;
  text-align: center;
  font-weight: 700;
}
.spot-notify-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, 86vw);
  max-height: 360px;
  overflow: auto;
  z-index: 80;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: rgba(12, 18, 28, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.spot-notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.spot-notify-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.spot-notify-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.spot-notify-item strong {
  font-size: 0.82rem;
}
.spot-notify-item span {
  font-size: 0.75rem;
  opacity: 0.78;
  line-height: 1.35;
}
.spot-notify-item.is-unread {
  border-color: rgba(0, 229, 255, 0.28);
  background: rgba(0, 229, 255, 0.06);
}
.spot-notify-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
}
.spot-notify-empty {
  margin: 8px 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

@media (max-width: 640px) {
  .spot-auth-panel {
    right: -8px;
  }
  .spot-ext-nav-row {
    align-items: flex-start;
  }
}
