/* =========================================================
   AUTH PAGES
   Login, registration, password reset, and auth landing
   surfaces. Uses a public/auth visual system separate from
   dense product workspace pages.

   Sections:
   01. Auth tokens and base
   ========================================================= */

/* ---------------------------------------------------------
   01. Auth tokens and base
   --------------------------------------------------------- */
:root {
  --auth-page-wash:
    radial-gradient(circle at top left, rgba(15, 90, 215, 0.13), transparent 34%),
    linear-gradient(180deg, #eef5ff 0%, #f8fbff 34%, #ffffff 100%);
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--auth-page-wash);
  margin: 0;
  color: #0f172a;
}

h2 {
  text-align: left;
  margin-bottom: 22px;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 2rem;
}

.auth-page {
  min-height: 100vh;
  background: var(--auth-page-wash);
}

.auth-topbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.auth-brand {
  color: #0656c7;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-nav-link {
  color: #0656c7;
  text-decoration: none;
  font-weight: 700;
}

.auth-language-switch {
  min-width: 0;
  width: 104px;
  border-radius: 999px;
  border: 1px solid rgba(0, 123, 255, 0.16);
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  font-size: 0.96rem;
  color: #0656c7;
  font-weight: 700;
  appearance: none;
  outline: none;
  box-shadow: 0 10px 20px rgba(0, 123, 255, 0.06);
  text-align: center;
  text-align-last: center;
  line-height: 1.2;
}

.auth-shell {
  max-width: 1240px;
  margin: 0 auto;
  min-height: calc(100vh - 90px);
  padding: 28px 24px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 460px);
  gap: 42px;
  align-items: start;
}

.auth-context-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 40px 42px;
  border-radius: 32px;
  border: 1px solid rgba(0, 123, 255, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 248, 255, 0.94) 100%);
  box-shadow: 0 26px 56px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.auth-context-card::before,
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, rgba(0, 123, 255, 0.92) 0%, rgba(6, 86, 199, 0.12) 100%);
}

.auth-context-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(0, 123, 255, 0.10);
  color: #0656c7;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-context-card h1 {
  margin: 20px 0 14px;
  font-size: clamp(2.8rem, 4.2vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.auth-context-card p {
  margin: 0;
  color: #475569;
  line-height: 1.8;
  font-size: 1.05rem;
}

.auth-context-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.auth-context-point {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 123, 255, 0.10);
}

.auth-context-point strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.6rem;
  color: #0656c7;
}

.auth-context-point span {
  color: #475569;
  line-height: 1.55;
}

input {
  width: 100%;
  padding: 13px 14px;
  font-size: 15px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  box-sizing: border-box;
  background-color: rgba(248, 251, 255, 0.92);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input:hover {
  border-color: rgba(0, 123, 255, 0.26);
}

input:focus {
  border-color: rgba(0, 123, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.10);
  background-color: #fff;
  outline: none;
}

.container {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 248, 255, 0.94) 100%);
  padding: 34px;
  border-radius: 28px;
  border: 1px solid rgba(0, 123, 255, 0.10);
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.08);
}

.auth-panel {
  position: relative;
  justify-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
}

.auth-notice-success {
  background: #e8f7ee;
  color: #1c6b3f;
}

.auth-notice-warning {
  background: #fff4d6;
  color: #7a4b00;
}

.auth-mfa-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
}

.auth-mfa-dialog {
  width: min(420px, 100%);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 24px;
  color: #172033;
}

.auth-mfa-dialog h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
}

.auth-mfa-body {
  display: grid;
  gap: 14px;
}

.auth-mfa-body p {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.auth-mfa-body input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.auth-mfa-qr {
  justify-self: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.auth-mfa-secret {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.auth-mfa-secret summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: #64748b;
}

.auth-mfa-secret code {
  display: block;
  margin-top: 8px;
}

.auth-mfa-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.auth-mfa-actions button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.auth-mfa-cancel {
  background: #e2e8f0;
  color: #334155;
}

.auth-mfa-submit {
  background: #2563eb;
  color: #ffffff;
}

.input-group {
  margin-bottom: 20px;
}

.continue-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #007bff 0%, #0656c7 100%);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 18px 36px rgba(0, 123, 255, 0.22);
}

.continue-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(0, 123, 255, 0.28);
}

.continue-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 15px;
  font-size: 13px;
  color: #007bff;
  text-decoration: none;
}

#forgot_password {
  display: block;
  text-align: right;
  font-size: 13px;
  margin: 10px 0 14px;
  color: #007bff;
  text-decoration: none;
}

#signup_link {
  text-align: center;
  font-size: 13px;
  margin-top: 12px;
  color: #555;
}

#signup_link a {
  color: #007bff;
  text-decoration: none;
}

.back-link:hover,
#forgot_password:hover,
#signup_link a:hover {
  text-decoration: underline;
}

.divider {
  text-align: center;
  margin: 22px 0;
  color: #888;
  font-size: 13px;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background-color: rgba(15, 23, 42, 0.14);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.social-button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 13px;
  background-color: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-button img {
  width: 20px;
  margin-right: 10px;
}

.social-button:hover {
  background-color: #fff;
  transform: translateY(-1px);
  border-color: rgba(0, 123, 255, 0.22);
  box-shadow: 0 14px 28px rgba(0, 123, 255, 0.08);
}

.register-shell {
  min-height: 100vh;
  padding: 0 24px 40px;
  background: var(--auth-page-wash);
}

.register-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 44px;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(360px, 460px);
  gap: 36px;
  align-items: stretch;
  justify-content: center;
}

.register-layout-standard {
  max-width: 1240px;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 460px);
  gap: 42px;
  align-items: start;
}

.register-plan-panel {
  background: linear-gradient(160deg, #0b3d91, #2a7de1);
  color: #fff;
  padding: 34px;
  border-radius: 28px;
  box-shadow: 0 24px 52px rgba(11, 61, 145, 0.20);
}

.register-plan-panel h1 {
  margin: 0 0 12px;
  color: #fff;
  text-align: left;
}

.register-plan-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.88;
}

.register-plan-best-for {
  margin: 0 0 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}

.register-plan-highlights {
  margin: 0;
  padding-left: 18px;
}

.register-plan-highlights {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.register-layout-standard .register-context-card {
  padding: 40px 42px;
  min-width: 0;
  overflow: hidden;
}

.register-layout-standard .container {
  max-width: 100%;
  justify-self: stretch;
}

.register-layout-standard .auth-context-card h1 {
  font-size: clamp(2.8rem, 4.2vw, 4.4rem);
  line-height: 0.96;
  margin: 18px 0 12px;
  max-width: none;
}

.register-layout-standard .auth-context-card p {
  font-size: 1.05rem;
  line-height: 1.8;
}

.register-layout-standard .auth-context-points {
  margin-top: 26px;
}

.register-layout-standard .auth-context-point {
  padding: 18px;
  border-radius: 22px;
}

.register-layout-standard .auth-context-point strong {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.register-layout-standard .auth-context-point span {
  font-size: 1rem;
}

.register-subtitle {
  margin: -8px 0 22px;
  text-align: left;
  color: #55606f;
  font-size: 14px;
  line-height: 1.55;
}

.register-google-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef5ff;
  color: #205493;
  font-size: 14px;
  line-height: 1.5;
}

.register-social-button {
  margin-bottom: 6px;
}


@media (max-width: 960px) {
  .auth-topbar {
    padding-top: 16px;
  }

  .auth-shell,
  .register-layout {
    grid-template-columns: 1fr;
  }

  .register-layout {
    padding-top: 24px;
  }

  .auth-panel {
    justify-self: stretch;
  }

  .auth-context-card {
    order: 2;
  }

  .register-plan-panel,
  .register-context-card,
  .container {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .auth-topbar,
  .auth-topbar-tools {
    flex-wrap: wrap;
  }

  .auth-shell {
    padding: 20px 16px 32px;
  }

  .auth-context-card,
  .container {
    padding: 24px;
    border-radius: 24px;
  }

  .auth-context-card h1 {
    font-size: 2.7rem;
  }

  .auth-context-points {
    grid-template-columns: 1fr;
  }

  .register-shell {
    padding: 0 16px 28px;
  }
}
