/* ==========================================================================
   auth.css — Login / Register page styling
   Scope: .lp-* (login page) classes only — does not touch global styles
   ========================================================================== */

/* ── Page wrapper ────────────────────────────────────────────────────────── */

.lp-wrap {
  min-height: calc(100dvh - var(--sh-h, 68px));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: #F1F5F9;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.lp-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.07),
    0 20px 50px -12px rgba(15, 23, 42, 0.16);
  padding: 28px 24px 24px;
  direction: rtl;
}

.lp-card--dual {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 16px 40px -24px rgba(15, 23, 42, 0.28);
  border: 1px solid #e8eef5;
}

.lp-title {
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.lp-subtitle {
  margin: 0.4rem 0 1.1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.6;
}

.lp-chooser {
  display: grid;
  gap: 0.7rem;
}

.lp-chooser__card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.8rem;
  row-gap: 0.15rem;
  align-items: center;
  width: 100%;
  text-align: right;
  padding: 0.9rem 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lp-chooser__card:hover {
  border-color: #fdba74;
  background: #fffaf5;
}

.lp-chooser__icon {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 800;
}

.lp-chooser__icon--staff {
  background: #f1f5f9;
  color: #334155;
}

.lp-chooser__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.lp-chooser__desc {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
}

.lp-panel[hidden] {
  display: none !important;
}

.lp-back {
  display: inline-flex;
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.lp-back:hover {
  color: #ea580c;
}

.lp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.lp-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.lp-remember input {
  width: 16px;
  height: 16px;
  accent-color: #f97316;
}

.lp-forgot,
.lp-footer-link a {
  color: #ea580c;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.lp-otp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.lp-link-btn {
  border: 0;
  background: transparent;
  color: #ea580c;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.lp-link-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.lp-footer-link {
  margin: 1rem 0 0;
  text-align: center;
}

/* ── Logo ─────────────────────────────────────────────────────────────────── */

.lp-logo {
  text-align: center;
  margin-bottom: 22px;
}

.lp-logo__img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */

.lp-tabs {
  display: flex;
  gap: 5px;
  background: #F1F5F9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
}

.lp-tab {
  flex: 1;
  display: block;
  text-align: center;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748B;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.lp-tab--active {
  background: #2563EB;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.32);
}

.lp-tab:not(.lp-tab--active):hover {
  background: #E2E8F0;
  color: #1E293B;
}

/* ── Form ─────────────────────────────────────────────────────────────────── */

.lp-form {
  display: grid;
  gap: 12px;
}

.lp-flash {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: 10px;
  padding: 10px 14px;
  color: #DC2626;
  font-size: 0.83rem;
  text-align: right;
}

.lp-hint {
  font-size: 0.81rem;
  color: #64748B;
  text-align: right;
  margin: 0;
  line-height: 1.75;
}

/* ── Field wrapper ────────────────────────────────────────────────────────── */

.lp-field {
  display: grid;
  gap: 6px;
}

.lp-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1E293B;
  text-align: right;
}

/* ── Input — override design-system defaults ─────────────────────────────── */

.lp-form input:not([type="hidden"]),
.lp-field input {
  width: 100%;
  height: 48px;
  border: 1px solid #E2E8F0 !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  font-family: Vazirmatn, 'Segoe UI', Tahoma, sans-serif;
  color: #1E293B;
  background: #ffffff !important;
  outline: none;
  box-shadow: none !important;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Credential / contact fields stay LTR */
.lp-form input[type="email"],
.lp-form input[type="tel"],
.lp-form input[name="username"],
.lp-form input[name="mobile"],
.lp-form input[name="code"],
.lp-form input[type="password"],
.lp-field input[type="email"] {
  direction: ltr;
  text-align: left;
}

.lp-form input:not([type="hidden"]):focus,
.lp-field input:focus {
  border-color: #fdba74 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14) !important;
}

.lp-form input.is-invalid,
.lp-field input.is-invalid {
  border-color: #ef4444 !important;
}

.lp-form input::placeholder,
.lp-field input::placeholder {
  color: #94A3B8;
}

.lp-error {
  font-size: 0.75rem;
  color: #DC2626;
  text-align: right;
}

/* ── Submit button ────────────────────────────────────────────────────────── */

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: Vazirmatn, 'Segoe UI', Tahoma, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
  box-shadow: none;
}

.lp-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  color: #fff;
}

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

/* ── Divider ──────────────────────────────────────────────────────────────── */

.lp-divider {
  position: relative;
  text-align: center;
  margin: 6px 0;
}

.lp-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid #E2E8F0;
}

.lp-divider span {
  position: relative;
  z-index: 1;
  background: #ffffff;
  padding: 0 12px;
  color: #94A3B8;
  font-size: 0.78rem;
}

/* ── Social buttons ───────────────────────────────────────────────────────── */

.lp-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lp-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #ffffff;
  color: #1E293B;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease, transform 0.15s ease;
}

.lp-social:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.09);
}

.lp-social--google:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
}

.lp-social--apple:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0F172A;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .lp-wrap {
    padding: 20px 12px;
    align-items: flex-start;
  }

  .lp-card {
    border-radius: 16px;
    padding: 22px 16px 20px;
  }
}

@media (max-width: 360px) {
  .lp-socials {
    grid-template-columns: 1fr;
  }
}
