/* ==========================================================================
   Elevaan Network — Login / Join page (single page, split layout)
   ========================================================================== */

.auth-page {
  padding: 40px 0 56px;
  min-height: calc(100vh - var(--header-height) - 160px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(22, 36, 77, 0.06), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 100%, rgba(247, 66, 30, 0.05), transparent 50%),
    #f7f8fa;
}

.auth-page-inner {
  width: 100%;
}

.auth-card {
  display: flex;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  min-height: 580px;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 0;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 12px 32px rgba(16, 24, 40, 0.08);
}

/* ---- Left panel ---- */

.auth-panel-left {
  flex: 0 0 46%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(165deg, #16244d 0%, #0e1a3a 55%, #1a1330 100%);
  color: #fff;
  padding: 44px 36px 36px;
  overflow: hidden;
  position: relative;
}

.auth-panel-left::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(247, 66, 30, 0.18);
  pointer-events: none;
}

.auth-left-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.auth-left-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  margin: 0;
  max-width: 320px;
}

.auth-left-media {
  width: 160px;
  height: 160px;
  margin-top: 32px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 1;
}

.auth-left-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* ---- Right panel ---- */

.auth-panel-right {
  flex: 1 1 54%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 40px 40px;
  min-width: 0;
}

.auth-view[hidden] {
  display: none;
}

.auth-view--form {
  width: 100%;
  max-width: 360px;
}

.auth-title {
  font-size: 30px;
  font-weight: 700;
  color: #16181c;
  line-height: 1.2;
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.auth-sub {
  font-size: 14px;
  font-weight: 500;
  color: #667085;
  margin: 0 0 28px;
  line-height: 1.5;
}

.auth-text-link {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: #16244d;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.auth-text-link:hover {
  color: #ff6600;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.auth-provider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #16181c;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-provider:hover {
  background: #f9fafb;
  border-color: #98a2b3;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.auth-legal {
  margin: 28px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #98a2b3;
  max-width: 340px;
}

.auth-legal a {
  color: #344054;
  text-decoration: underline;
  font-weight: 500;
}

.auth-legal a:hover {
  color: #ff6600;
}

/* ---- Email form view ---- */

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  border: none;
  background: none;
  color: #667085;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.auth-back:hover {
  color: #16181c;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field[hidden] {
  display: none;
}

.auth-label {
  font-size: 14px;
  font-weight: 600;
  color: #344054;
  margin: 0;
  letter-spacing: -0.01em;
}

.auth-input {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 14px 15px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: #16181c;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-input::placeholder {
  color: #98a2b3;
  font-weight: 450;
}

.auth-input:hover {
  border-color: #98a2b3;
}

.auth-input:focus {
  outline: none;
  border-color: #16244d;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 36, 77, 0.12);
}

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

.auth-password-wrap .auth-input {
  padding-right: 48px;
}

.auth-toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: #98a2b3;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.auth-toggle-password:hover {
  color: #344054;
  background: #f2f4f7;
}

.auth-submit {
  margin-top: 6px;
  min-height: 50px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.auth-forgot {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #667085;
}

.auth-forgot:hover {
  color: #ff6600;
}

.auth-error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
}

.auth-error[hidden] {
  display: none;
}

.login-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: #16181c;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 220;
}

.login-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---- Responsive ---- */

@media (max-width: 860px) {
  main.auth-page {
    padding-top: 0;
  }

  .auth-page {
    padding: 0;
    background: #fff;
    min-height: 0;
    align-items: stretch;
  }

  .auth-page .container.auth-page-inner {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
  }

  .auth-card {
    flex-direction: column;
    min-height: 0;
    max-width: none;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-panel-left {
    flex: none;
    padding: 22px 20px 18px;
  }

  .auth-left-title {
    font-size: 22px;
  }

  .auth-left-media {
    width: 56px;
    height: 56px;
    margin-top: 14px;
    border-radius: 5px;
  }

  .auth-panel-right {
    padding: 40px 20px 28px;
  }

  .auth-view--form {
    max-width: none;
  }

  .auth-actions {
    width: 100%;
    max-width: none;
  }

  .auth-provider {
    white-space: normal;
  }

  .auth-title {
    font-size: 22px;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 0;
  }

  .auth-panel-left {
    padding: 18px 16px 14px;
  }

  .auth-left-media {
    width: 48px;
    height: 48px;
    margin-top: 12px;
    border-radius: 5px;
  }

  .auth-panel-right {
    padding: 36px 16px 24px;
  }

  .auth-title {
    font-size: 22px;
    white-space: nowrap;
  }

  .auth-form {
    gap: 16px;
  }

  .auth-input {
    padding: 13px 14px;
  }
}
