/* ============================================================
   Auth Pages — Glassmorphism Design System
   Login, Register, Forgot Password, Reset Password
   ============================================================ */

/* ---- Layout Container ---- */
.auth-split {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
}

.auth-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 0 24px;
}

@media (max-width: 1279px) {
  .auth-container {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 520px;
  }
  .auth-container .auth-form-col {
    order: -1;
  }
  .auth-container .auth-marketing-col {
    order: 0;
  }
}

/* ---- Columns ---- */
.auth-marketing-col {
  position: relative;
}

.auth-form-col {
  position: relative;
}

/* ---- Marketing Column (shared) ---- */
.auth-marketing-heading {
  font-size: 44px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--tx);
  letter-spacing: -0.8px;
  margin-bottom: 16px;
  max-width: 16ch;
}

.auth-marketing-heading span {
  color: var(--ac);
}

.auth-marketing-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--tm);
  max-width: 48ch;
  margin-bottom: 32px;
}

/* Feature list in marketing column */
.auth-feature-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-feature-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
}

.auth-feature-icon {
  grid-row: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: rgba(124, 92, 252, 0.1);
  color: var(--ac);
  flex-shrink: 0;
}

.auth-feature-icon svg {
  width: 20px;
  height: 20px;
}

.auth-feature-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--tx);
  line-height: 1.3;
  align-self: end;
}

.auth-feature-desc {
  font-size: 14px;
  color: var(--tm);
  line-height: 1.6;
  grid-column: 2;
}

/* ---- Marketing: Wireframe Decorative Pattern ---- */
.auth-marketing-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  opacity: 0.35;
}

.auth-marketing-bg svg {
  width: 100%;
  height: 100%;
}

.auth-marketing-col > *:not(.auth-marketing-bg) {
  position: relative;
  z-index: 1;
}

/* ---- Trust Metrics (forgot/reset) ---- */
.auth-trust-heading {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--tx);
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.auth-trust-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--tm);
  max-width: 44ch;
  margin-bottom: 40px;
}

.auth-trust-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.auth-trust-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.auth-trust-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--gr);
}

.auth-trust-icon svg {
  width: 22px;
  height: 22px;
}

.auth-trust-label {
  font-size: 20px;
  font-weight: 600;
  color: var(--tx);
  line-height: 1.3;
  margin-bottom: 2px;
}

.auth-trust-sublabel {
  font-size: 14px;
  color: var(--tm);
  line-height: 1.5;
}

/* ---- Form Column (shared) ---- */
.auth-form-header {
  margin-bottom: 24px;
}

.auth-form-header h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--tx);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-form-header p {
  font-size: 15px;
  color: var(--tm);
  line-height: 1.6;
}

/* OAuth buttons row (side by side) */
.auth-oauth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--bd);
  background: var(--sf);
  color: var(--tx);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--ff);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1.4;
}

.auth-oauth-btn:hover {
  border-color: var(--ac);
  background: rgba(124, 92, 252, 0.04);
}

.auth-oauth-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* "or" divider */
.auth-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--tm);
  font-size: 13px;
  font-weight: 500;
}

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

/* Form grid */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .auth-field-row {
    grid-template-columns: 1fr;
  }
}

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

.auth-field-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--tm);
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-required {
  color: var(--rd);
  font-size: 11px;
  font-weight: 600;
}

.auth-field-group input,
.auth-field-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--bd);
  background: var(--bg);
  color: var(--tx);
  font-size: 14px;
  font-family: var(--ff);
  transition: all 0.2s;
  outline: none;
}

.auth-field-group input:focus,
.auth-field-group select:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.12);
}

.auth-field-group input::placeholder {
  color: var(--tm);
  opacity: 0.6;
}

.auth-field-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Input with leading icon */
.auth-input-icon {
  position: relative;
}

.auth-input-icon svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--tm);
  pointer-events: none;
}

.auth-input-icon input {
  padding-left: 40px;
}

/* Checkbox row */
.auth-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--tm);
  line-height: 1.5;
}

.auth-check-row input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--ac);
  cursor: pointer;
}

.auth-check-row label {
  cursor: pointer;
  user-select: none;
}

.auth-check-row a,
.auth-inline-link {
  color: var(--ac);
  font-weight: 500;
  text-decoration: none;
}

.auth-check-row a:hover,
.auth-inline-link:hover {
  text-decoration: underline;
}

/* Remember row (login: checkbox left, forgot link right) */
.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.auth-remember-row .auth-check-row {
  flex: 1;
}

.auth-forgot-link {
  color: var(--ac);
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  flex-shrink: 0;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

/* Primary submit button */
.auth-submit-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  background: var(--ac);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--ff);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.4;
}

.auth-submit-btn:hover {
  background: var(--ac2);
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

/* Error message */
.auth-error {
  display: none;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--rd);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.auth-error.show {
  display: block;
}

/* Helper footer */
.auth-helper {
  text-align: center;
  font-size: 14px;
  color: var(--tm);
  margin-top: 20px;
}

.auth-helper a {
  color: var(--ac);
  font-weight: 500;
  text-decoration: none;
}

.auth-helper a:hover {
  text-decoration: underline;
}

/* ---- Vertical Divider (forgot/reset) ---- */
@media (min-width: 1280px) {
  .auth-split.has-divider .auth-container {
    position: relative;
  }

  .auth-split.has-divider .auth-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: var(--bd);
    transform: translateX(-50%);
    z-index: 1;
  }

  .auth-split.has-divider .auth-marketing-col,
  .auth-split.has-divider .auth-form-col {
    padding: 40px 0;
  }

  .auth-split.has-divider .auth-form-col {
    padding-left: 32px;
  }

  .auth-split.has-divider .auth-marketing-col {
    padding-right: 32px;
  }
}

/* ---- Center content vertically (forgot/reset) ---- */
.auth-col-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

/* ---- Compact form (forgot/reset) ---- */
.auth-form-compact {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
