/* CTS Auth — Sign In / Sign Up */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 165, 233, 0.15), transparent),
    var(--bg-primary, #030712);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.auth-card__logo {
  display: block;
  height: 44px;
  width: auto;
  margin: 0 auto 1.25rem;
}

.auth-card__title {
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.35rem;
  color: var(--text-primary, #f8fafc);
}

.auth-card__desc {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 1.5rem;
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.auth-tabs__btn {
  flex: 1;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tabs__btn.is-active {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
}

.auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.auth-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #f8fafc);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.auth-oauth-btn:hover:not(:disabled) {
  border-color: rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.08);
}

.auth-oauth-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.auth-oauth-btn--apple {
  background: #000;
  border-color: rgba(255, 255, 255, 0.15);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted, #64748b);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.15);
}

.auth-form .form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.auth-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.35rem;
}

.auth-form input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(3, 7, 18, 0.6);
  color: var(--text-primary, #f8fafc);
  font: inherit;
  font-size: 0.9375rem;
}

.auth-form input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.auth-error {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-size: 0.8125rem;
  text-align: center;
}

.auth-success {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
  font-size: 0.8125rem;
  text-align: center;
}

.auth-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  text-align: center;
  line-height: 1.5;
}

.auth-admin-link {
  display: block;
  margin-top: 1rem;
  padding: 0.75rem;
  text-align: center;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-admin-link:hover { background: rgba(14, 165, 233, 0.2); }

.auth-back {
  display: block;
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
}

.auth-back:hover { color: #38bdf8; }

.nav__account-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.6875rem;
  font-weight: 700;
}

.nav__account-btn:hover {
  border-color: rgba(14, 165, 233, 0.4);
  color: #38bdf8;
}

.nav__user-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav__user-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  max-width: 150px;
}

.nav__user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav__user-email {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav__signout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

.nav__signout-btn:hover { color: #ef4444; }

.nav__auth-link {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.auth-oauth-panel { text-align: left; }
.auth-oauth-panel .form-group { margin-bottom: 1rem; }

@media (max-width: 1280px) {
  .nav__user-chip { display: none; }
  .nav__auth-link span { display: none; }
}
