/* =============================================================
   Auth screens — login, forgot-password, verify/reset
   Accent: #b81414 (federation red).
   Signature: 4px right-edge gradient stripe = fencing piste boundary.
   ============================================================= */

/* ── Page shell ── */
.auth-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #f0f2f6;
}

/* ── Card ── */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 12px 32px rgba(15, 23, 42, 0.10);
  overflow: hidden;
}

/* Piste boundary — right edge = leading edge in RTL */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    #b81414 0%,
    rgba(184, 20, 20, 0.25) 100%
  );
  z-index: 2;
}

/* ── Card header (brand zone) ── */
.auth-head {
  padding: 2rem 2rem 1.5rem;
  background: rgba(184, 20, 20, 0.03);
  border-bottom: 1px solid #ede8e8;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Diagonal accent line — lunge angle geometry */
.auth-head::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -80px;
  width: 240px;
  height: 240px;
  border-top: 1.5px solid rgba(184, 20, 20, 0.13);
  transform: rotate(-18deg);
  transform-origin: bottom right;
  pointer-events: none;
}

.auth-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.6rem;
  position: relative;
  z-index: 1;
}

.auth-org {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7a8394;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}

/* ── Form zone ── */
.auth-body {
  padding: 1.75rem 2rem 2rem;
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #15171d;
  margin: 0 0 0.3rem;
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: #647084;
  margin: 0 0 1.5rem;
  line-height: 1.7;
}

/* ── Step dots (forgot-password flow) ── */
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.auth-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dde1ea;
  transition: width 0.25s ease, background 0.25s ease, border-radius 0.25s ease;
}

.auth-step-dot.active {
  width: 24px;
  border-radius: 4px;
  background: #b81414;
}

/* ── Field groups ── */
.auth-field {
  margin-bottom: 1.1rem;
}

.auth-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a5568;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

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

.auth-input {
  display: block;
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: #f8f9fb;
  border: 1.5px solid #dde1ea;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #15171d;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  direction: inherit;
}

.auth-input::placeholder {
  color: #aab2c0;
  font-weight: 400;
}

.auth-input:focus {
  outline: none;
  border-color: #b81414;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(184, 20, 20, 0.10);
}

/* Password visibility toggle — placed on left (trailing side in RTL) */
.auth-eye {
  position: absolute;
  top: 50%;
  left: 0.7rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8a93a6;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s;
}

.auth-eye:hover,
.auth-eye:focus-visible {
  color: #b81414;
  outline: none;
}

.auth-input.has-toggle {
  padding-left: 2.5rem;
}

/* OTP input — centered, spaced digits */
.auth-otp-input {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-align: center;
  direction: ltr;
}

/* ── Error message ── */
.auth-error {
  font-size: 0.85rem;
  color: #b81414;
  background: rgba(184, 20, 20, 0.06);
  border: 1px solid rgba(184, 20, 20, 0.18);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── Submit button ── */
.auth-submit {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  background: #b81414;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s;
  margin-top: 0.5rem;
  text-align: center;
  text-decoration: none;
  line-height: 1.5;
  -webkit-appearance: none;
}

.auth-submit:hover {
  background: #9a1010;
  box-shadow: 0 4px 18px rgba(184, 20, 20, 0.28);
  color: #ffffff;
}

.auth-submit:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* ── Footer links ── */
.auth-links {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.875rem;
}

.auth-links a {
  color: #b81414;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.auth-links a:hover {
  opacity: 0.7;
}

/* ── Success state ── */
.auth-success {
  text-align: center;
  padding: 0.5rem 0 0.5rem;
}

.auth-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34, 160, 90, 0.1);
  border: 2px solid rgba(34, 160, 90, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #1a9655;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .auth-page {
    padding: 1.25rem 0.75rem;
    align-items: flex-start;
    padding-top: 1.5rem;
    min-height: calc(100vh - 100px);
  }

  .auth-card {
    border-radius: 12px;
  }

  .auth-head {
    padding: 1.5rem 1.5rem 1.25rem;
  }

  .auth-body {
    padding: 1.4rem 1.5rem 1.75rem;
  }

  .auth-logo {
    width: 56px;
    height: 56px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .auth-input,
  .auth-submit,
  .auth-eye,
  .auth-step-dot {
    transition: none;
  }
}
