/* Auth pages — sign in / sign up */

.auth-page {
  overflow-x: hidden;
}

.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-layout {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--ticker-bg);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  transition: background 0.35s ease, border-color 0.35s ease;
}

[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

.auth-card__header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-overline);
  margin-bottom: 0.75rem;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.auth-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.auth-input-wrap {
  position: relative;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--btn-secondary-bg);
  border: 1px solid var(--border-strong);
  border-radius: 0.5rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input-wrap .auth-input {
  padding-right: 2.75rem;
}

.auth-input::placeholder {
  color: var(--text-subtle);
}

.auth-input:focus {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.auth-input.auth-input--error {
  border-color: #f87171;
}

.auth-input.auth-input--error:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.auth-field-error {
  font-size: 0.75rem;
  color: #f87171;
  margin-top: -0.25rem;
}

.auth-toggle-pw {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-toggle-pw:hover {
  color: var(--text);
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-checkbox input {
  margin-top: 0.2rem;
  accent-color: #7c3aed;
  flex-shrink: 0;
}

.auth-checkbox a.auth-link {
  font-weight: 600;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.75rem 0;
  color: var(--text-subtle);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-social__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: var(--btn-secondary-bg);
  border: 1px solid var(--border-strong);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.auth-social__btn:hover {
  background: var(--btn-secondary-bg-hover);
}

.auth-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.auth-link:hover {
  opacity: 0.85;
}

.auth-link--sm {
  font-size: 0.75rem;
  font-weight: 500;
}

.auth-link--muted {
  color: var(--text-muted);
  font-weight: 500;
}

.auth-switch {
  text-align: center;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-back {
  margin-top: 1.5rem;
  text-align: center;
}

a.sign-in-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.25rem;
  }

  .auth-title {
    font-size: 1.5rem;
  }
}
