/* ============================================
   NALA SUIT - Login Page Styles
   ============================================ */

/* --- Theme: User (default — blue) --- */
.login-page {
  --bg-base: #0a1628;
  --grad-1: #0a1628;
  --grad-2: #1a2a4a;
  --grad-3: #0f2444;
  --grad-4: #162d50;
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --accent-deeper: #1d4ed8;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --orb-1: rgba(59, 130, 246, 0.3);
  --orb-2: rgba(99, 102, 241, 0.25);
  --orb-3: rgba(37, 99, 235, 0.2);
  --radial-1: rgba(59, 130, 246, 0.12);
  --radial-2: rgba(99, 102, 241, 0.1);
  --radial-3: rgba(37, 99, 235, 0.08);
  --link-color: #60a5fa;
  --link-hover: #93bbfd;
}

/* --- Theme: Admin (red/crimson) --- */
.login-page[data-theme="admin"] {
  --bg-base: #1a0a0f;
  --grad-1: #1a0a0f;
  --grad-2: #2d1520;
  --grad-3: #251018;
  --grad-4: #30161f;
  --accent: #e11d48;
  --accent-dark: #be123c;
  --accent-deeper: #9f1239;
  --accent-glow: rgba(225, 29, 72, 0.35);
  --orb-1: rgba(225, 29, 72, 0.3);
  --orb-2: rgba(190, 18, 60, 0.25);
  --orb-3: rgba(159, 18, 57, 0.2);
  --radial-1: rgba(225, 29, 72, 0.12);
  --radial-2: rgba(190, 18, 60, 0.1);
  --radial-3: rgba(159, 18, 57, 0.08);
  --link-color: #fb7185;
  --link-hover: #fda4af;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-base);
}

/* ---------- Animated Background ---------- */
.login-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: linear-gradient(135deg, var(--grad-1) 0%, var(--grad-2) 25%, var(--grad-3) 50%, var(--grad-4) 75%, var(--grad-1) 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.login-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 50%, var(--radial-1) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, var(--radial-2) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, var(--radial-3) 0%, transparent 50%);
  animation: floatBg 20s ease-in-out infinite;
}

@keyframes floatBg {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2%, -2%) rotate(1deg); }
  50% { transform: translate(-1%, 2%) rotate(-1deg); }
  75% { transform: translate(1%, -1%) rotate(0.5deg); }
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--orb-1);
  top: -100px;
  right: -100px;
  animation: orbFloat1 12s ease-in-out infinite;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--orb-2);
  bottom: -80px;
  left: -80px;
  animation: orbFloat2 15s ease-in-out infinite;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: var(--orb-3);
  top: 50%;
  left: 50%;
  animation: orbFloat3 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-40px, 40px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.3); }
}

/* ---------- Login Card ---------- */
.login-card {
  position: relative;
  z-index: 1;
  width: 420px;
  max-width: 92%;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: slideUp 0.6s ease;
}

/* ---------- Logo ---------- */
.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .logo-img {
  width: 180px;
  height: auto;
  margin: 0 auto;
}

/* ---------- Form ---------- */
.login-form {
  margin-top: 1.5rem;
}

.login-form .form-group {
  margin-bottom: 1.25rem;
}

.login-form label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  margin-top: 0.4rem;
}

.input-wrapper > i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.95rem;
  transition: color 0.2s ease;
  z-index: 1;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 2.6rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input-wrapper input:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.input-wrapper input:focus ~ i:not(.password-toggle i) {
  color: var(--accent);
}

/* Password toggle */
.password-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 2.8rem;
  background: transparent;
  border: none;
  border-radius: 0 12px 12px 0;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.password-toggle i {
  position: static;
  transform: none;
  left: auto;
  pointer-events: none;
}

.password-toggle:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

.password-toggle:focus {
  outline: none;
  box-shadow: none;
}

/* ---------- Remember & Forgot ---------- */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.remember-me span {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.6);
}

.forgot-link {
  font-size: 0.825rem;
  color: var(--link-color);
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: var(--link-hover);
}

/* ---------- Submit Button ---------- */
.login-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.login-btn:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-deeper));
  box-shadow: 0 8px 24px var(--accent-glow);
  transform: translateY(-1px);
}

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

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-btn .btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ---------- Footer ---------- */
.login-footer {
  text-align: center;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-footer p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .login-card {
    padding: 1.75rem;
  }

  .login-logo h1 {
    font-size: 1.4rem;
  }

  .login-options {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}
