/* ============================================================
   SKYHOP LOGIN — STYLES
   Palette: SkyHop Red #E8192C · Deep Sky #0A1929 · White
   Fonts: Outfit (display) + Plus Jakarta Sans (body)
   ============================================================ */

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

:root {
  --red:        #E8192C;
  --red-dark:   #C0121F;
  --red-light:  #FF3347;
  --sky-deep:   #0A1929;
  --sky-mid:    #132F4C;
  --sky-light:  #1E4976;
  --white:      #FFFFFF;
  --off-white:  #F7F9FC;
  --gray-100:   #EEF2F7;
  --gray-300:   #C5CDD8;
  --gray-500:   #7A8899;
  --gray-700:   #3D4F63;
  --card-bg:    rgba(255, 255, 255, 0.97);
  --shadow-lg:  0 32px 80px rgba(10, 25, 41, 0.45), 0 8px 24px rgba(10, 25, 41, 0.25);
  --shadow-btn: 0 8px 24px rgba(232, 25, 44, 0.45);
  --radius-card: 20px;
  --radius-input: 10px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  color: var(--gray-700);
  overflow: hidden;
}

/* ── BACKGROUND SCENE ─────────────────────────────────────── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-aircraft {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
  filter: brightness(0.75) saturate(1.1);
  transform: scale(1.04);
  animation: bgDrift 20s ease-in-out infinite alternate;
}

@keyframes bgDrift {
  from { transform: scale(1.04) translateX(0); }
  to   { transform: scale(1.08) translateX(-1.5%); }
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(10,25,41,0.72) 0%, rgba(10,25,41,0.35) 50%, rgba(10,25,41,0.55) 100%),
    linear-gradient(to bottom, rgba(10,25,41,0.2) 0%, rgba(10,25,41,0.6) 100%);
}

/* Particles */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

/* ── TOP BAR ──────────────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  background: linear-gradient(to bottom, rgba(10,25,41,0.7) 0%, transparent 100%);
  animation: fadeDown 0.6s ease both;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.top-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-logo-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 8px rgba(232,25,44,0.5));
}

.top-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

.top-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* ── LOGIN STAGE ──────────────────────────────────────────── */
.login-stage {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 32px;
  gap: 48px;
}

/* ── SIDE PANEL (desktop only) ────────────────────────────── */
.side-panel {
  display: none;
  flex: 0 0 340px;
  animation: slideInLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.side-content {
  color: var(--white);
}

.side-badge {
  display: inline-block;
  background: rgba(232,25,44,0.2);
  border: 1px solid rgba(232,25,44,0.4);
  color: #FF6B7A;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.side-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.side-body {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  margin-bottom: 36px;
  max-width: 280px;
}

.side-stats {
  display: flex;
  gap: 28px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

/* ── LOGIN CARD ───────────────────────────────────────────── */
.login-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  animation: cardRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  overflow: hidden;
}

@keyframes cardRise {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Subtle top accent line */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), #FF6B7A, var(--red));
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(232,25,44,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── CARD LOGO ────────────────────────────────────────────── */
.card-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.logo-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(232,25,44,0.35));
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 4px 12px rgba(232,25,44,0.35)); }
  50%       { filter: drop-shadow(0 4px 20px rgba(232,25,44,0.6)); }
}

.logo-mark svg {
  width: 100%;
  height: 100%;
}

.logo-text-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-word {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--sky-deep);
  letter-spacing: -1px;
  line-height: 1;
}

.logo-accent {
  color: var(--red);
}

.logo-sub {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ── CARD DIVIDER ─────────────────────────────────────────── */
.card-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.card-divider::before,
.card-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-100);
}

.card-divider span {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* ── FORM ─────────────────────────────────────────────────── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.field-group label svg {
  width: 14px;
  height: 14px;
  color: var(--gray-500);
  flex-shrink: 0;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-input);
  background: var(--off-white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  color: var(--sky-deep);
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.input-wrap input::placeholder {
  color: var(--gray-300);
  font-weight: 400;
}

.input-wrap input:focus {
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(232,25,44,0.1);
}

.input-wrap input:focus + .toggle-pw,
.input-wrap input:focus ~ .input-focus-bar {
  opacity: 1;
}

.input-focus-bar {
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.input-wrap input:focus ~ .input-focus-bar {
  transform: scaleX(1);
}

/* Password toggle */
.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--gray-500);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.toggle-pw:hover { color: var(--red); }

.toggle-pw svg {
  width: 18px;
  height: 18px;
}

/* Field error state */
.field-group.has-error .input-wrap input {
  border-color: var(--red);
  background: #FFF5F6;
  box-shadow: 0 0 0 3px rgba(232,25,44,0.08);
}

.field-error {
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 4px;
  padding-left: 2px;
}

.field-group.has-error .field-error {
  display: flex;
  animation: shakeIn 0.3s ease;
}

@keyframes shakeIn {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}

/* ── FORM OPTIONS ─────────────────────────────────────────── */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  user-select: none;
}

.remember-me input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gray-300);
  border-radius: 5px;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.remember-me input:checked + .checkmark {
  background: var(--red);
  border-color: var(--red);
}

.remember-me input:checked + .checkmark::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

.forgot-link {
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

.forgot-link:hover {
  color: var(--red-dark);
  text-decoration: underline;
}

/* ── LOGIN BUTTON ─────────────────────────────────────────── */
.btn-login {
  position: relative;
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-input);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-btn);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  overflow: hidden;
  margin-top: 4px;
}

.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(232,25,44,0.55);
}

.btn-login:hover::before { opacity: 1; }

.btn-login:active {
  transform: translateY(0);
  box-shadow: var(--shadow-btn);
}

.btn-login.loading .btn-text,
.btn-login.loading .btn-arrow {
  opacity: 0;
}

.btn-login.loading .btn-loader {
  display: flex;
}

.btn-text {
  transition: opacity var(--transition);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: opacity var(--transition), transform var(--transition);
}

.btn-login:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-loader {
  display: none;
  position: absolute;
  align-items: center;
  justify-content: center;
}

.btn-loader svg {
  width: 22px;
  height: 22px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── TOAST ────────────────────────────────────────────────── */
.login-toast {
  display: none;
  align-items: center;
  gap: 8px;
  background: #FFF0F1;
  border: 1px solid rgba(232,25,44,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red-dark);
  font-weight: 500;
  animation: toastIn 0.3s ease;
}

.login-toast.show {
  display: flex;
}

.login-toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--red);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CARD FOOTER ──────────────────────────────────────────── */
.card-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
  text-align: center;
  font-size: 11.5px;
  color: var(--gray-500);
  font-weight: 400;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (min-width: 900px) {
  .side-panel {
    display: block;
  }

  .login-stage {
    justify-content: center;
    gap: 64px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px 28px;
    border-radius: 16px;
  }

  .top-bar {
    padding: 14px 20px;
  }

  .top-tagline {
    display: none;
  }

  .side-headline {
    font-size: 36px;
  }

  html, body {
    overflow: auto;
  }
}

/* ── SUCCESS STATE ────────────────────────────────────────── */
.login-card.success-state {
  animation: successPulse 0.5s ease;
}

@keyframes successPulse {
  0%   { box-shadow: var(--shadow-lg); }
  50%  { box-shadow: 0 0 0 8px rgba(34,197,94,0.15), var(--shadow-lg); }
  100% { box-shadow: var(--shadow-lg); }
}

.btn-login.success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 8px 24px rgba(22,163,74,0.4);
}