/* ==========================================================================
   Password Page — Creative Design
   ========================================================================== */
.password-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #6B1509;
}

/* ==========================================================================
   Floating Orbs (background decoration)
   ========================================================================== */
.pw-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.pw-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  will-change: transform;
}

.pw-orb--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(215, 38, 16, 0.5) 0%, transparent 70%);
  top: -5%;
  right: -5%;
}

.pw-orb--2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 120, 80, 0.3) 0%, transparent 70%);
  bottom: 10%;
  left: -8%;
}

.pw-orb--3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  top: 40%;
  right: 15%;
}

.pw-orb--4 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(133, 28, 15, 0.6) 0%, transparent 70%);
  bottom: -5%;
  right: 30%;
}

.pw-orb--5 {
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 180, 150, 0.15) 0%, transparent 70%);
  top: 15%;
  left: 20%;
}

/* ==========================================================================
   Main Layout
   ========================================================================== */
.pw {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(160deg, #851C0F 0%, #B71E0D 40%, #D72610 100%);
  padding: 2rem var(--container-padding, 1.875rem);
}

/* Success flash overlay */
.pw__success-flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  z-index: 100;
  pointer-events: none;
}

/* ==========================================================================
   Glassmorphism Card
   ========================================================================== */
.pw__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  width: 100%;
  max-width: 460px;
  padding: 3rem 2.5rem;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Logo — matches homepage header position
   ========================================================================== */
.pw__logo {
  position: absolute;
  top: 0;
  left: 58px;
  z-index: 10;
  display: block;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.pw__logo:hover {
  opacity: 0.8;
}

.pw__logo-img {
  width: 63px;
  height: auto;
}

/* ==========================================================================
   Lock Icon
   ========================================================================== */
.pw__lock {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
}

.pw__lock-svg {
  width: 64px;
  height: 64px;
  position: relative;
  z-index: 1;
}

/* Pulse ring behind lock */
.pw__lock-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Divider
   ========================================================================== */
.pw__divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  border-radius: 1px;
  transform-origin: center;
}

/* ==========================================================================
   Error
   ========================================================================== */
.pw__error {
  background: rgba(255, 80, 60, 0.2);
  border: 1px solid rgba(255, 80, 60, 0.3);
  color: var(--color-text-inverse, #fff);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  width: 100%;
  text-align: center;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Form
   ========================================================================== */
.pw__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.pw__label {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: clamp(1.375rem, 2.5vw, 1.625rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text-inverse, #fff);
  letter-spacing: -0.02em;
  text-align: center;
}

.pw__sublabel {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  line-height: 1.4;
  margin-top: -0.25rem;
}

/* ==========================================================================
   Input
   ========================================================================== */
.pw__input-wrap {
  position: relative;
  width: 100%;
  margin-top: 0.25rem;
}

.pw__input-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}

.pw__input {
  width: 100%;
  padding: 0.9375rem 3rem 0.9375rem 2.75rem;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9375rem;
  font-weight: 400;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  letter-spacing: 0.02em;
}

.pw__input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.pw__input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

/* Eye toggle */
.pw__toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw__toggle:hover {
  color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   Submit Button
   ========================================================================== */
.pw__submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.9375rem 2rem;
  margin-top: 0.5rem;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary, #D72610);
  background: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.pw__submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(215, 38, 16, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pw__submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.1);
}

.pw__submit:hover::before {
  opacity: 1;
}

.pw__submit:active {
  transform: translateY(0);
}

.pw__submit-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.pw__submit:hover .pw__submit-arrow {
  transform: translateX(4px);
}

/* Loading state */
.pw__submit--loading {
  pointer-events: none;
  opacity: 0.7;
}

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

.pw__submit--loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(215, 38, 16, 0.2);
  border-top-color: var(--color-primary, #D72610);
  border-radius: 50%;
  animation: pw-spin 0.6s linear infinite;
}

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

/* ==========================================================================
   Responsive — Tablet (≥ 768px)
   ========================================================================== */
@media (min-width: 768px) {
  .pw__card {
    padding: 3.5rem 3rem;
    gap: 2rem;
    border-radius: 24px;
  }

  .pw__logo-img {
    width: 63px;
  }

  .pw-orb--1 {
    width: 400px;
    height: 400px;
  }

  .pw-orb--2 {
    width: 350px;
    height: 350px;
  }
}

/* ==========================================================================
   Responsive — Mobile (≤ 639px)
   ========================================================================== */
@media (max-width: 639px) {
  .pw {
    padding: 1.5rem 1rem;
    align-items: center;
  }

  .pw__logo {
    left: var(--container-padding, 1rem);
  }

  .pw__logo-img {
    width: 40px;
  }

  .pw__card {
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    border-radius: 16px;
    max-width: 100%;
  }

  .pw__lock {
    width: 70px;
    height: 70px;
  }

  .pw__lock-svg {
    width: 48px;
    height: 48px;
  }

  .pw__label {
    font-size: 1.25rem;
  }

  .pw__sublabel {
    font-size: 0.8125rem;
  }

  .pw__input {
    padding: 0.8125rem 2.75rem 0.8125rem 2.5rem;
    font-size: 0.875rem;
    border-radius: 10px;
  }

  .pw__input-icon svg {
    width: 16px;
    height: 16px;
  }

  .pw__submit {
    padding: 0.8125rem 1.5rem;
    font-size: 0.8125rem;
    border-radius: 10px;
  }

  .pw-orb {
    filter: blur(40px);
  }

  .pw-orb--1 { width: 180px; height: 180px; }
  .pw-orb--2 { width: 150px; height: 150px; }
  .pw-orb--3 { width: 100px; height: 100px; }
  .pw-orb--4 { width: 130px; height: 130px; }
  .pw-orb--5 { width: 90px; height: 90px; }
}

/* ==========================================================================
   Small phones (≤ 380px)
   ========================================================================== */
@media (max-width: 380px) {
  .pw__card {
    padding: 1.5rem 1.25rem;
    gap: 1rem;
  }

  .pw__lock {
    width: 56px;
    height: 56px;
  }

  .pw__lock-svg {
    width: 40px;
    height: 40px;
  }

  .pw__form {
    gap: 0.75rem;
  }
}
