/* ═══════════════════════════════════════════════════════════════
   login.css  —  OAF Premium Login Page  (Light theme / RTL)
   Layered aurora + glassmorphism + micro-interactions
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset body for full-bleed login ─── */
body.login-page {
  background: #061c33;
  overflow: hidden;
  display: block;
}

/* ══════════════════════════════════════
   SPLASH SCREEN
══════════════════════════════════════ */
.splash-overlay {
  position: fixed;
  inset: 0;
  background: #061c33;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1),
              transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.splash-overlay.hide {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

/* Splash aurora rings */
.splash-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: splashRingPulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
.splash-ring-1 {
  width: 160px; height: 160px;
  border-color: rgba(255,107,53,0.45);
  animation-delay: 0s;
}
.splash-ring-2 {
  width: 220px; height: 220px;
  border-color: rgba(255,107,53,0.25);
  animation-delay: 0.4s;
}
.splash-ring-3 {
  width: 290px; height: 290px;
  border-color: rgba(255,107,53,0.12);
  animation-delay: 0.8s;
}
@keyframes splashRingPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: 0.5; }
}

.splash-logo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255,107,53,0.18), transparent 70%),
              rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 40px rgba(255,107,53,0.2),
              inset 0 1px 0 rgba(255,255,255,0.12);
  animation: splashLogoBounce 0.8s cubic-bezier(0.34,1.56,0.64,1) forwards;
  opacity: 0;
}
@keyframes splashLogoBounce {
  from { opacity: 0; transform: scale(0.6) translateY(20px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.splash-logo {
  width: 64px;
  filter: brightness(0) invert(1) drop-shadow(0 0 14px rgba(255,107,53,0.6));
}

.splash-title {
  margin-top: 1.8rem;
  color: #fff;
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: splashTextIn 0.7s 0.55s ease forwards;
  position: relative;
  z-index: 1;
}
@keyframes splashTextIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash-tagline {
  margin-top: 0.35rem;
  color: rgba(255,255,255,0.45);
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  animation: splashTextIn 0.7s 0.8s ease forwards;
  position: relative;
  z-index: 1;
}

.splash-bar-wrap {
  margin-top: 2.2rem;
  width: 120px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: splashTextIn 0.5s 1s ease forwards;
}
.splash-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF6B35, #ff9a6c);
  border-radius: 99px;
  animation: splashBarFill 1.2s 1s ease forwards;
}
@keyframes splashBarFill {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ══════════════════════════════════════
   AURORA BACKGROUND CANVAS LAYER
══════════════════════════════════════ */
.aurora-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Layered mesh-gradient aurora blobs */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  will-change: transform, opacity;
}
.aurora-blob-1 {
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(11,42,74,0.9) 0%, transparent 70%);
  top: -300px; right: -200px;
  animation: auroraFloat1 18s ease-in-out infinite;
}
.aurora-blob-2 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(26,77,128,0.55) 0%, transparent 65%);
  bottom: -200px; left: -150px;
  animation: auroraFloat2 22s ease-in-out infinite;
}
.aurora-blob-3 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,107,53,0.12) 0%, transparent 70%);
  top: 40%; left: 30%;
  animation: auroraFloat3 16s ease-in-out infinite;
}
.aurora-blob-4 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(11,42,74,0.6) 0%, transparent 65%);
  bottom: 10%; right: 10%;
  animation: auroraFloat4 20s ease-in-out infinite;
}

@keyframes auroraFloat1 {
  0%,100% { transform: translate(0,0) scale(1); opacity: 1; }
  33%      { transform: translate(-60px, 80px) scale(1.1); opacity: 0.85; }
  66%      { transform: translate(40px, -40px) scale(0.95); opacity: 0.9; }
}
@keyframes auroraFloat2 {
  0%,100% { transform: translate(0,0) scale(1); opacity: 1; }
  40%      { transform: translate(80px, -60px) scale(1.08); opacity: 0.8; }
  70%      { transform: translate(-30px, 50px) scale(0.92); opacity: 0.95; }
}
@keyframes auroraFloat3 {
  0%,100% { transform: translate(0,0) scale(1); opacity: 1; }
  50%      { transform: translate(-50px, 60px) scale(1.15); opacity: 0.6; }
}
@keyframes auroraFloat4 {
  0%,100% { transform: translate(0,0) scale(1); opacity: 1; }
  45%      { transform: translate(60px, -80px) scale(1.2); opacity: 0.7; }
}

/* Fine grid noise texture overlay */
.aurora-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

/* ══════════════════════════════════════
   LOGIN WRAPPER  (full-page split)
══════════════════════════════════════ */
.lp-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Visual (left/brand) side ── */
.lp-visual {
  flex: 1.15;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 4.5rem;
  position: relative;
  overflow: hidden;
}

/* Vertical glow rule separating sides */
.lp-visual::after {
  content: '';
  position: absolute;
  top: 10%; bottom: 10%;
  left: 0;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent,
    rgba(255,107,53,0.3) 40%,
    rgba(255,107,53,0.3) 60%,
    transparent);
}

/* Floating accent orbs inside visual side */
.lp-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: orbFloat linear infinite;
  will-change: transform, opacity;
}

.lp-visual-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.lp-brand-lock {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.lp-brand-logo-ring {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.lp-brand-logo-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #FF6B35 0%, transparent 40%, transparent 80%, #FF6B35 100%);
  animation: logoRingSpin 6s linear infinite;
  opacity: 0.7;
}
.lp-brand-logo-ring::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: #061c33;
}
@keyframes logoRingSpin {
  to { transform: rotate(360deg); }
}
.lp-brand-logo-ring img {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255,107,53,0.4));
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

.lp-brand-name {
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.lp-brand-name strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.lp-hero-heading {
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
  opacity: 0;
  animation: lp-fadeUp 0.8s 0.2s ease forwards;
}
.lp-hero-heading em {
  font-style: normal;
  color: #FF6B35;
}

.lp-hero-para {
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(248,250,252,0.8);
  line-height: 1.9;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  max-width: 440px;
  opacity: 0;
  animation: lp-fadeUp 0.8s 0.4s ease forwards;
}

/* Feature badges row */
.lp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2.2rem;
  opacity: 0;
  animation: lp-fadeUp 0.8s 0.6s ease forwards;
}
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.lp-badge:hover {
  background: rgba(255,107,53,0.15);
  border-color: rgba(255,107,53,0.4);
  color: #fff;
}
.lp-badge i {
  color: #FF6B35;
  font-size: 0.75rem;
}

@keyframes lp-fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes orbFloat {
  0%   { transform: translateY(0)    rotate(0deg);   }
  25%  { transform: translateY(-28px) rotate(6deg);  }
  50%  { transform: translateY(-12px) rotate(-4deg); }
  75%  { transform: translateY(-36px) rotate(5deg);  }
  100% { transform: translateY(0)    rotate(0deg);   }
}

/* ── Form side ── */
.lp-form-side {
  flex: 0 0 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2.5rem;
  position: relative;
}

/* ── Glassmorphism card ── */
.lp-card {
  width: 100%;
  max-width: 430px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow:
    0 40px 80px -20px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 1px 0 rgba(255,255,255,0.2) inset;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: cardEntry 0.8s 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

/* Gradient border glow (top edge highlight) */
.lp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,107,53,0.6), rgba(255,255,255,0.35), rgba(255,107,53,0.6), transparent);
  border-radius: 1px;
}

/* Subtle inner glow at top-right corner */
.lp-card::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,107,53,0.1) 0%, transparent 65%);
  pointer-events: none;
  border-radius: 50%;
}

@keyframes cardEntry {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Card logo area */
.lp-card-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.8rem;
}
.lp-card-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.15);
  box-shadow:
    0 0 0 8px rgba(255,107,53,0.06),
    0 0 24px rgba(255,107,53,0.12);
  transition: box-shadow 0.3s;
  text-decoration: none;
}
.lp-card-logo a:hover {
  box-shadow:
    0 0 0 8px rgba(255,107,53,0.1),
    0 0 36px rgba(255,107,53,0.22);
}
.lp-card-logo img {
  width: 52px;
  filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255,107,53,0.45));
}

/* Card titles */
.lp-card-title {
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 0.3rem;
  margin-top: 0.8rem;
}
.lp-card-subtitle {
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(203,213,225,0.75);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Alert */
#loginAlert {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  color: #fca5a5;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
  display: none;
  backdrop-filter: blur(8px);
}
#loginAlert.show {
  display: block;
  animation: alertShake 0.5s cubic-bezier(0.36,0.07,0.19,0.97) both;
}
@keyframes alertShake {
  10%,90% { transform: translateX(-3px); }
  20%,80% { transform: translateX(4px);  }
  30%,50%,70% { transform: translateX(-4px); }
  40%,60% { transform: translateX(4px);  }
}

/* ── Input Groups (floating label style) ── */
.lp-field {
  position: relative;
  margin-bottom: 1.35rem;
}

.lp-field-inner {
  position: relative;
  display: flex;
  align-items: center;
}

.lp-field-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.35);
  font-size: 0.9rem;
  pointer-events: none;
  transition: color 0.25s;
  z-index: 2;
}

.lp-input {
  width: 100%;
  padding: 0.95rem 2.75rem 0.95rem 3rem; /* icon space on both sides */
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  color: #fff;
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  direction: rtl;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s, transform 0.2s;
  outline: none;
  caret-color: #FF6B35;
  -webkit-appearance: none;
}
.lp-input::placeholder {
  color: rgba(255,255,255,0.3);
}
.lp-input:-webkit-autofill,
.lp-input:-webkit-autofill:hover,
.lp-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(11,42,74,0.85) inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #FF6B35;
  border-color: rgba(255,255,255,0.2) !important;
}

.lp-field-inner:focus-within .lp-field-icon {
  color: #FF6B35;
}
.lp-input:focus {
  border-color: rgba(255,107,53,0.7);
  background: rgba(255,255,255,0.09);
  box-shadow:
    0 0 0 4px rgba(255,107,53,0.15),
    0 0 20px rgba(255,107,53,0.08);
  transform: scale(1.008);
}

/* floating label above input */
.lp-label {
  display: block;
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(203,213,225,0.75);
  margin-bottom: 0.4rem;
  text-align: right;
  transition: color 0.25s;
}
.lp-field:focus-within .lp-label {
  color: rgba(255,107,53,0.9);
}

/* Password toggle button */
.lp-pw-toggle {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
  padding: 0.25rem;
  transition: color 0.25s;
  z-index: 2;
  line-height: 1;
}
.lp-pw-toggle:hover,
.lp-pw-toggle:focus {
  color: rgba(255,255,255,0.7);
  outline: none;
}

/* ── Submit button ── */
.lp-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #FF6B35 0%, #e85d2a 60%, #c44b1f 100%);
  color: #fff;
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  letter-spacing: 0.02em;
  box-shadow:
    0 8px 24px rgba(255,107,53,0.4),
    0 2px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.2s,
              background 0.2s;
  position: relative;
  overflow: hidden;
}

/* Shine sweep */
.lp-submit::before {
  content: '';
  position: absolute;
  top: 0; left: -70%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  animation: btnShine 3.5s 1.2s ease-in-out infinite;
}
@keyframes btnShine {
  0%        { left: -70%; }
  30%,100%  { left: 130%; }
}

.lp-submit:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 14px 32px rgba(255,107,53,0.5),
    0 4px 8px rgba(0,0,0,0.25);
}
.lp-submit:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 4px 12px rgba(255,107,53,0.35);
}
.lp-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

/* ── Divider ── */
.lp-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}
.lp-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

/* ── Footer inside card ── */
.lp-card-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-family: 'Avenir Next Arabic', 'Cairo', sans-serif;
  font-size: 0.72rem;
  color: rgba(148,163,184,0.6);
  line-height: 1.8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.lp-card-footer i {
  color: rgba(255,107,53,0.6);
  font-size: 0.75rem;
}

/* ══════════════════════════════════════
   RESPONSIVE — mobile stacked layout
══════════════════════════════════════ */
@media (max-width: 900px) {
  body.login-page { overflow: auto; }

  .lp-wrapper {
    flex-direction: column;
    min-height: 100vh;
  }
  .lp-visual {
    flex: none;
    padding: 3rem 2rem 2.5rem;
    align-items: center;
    text-align: center;
  }
  .lp-visual::after { display: none; }
  .lp-visual-content { max-width: 100%; }
  .lp-brand-lock { justify-content: center; }
  .lp-hero-heading { font-size: 1.6rem; }
  .lp-badges { justify-content: center; }

  .lp-form-side {
    flex: none;
    padding: 1.5rem 1.25rem 3rem;
  }
  .lp-card { padding: 2.2rem 1.75rem; }
}

@media (max-width: 480px) {
  .lp-hero-heading { font-size: 1.35rem; }
  .lp-card { border-radius: 22px; }
  .lp-submit { font-size: 0.95rem; }
}

/* ══════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .aurora-blob,
  .lp-orb,
  .splash-ring,
  .lp-brand-logo-ring::before,
  .lp-submit::before {
    animation: none !important;
  }
  /* Make static elements immediately visible */
  .splash-logo-wrap,
  .splash-title,
  .splash-tagline,
  .splash-bar-wrap,
  .lp-card,
  .lp-hero-heading,
  .lp-hero-para,
  .lp-badges {
    opacity: 1 !important;
    transform: none !important;
  }
}
