/* Auth menu in the Starlight header. */
.tvr-auth-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
}
.tvr-auth-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-size: 0.82rem; font-weight: 500;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--sl-color-gray-5);
  border-radius: 8px;
  background: transparent;
  color: var(--sl-color-text);
  cursor: pointer;
  white-space: nowrap;
}
.tvr-auth-btn:hover {
  background: var(--sl-color-gray-6);
  border-color: var(--sl-color-gray-4);
}
.tvr-auth-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sl-color-accent);
  display: inline-block;
}
.tvr-auth-name { max-width: 10ch; overflow: hidden; text-overflow: ellipsis; }

.tvr-auth-pop {
  position: absolute; top: calc(100% + 6px); right: 0;
  width: 280px; max-width: calc(100vw - 1rem);
  padding: 0.9rem;
  background: var(--sl-color-bg);
  border: 1px solid var(--sl-color-gray-5);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  z-index: 1000;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.tvr-auth-pop[hidden] { display: none; }

.tvr-auth-intro { margin: 0; font-size: 0.9rem; color: var(--sl-color-gray-3); }
.tvr-auth-info { font-size: 0.95rem; color: var(--sl-color-text); }
.tvr-auth-info strong { display: block; }
.tvr-auth-email { font-size: 0.8rem; color: var(--sl-color-gray-3); margin-top: 0.1rem; }

.tvr-auth-input {
  width: 100%; box-sizing: border-box;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--sl-color-gray-5);
  border-radius: 8px;
  background: var(--sl-color-bg);
  color: var(--sl-color-text);
  font: inherit; font-size: 0.92rem;
}
.tvr-auth-input:focus {
  outline: 2px solid var(--sl-color-accent); outline-offset: -1px;
}

.tvr-auth-primary,
.tvr-auth-secondary {
  border: none; border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font: inherit; font-weight: 600; cursor: pointer;
  width: 100%;
}
.tvr-auth-primary {
  background: var(--sl-color-accent);
  color: var(--sl-color-bg);
}
.tvr-auth-primary:disabled { opacity: 0.5; cursor: default; }
.tvr-auth-secondary {
  background: transparent;
  color: var(--sl-color-text);
  border: 1px solid var(--sl-color-gray-5);
}
.tvr-auth-secondary:hover { background: var(--sl-color-gray-6); }

.tvr-auth-toggle {
  color: var(--sl-color-accent);
  font-size: 0.82rem;
  text-decoration: none;
  align-self: center;
}
.tvr-auth-toggle:hover { text-decoration: underline; }

.tvr-auth-adminlink,
.tvr-auth-upgradelink {
  display: block;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.1rem;
  background: var(--sl-color-accent);
  color: var(--sl-color-bg);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600; font-size: 0.88rem;
  text-align: center;
}
.tvr-auth-adminlink:hover,
.tvr-auth-upgradelink:hover { opacity: 0.92; }
.tvr-auth-link {
  display: block; padding: 0.35rem 0.65rem; margin-bottom: 0.1rem;
  color: var(--sl-color-accent); text-decoration: none; font-size: 0.85rem;
  border: 1px solid var(--sl-color-gray-5); border-radius: 8px; text-align: center;
}
.tvr-auth-link:hover { background: var(--sl-color-gray-6); }
.tvr-auth-tier { font-size: 0.78rem; color: var(--sl-color-gray-3); margin-top: 0.2rem; }
.tvr-auth-star { font-size: 0.9em; }

.tvr-auth-err {
  color: var(--sl-color-accent);
  font-size: 0.82rem; min-height: 1em;
}

@media (max-width: 720px) {
  .tvr-auth-btn { padding: 0.3rem 0.55rem; font-size: 0.78rem; }
  .tvr-auth-name { max-width: 7ch; }
}
