/* ============================================================
   FEH Kuwait — Login Page
   Centered card · Dark bg · Rounded · Responsive
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Full-page dark green bg — particles render on top */
  background: linear-gradient(155deg, #061209 0%, #0f2e1a 35%, #1a5c3a 70%, #1D6644 100%);
  min-height: 100vh;
}

/* ── Particles cover full page bg ───────────────────────────── */
#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Warm gold radial glow top-right of viewport */
body::after {
  content: '';
  position: fixed;
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(200,160,90,0.10) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── Outer wrapper — centers the card ───────────────────────── */
.lp {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  overflow: hidden;
}

/* ── The card ────────────────────────────────────────────────── */
.lp__card {
  display: flex;
  width: 100%;
  max-width: 860px;
  min-height: 520px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 8px 24px rgba(0,0,0,0.30),
    0 32px 80px rgba(0,0,0,0.40);
}

/* ── Left: Brand panel ───────────────────────────────────────── */
.lp__left {
  width: 42%;
  flex-shrink: 0;
  background: #F0E6CC;   /* cream fallback while images load */
  border-right: 1px solid rgba(160,110,35,0.18);
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 24px;
  overflow: hidden;
}

/* ── Slideshow ───────────────────────────────────────────────── */
.lp__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.lp__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1200ms ease-in-out;
}
.lp__slide.is-active { opacity: 1; }

.lp__slide--1 { background-image: url('../img/login-1.jpg'); }
.lp__slide--2 { background-image: url('../img/login-2.jpeg'); }
.lp__slide--3 { background-image: url('../img/login-3.jpg'); }

/* Cream wash — softens the photo so it reads as atmosphere, not focal point */
.lp__slides::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(242,232,208,0.52);
  z-index: 1;
}

/* ── Brand card — frosted cream, inset from panel edges ─────── */
.lp__brand {
  position: relative;
  z-index: 2;
  flex: 1;                         /* stretch to fill the padded area */
  background: rgba(254,250,242,0.53);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(160,110,35,0.18);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 32px;
}

.lp__emblem {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  margin-bottom: 22px;
  background: url('../img/logo.svg') center/contain no-repeat;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.lp__divider {
  width: 36px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(140,90,20,0.48), transparent);
  margin: 0 auto 20px;
}

.lp__org-name {
  font-size: 1.85rem;
  font-weight: 800;
  color: #1E1006;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  /* Whisper-thin warm outline — lifts text off the photo without noise */
  -webkit-text-stroke: 0.35px rgba(160,100,20,0.28);
  text-shadow:
    0 1px 2px rgba(255,248,228,0.55),
    0 2px 6px rgba(0,0,0,0.07);
}

.lp__org-sub {
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(80,50,14,0.72);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

/* ── Right: Form panel ───────────────────────────────────────── */
.lp__right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  background: #FDF8F0;
  position: relative;
  overflow: hidden;
}

/* Subtle pattern accent bottom-right of form panel */
.lp__right::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 220px;
  height: 220px;
  background-image: url('../img/bg_pattern.svg');
  background-size: 220px 220px;
  background-repeat: no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

.lp__form-wrap {
  width: 100%;
  max-width: 340px;
  position: relative;
  z-index: 1;
}

/* Form header */
.lp__form-header { margin-bottom: 26px; }

.lp__form-mark {
  width: 22px;
  height: 3px;
  background: #C8A05A;
  border-radius: 2px;
  margin-bottom: 18px;
}

.lp__form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin-bottom: 5px;
}

.lp__form-sub {
  font-size: 0.855rem;
  color: #6B7280;
  font-weight: 400;
  line-height: 1.5;
}

/* Error */
.lp__alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  color: #991B1B;
  font-size: 0.8125rem;
  line-height: 1.45;
  margin-bottom: 18px;
}
.lp__alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }

/* Fields */
.lp__field { margin-bottom: 16px; }

.lp__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.lp__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.lp__label-row .lp__label { margin-bottom: 0; }

.lp__forgot {
  font-size: 0.75rem;
  color: #1D6644;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 140ms;
}
.lp__forgot:hover { opacity: 1; text-decoration: underline; }

.lp__input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid #C9BAA0;
  border-radius: 8px;
  background: #FFFDF8;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #111827;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
  -webkit-appearance: none;
  appearance: none;
}
.lp__input::placeholder { color: #9CA3AF; font-size: 0.875rem; }

/* Hide number spinners — numeric validation kept, arrows removed */
.lp__input[type="number"]::-webkit-outer-spin-button,
.lp__input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lp__input[type="number"] { -moz-appearance: textfield; }
.lp__input:focus {
  border-color: #A87830;
  background: #F5EDD8;
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.06),
    0 0 0 3px rgba(168,120,48,0.11);
}
.lp__input.is-error { border-color: #EF4444; }
.lp__input.is-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

.lp__input-wrap { position: relative; }
.lp__input-wrap .lp__input { padding-right: 46px; }

.lp__eye {
  position: absolute;
  right: 0; top: 0;
  height: 100%; width: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  color: #9CA3AF; cursor: pointer;
  border-radius: 0 8px 8px 0;
  transition: color 140ms;
  line-height: 0;
}
.lp__eye:hover { color: #374151; }
.lp__eye svg { width: 17px; height: 17px; }

/* Button */
.lp__btn {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 20px;
  background: #1D6644;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  margin-top: 8px;
  transition: background 150ms, box-shadow 150ms, transform 80ms;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10), 0 4px 14px rgba(29,102,68,0.22);
}
.lp__btn:hover:not(:disabled) {
  background: #155A3A;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12), 0 6px 18px rgba(29,102,68,0.28);
  transform: translateY(-1px);
}
.lp__btn:active:not(:disabled) { transform: translateY(0); }
.lp__btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Footer */
.lp__footer {
  margin-top: 22px;
  font-size: 0.75rem;
  color: #9CA3AF;
  text-align: center;
}
.lp__footer a { color: #1D6644; text-decoration: none; }
.lp__footer a:hover { text-decoration: underline; }

/* ── Card entrance animation ─────────────────────────────────── */
@keyframes lp-card-in {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lp-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lp__card {
  animation: lp-card-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lp__form-wrap {
  animation: lp-fade-up 480ms cubic-bezier(0.22, 1, 0.36, 1) 180ms both;
}

/* Exit: card scales out + fades when signing in */
.lp.is-entering {
  pointer-events: none;
}
.lp.is-entering .lp__card {
  transition: transform 460ms cubic-bezier(0.45, 0, 0.55, 1), opacity 460ms;
  transform: scale(0.96) translateY(-8px);
  opacity: 0;
}

/* Spinner inside submit button */
.lp__btn .lp__spin {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lp-spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 6px;
}
@keyframes lp-spin { to { transform: rotate(360deg); } }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 720px) {
  .lp { padding: 0; align-items: stretch; }

  .lp__card {
    flex-direction: column;
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
  }

  .lp__left {
    width: 100%;
    min-height: 240px;
    flex-shrink: 0;
    padding: 16px;
  }

  .lp__brand { padding: 28px 22px; border-radius: 10px; }

  .lp__emblem { width: 120px; height: 120px; margin-bottom: 14px; }

  .lp__org-name { font-size: 1.25rem; }

  .lp__right { padding: 36px 28px; flex: 1; }

  .lp__form-wrap { max-width: 440px; }
}

@media (max-width: 480px) {
  .lp__left { min-height: 190px; padding: 14px; }

  .lp__brand { padding: 20px 18px; border-radius: 8px; }

  .lp__emblem { width: 100px; height: 100px; margin-bottom: 10px; }

  .lp__org-name { font-size: 1.125rem; }

  .lp__org-sub { display: none; }

  .lp__right { padding: 28px 20px; }

  .lp__form-title { font-size: 1.375rem; }

  .lp__form-wrap { max-width: 100%; }
}
