/* ==================================================
   Authentication pages
   Login, registration and password recovery
================================================== */

/* =========================
   Shared page layout
========================= */

.auth-page {
  position: relative;
  padding: 0;
  background: #ffffff;
}

.site-brand {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.site-brand:hover,
.site-brand:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text);
  text-decoration: none;
}

.brand-bar:hover,
.brand-bar:focus-visible {
  text-decoration: none;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(28rem, 1.05fr) minmax(26rem, 0.95fr);
}


/* =========================
   Left information panel
========================= */

.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: #ffffff;
  border-bottom: 1px solid #e7e3ee;
}

.auth-info-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5.5rem 4.5rem 3.5rem;
  border-right: 1px solid #e7e3ee;
  background: linear-gradient(135deg, #ffffff 0%, #f6f1ff 100%);
}

.auth-brand {
  align-self: flex-start;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.18s ease;
}

.auth-brand:hover {
  color: #8b3dff;
}

.auth-introduction {
  max-width: 38rem;
}

.auth-introduction--centered {
  margin: 9rem auto 0;
  text-align: center;
}

.auth-info-panel--shifted {
  padding-top: 6rem;
}

.auth-eyebrow {
  margin-bottom: 1rem;
  color: #8b3dff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-introduction h1 {
  margin-bottom: 1.25rem;
  color: #0f172a;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  font-weight: 800;
  line-height: 1.05;
}

.auth-description {
  max-width: 34rem;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.75;
}

.auth-footer {
  color: #64748b;
  font-size: 0.85rem;
}

/* =========================
   Right form panel
========================= */

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: #ffffff;
}

.auth-card {
  width: 100%;
  max-width: 28rem;
  padding: 2.25rem;
  border: 1px solid #e7e3ee;
  border-radius: 1.1rem;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.legal-card {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 2.25rem;
  border: 1px solid #e7e3ee;
  border-radius: 1.4rem;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.legal-card h1 {
  margin-bottom: 0.85rem;
  color: #0f172a;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.legal-card h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  color: #111827;
  font-size: 1.65rem;
  line-height: 1.15;
}

.legal-card h3 {
  margin-top: 1.7rem;
  margin-bottom: 0.6rem;
  color: #1f2937;
  font-size: 1.05rem;
}

.legal-card p,
.legal-card li {
  color: #475569;
  font-size: 1rem;
  line-height: 1.9;
}

.legal-card ul {
  margin: 0.75rem 0 0 1.35rem;
  list-style: disc;
}

.legal-card .tab-switcher {
  margin-bottom: 1.75rem;
}

.auth-card h2 {
  margin-bottom: 0.5rem;
  color: #0f172a;
  font-size: 1.8rem;
}

.auth-card-description {
  margin-bottom: 1.8rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.55;
}

.auth-card .form-group {
  margin-bottom: 1rem;
}

/* =========================
   Shared auth links and button
========================= */

.auth-link {
  color: #8b3dff;
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 0.85rem;
  background: #8b3dff;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(139, 61, 255, 0.18);
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.auth-submit-btn:hover {
  background: #7828e6;
  box-shadow: 0 16px 34px rgba(139, 61, 255, 0.24);
  transform: translateY(-1px);
}

.auth-submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

/* =========================
   Login page
========================= */

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.15rem 0 1.35rem;
  font-size: 0.85rem;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
}

.auth-checkbox input {
  width: auto;
}

.auth-register-text {
  margin-top: 1.5rem;
  color: #64748b;
  font-size: 0.88rem;
  text-align: center;
}

/* =========================
   Password recovery page
========================= */

#reset-password-form .auth-submit-btn {
  margin-top: 0.5rem;
}

/* =========================
   Registration page
========================= */

.auth-form-panel--register {
  align-items: flex-start;
  min-height: 100vh;
  padding: 2rem 3rem;
  overflow-y: auto;
}

.auth-card--register {
  max-width: 34rem;
}

.auth-card--register .auth-card-description {
  margin-bottom: 1.4rem;
}

.register-name-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 2.8rem;
}

.toggle-pass-btn {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #94a3b8;
  transform: translateY(-50%);
  transition: color 0.18s ease;
}

.toggle-pass-btn:hover {
  color: #8b3dff !important;
}

.s-track {
  height: 0.22rem;
  margin-top: 0.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e3ee;
}

.s-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  transition:
    width 0.2s ease,
    background-color 0.2s ease;
}

.s-label {
  margin-top: 0.3rem;
  color: #94a3b8;
  font-size: 0.76rem;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.15rem 0 1.25rem;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.5;
}

.terms-row input {
  width: auto;
  margin-top: 0.2rem;
  accent-color: #8b3dff;
}

.terms-row label {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 400;
}

.terms-link {
  color: #8b3dff;
  font-weight: 700;
  text-decoration: none;
}

.terms-link:hover {
  text-decoration: underline;
}

.reg-divider {
  position: relative;
  margin: 1.15rem 0;
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
}

.reg-divider::before,
.reg-divider::after {
  position: absolute;
  top: 50%;
  width: 44%;
  height: 1px;
  background: #e7e3ee;
  content: "";
}

.reg-divider::before {
  left: 0;
}

.reg-divider::after {
  right: 0;
}

.reg-signin {
  color: #64748b;
  font-size: 0.875rem;
  text-align: center;
}

.reg-signin button {
  border: none;
  background: transparent;
  color: #8b3dff;
  font-weight: 700;
}

.reg-signin button:hover {
  text-decoration: underline;
}

/* =========================
   Responsive layout
========================= */

@media (max-width: 850px) {
  .auth-layout {
    display: block;
  }

  .auth-info-panel {
    display: none;
  }

  .auth-form-panel,
  .auth-form-panel--register {
    min-height: 100vh;
    padding: 1.5rem;
  }
}

@media (max-width: 560px) {
  .register-name-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}