/* auth.css — Login / Register — phone, iPhone, iPad, desktop */

.auth-page {
  min-height: 100dvh;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-ar);
  background: #0f0f10;
  color: #f5f5f5;
  overflow-x: hidden;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100dvh;
  min-height: 100vh;
  width: 100%;
}

/* ——— Brand / photo panel ——— */
.auth-cover {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(15,15,16,0.75) 0%, rgba(167,28,32,0.55) 55%, rgba(15,15,16,0.9) 100%),
    url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
}
.auth-cover::before {
  content: 'BL';
  position: absolute;
  font-size: clamp(8rem, 22vw, 16rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  color: rgba(255,255,255,0.06);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: authWatermark 12s ease-in-out infinite alternate;
}
.auth-cover-content {
  position: relative;
  z-index: 2;
  max-width: 420px;
  text-align: center;
  animation: authFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.auth-cover-logo {
  width: 72px;
  height: 72px;
  border-radius: 22%;
  object-fit: contain;
  margin: 0 auto 24px;
  display: block;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  animation: authFloat 5s ease-in-out infinite;
}
.auth-cover h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.35;
  margin: 0 0 14px;
  font-weight: 800;
  color: #fff;
}
.auth-cover p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.78);
}

/* Floating orbs */
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  pointer-events: none;
  animation: authOrb 10s ease-in-out infinite alternate;
}
.auth-orb-1 { width: 220px; height: 220px; background: #A71C20; top: 10%; right: 8%; }
.auth-orb-2 { width: 160px; height: 160px; background: #1E6B47; bottom: 12%; left: 10%; animation-delay: -3s; }

/* ——— Form panel ——— */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: #121214;
  position: relative;
  z-index: 1;
  animation: authFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.auth-form-inner {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.auth-mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.auth-mobile-brand img {
  width: 44px;
  height: 44px;
  border-radius: 22%;
  background: #ffffff;
  padding: 8px;
  object-fit: contain;
}
.auth-mobile-brand strong {
  font-size: 1.25rem;
  color: #E23B3F;
  font-weight: 800;
}

.auth-form-panel h2 {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  margin: 0 0 8px;
  font-weight: 800;
  color: #fff;
}
.auth-subtitle {
  margin: 0 0 28px;
  color: rgba(255,255,255,0.62);
  font-size: 0.95rem;
  line-height: 1.6;
}

.auth-social {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12);
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.auth-social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.auth-social-google { background: #fff; color: #222; }
.auth-social-apple { background: #000; color: #fff; border-color: #333; }

.auth-divider {
  display: flex;
  align-items: center;
  margin: 22px 0;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.12);
}
.auth-divider span { padding: 0 12px; white-space: nowrap; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  width: 100%;
  min-width: 0;
}
.auth-field label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
}
.auth-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.auth-field-row a {
  font-size: 12px;
  color: #E23B3F;
  font-weight: 700;
  white-space: nowrap;
}

.auth-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #1a1a1d;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.auth-input:focus {
  border-color: #A71C20;
  box-shadow: 0 0 0 3px rgba(167,28,32,0.25);
  background: #1f1f23;
}
.auth-input::placeholder { color: rgba(255,255,255,0.3); }

.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: 100%;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 20px;
}
.auth-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #A71C20;
}
.auth-check label {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}
.auth-check a { color: #E23B3F; font-weight: 700; }

.auth-submit {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #E23B3F, #A71C20);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(167,28,32,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(167,28,32,0.45);
}
.auth-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.auth-footer {
  text-align: center;
  margin-top: 22px;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
}
.auth-footer a {
  color: #E23B3F;
  font-weight: 800;
}

.password-strength {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  margin-top: 8px;
  overflow: hidden;
}
.strength-bar {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}

/* ——— Breakpoints ——— */
/* Large phones / small tablets */
@media (min-width: 480px) {
  .auth-form-panel { padding: 36px 28px 48px; }
  .auth-grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* iPad portrait / tablets */
@media (min-width: 768px) {
  .auth-layout {
    grid-template-columns: minmax(380px, 440px) 1fr;
  }
  .auth-cover { display: flex; order: 2; }
  .auth-form-panel { order: 1; padding: 40px 36px; }
  .auth-mobile-brand { display: none; }
  .auth-form-inner { max-width: 400px; }
}

/* iPad landscape / laptop */
@media (min-width: 1024px) {
  .auth-layout {
    grid-template-columns: minmax(420px, 480px) 1fr;
  }
  .auth-form-panel { padding: 48px 44px; }
  .auth-cover { padding: 48px; }
}

/* Desktop wide */
@media (min-width: 1280px) {
  .auth-layout {
    grid-template-columns: 520px 1fr;
  }
  .auth-form-inner { max-width: 440px; }
}

/* Short screens (landscape phones) */
@media (max-height: 520px) and (orientation: landscape) {
  .auth-cover { display: none; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-form-panel { padding: 20px 16px; }
  .auth-mobile-brand { display: flex; margin-bottom: 16px; }
}

@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes authFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes authOrb {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(20px, -30px) scale(1.15); }
}
@keyframes authWatermark {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.05; }
  to { transform: translate(-48%, -52%) scale(1.05); opacity: 0.09; }
}
