/* ================================================
   LOGIN PAGE - BACKGROUND VIDEO
   ================================================ */

/* Import Google Fonts - Nunito */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap");

/* IMPORTANT: Hide navbar on login page */
.navbar {
  display: none !important;
}

/* Background Video untuk halaman login */
body {
  background: #e0f2fe; /* Fallback color */
  min-height: 100vh !important;
  position: relative;
  overflow-x: hidden;
}

/* Video Background Container */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Video Overlay - untuk dimming jika diperlukan */
.video-background::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15); /* Brightness overlay */
  z-index: 1;
  pointer-events: none;
}

/* Login Page (index.html) */
.login-container {
  min-height: 100vh;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 2rem;
  padding-right: 8%;
  position: relative;
  z-index: 100; /* Di atas video */
}

.login-card {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 3rem;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 16px 32px rgba(30, 58, 95, 0.12);
  animation: scaleIn 0.4s ease-out;
  position: relative;
  z-index: 101;

  /* Enhanced Glass Effect */
  transition: all 0.3s ease;
  overflow: visible;
}

/* Animated Light Blue Border Effect */
.login-card::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(
    90deg,
    rgba(100, 180, 255, 0) 0%,
    rgba(135, 206, 250, 1) 25%,
    rgba(173, 216, 230, 1) 50%,
    rgba(135, 206, 250, 1) 75%,
    rgba(100, 180, 255, 0) 100%
  );
  border-radius: 24px;
  z-index: -1;
  animation: borderLight 3s linear infinite;
  opacity: 0.8;
}

.login-card::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  z-index: -1;
}

.login-card:hover {
  box-shadow: 0 20px 40px rgba(30, 58, 95, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: rgba(100, 180, 255, 0.6);
  transform: translateY(-2px);
}

.login-card:hover::before {
  opacity: 1;
  animation: borderLight 2s linear infinite;
}

.login-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #246bce, #79a8ea);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 2rem;
  box-shadow: 0 8px 24px rgba(36, 107, 206, 0.3);
}

.login-icon i {
  font-size: 2.5rem;
  color: #fff;
}

/* ================================================
   LOGO POSCARE (Menggantikan Icon Font Awesome)
   ================================================ */
.login-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
}

.login-logo:hover {
  transform: scale(1.02);
}

.logo-image {
  height: 170px !important; /* Ukuran logo */
  max-height: 170px !important; /* Batasi tinggi maksimal */
  width: auto !important;
  max-width: 200px !important; /* Batasi lebar maksimal */
  display: block;
  margin: 0 auto;
  transition: all 0.3s ease;
  object-fit: contain;
  /* PENTING: Pastikan background transparan di semua device */
  background: transparent;
  background-color: transparent;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
}

/* Fallback icon jika gambar tidak load */
.login-logo i {
  font-size: 100px; /* Dikecilkan */
  color: #246bce;
  display: block;
  margin: 0 auto;
}

.login-title {
  font-size: 36px;
  margin-top: 0;
  text-align: center;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.login-subtitle {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: #475569;
  text-align: center;
  text-transform: none;
  margin-bottom: 30px;
}

.login-form .input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.login-form .input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #79a8ea;
  font-size: 1.2rem;
  z-index: 1;
}

.login-form input {
  width: 100%;
  padding: 16px 55px 16px 55px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  font-size: 1rem;
  color: #1e3a5f;
  transition: all 0.3s ease;
}

/* Password Toggle Icon */
.login-form .password-toggle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #79a8ea;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.3s ease;
  z-index: 2;
}

.login-form .password-toggle:hover {
  color: #246bce;
  transform: translateY(-50%) scale(1.15);
}

.login-form input:focus {
  outline: none;
  border-color: #246bce;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(156, 203, 255, 0.3);
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4a6fa3;
}
.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.forgot-password {
  color: #246bce;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}
.forgot-password:hover {
  color: #1d58a8;
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 16px;
  background: #246bce;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.login-btn:hover {
  background: #1d58a8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(36, 107, 206, 0.4);
}
.login-btn:active {
  transform: translateY(0);
}

.login-btn .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
.login-btn.loading .spinner {
  display: block;
}
.login-btn.loading .btn-text {
  display: none;
}

/* Animations */
@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes borderLight {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* ================================================
   FORGOT PASSWORD & CREATE ACCOUNT
   ================================================ */

/* Forgot Password Container */
.forgot-password-container {
  text-align: right;
  margin: -0.5rem 0 1.5rem 0;
}

.forgot-password-link {
  color: #246bce;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.forgot-password-link:hover {
  color: #1d58a8;
  text-decoration: underline;
}

.forgot-password-link i {
  font-size: 0.85rem;
}

/* Create Account Button */
.create-account-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: #246bce;
  border: 2px solid #246bce;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.create-account-btn:hover {
  background: rgba(36, 107, 206, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(36, 107, 206, 0.2);
}

.create-account-btn:active {
  transform: translateY(0);
}

/* ================================================
   MODAL STYLES
   ================================================ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  width: 90%;
  max-width: 480px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 2;
  animation: slideUp 0.4s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(36, 107, 206, 0.2);
}

.modal-header h2 {
  color: #1e3a5f;
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header h2 i {
  color: #246bce;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: rotate(90deg);
}

.modal-body {
  color: #4a5568;
}

.modal-info {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid #246bce;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: #1e3a5f;
  font-size: 0.95rem;
}

.modal-body .input-group {
  position: relative;
  margin-bottom: 1.2rem;
}

.modal-body .input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #79a8ea;
  font-size: 1.1rem;
  z-index: 1;
}

.modal-body input {
  width: 100%;
  padding: 14px 55px 14px 55px;
  border: 2px solid rgba(36, 107, 206, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  color: #1e3a5f;
  transition: all 0.3s ease;
}

.modal-body input:focus {
  outline: none;
  border-color: #246bce;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36, 107, 206, 0.1);
}

.modal-body .password-toggle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #79a8ea;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  z-index: 2;
}

.modal-body .password-toggle:hover {
  color: #246bce;
  transform: translateY(-50%) scale(1.15);
}

.btn-primary-modal {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #246bce, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary-modal:hover {
  background: linear-gradient(135deg, #1d58a8, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(36, 107, 206, 0.4);
}

.btn-primary-modal:active {
  transform: translateY(0);
}

.btn-secondary-modal {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #64748b, #94a3b8);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary-modal:hover {
  background: linear-gradient(135deg, #475569, #64748b);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(100, 116, 139, 0.4);
}

.btn-secondary-modal:active {
  transform: translateY(0);
}

/* Modal Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Modal */
@media (max-width: 768px) {
  .modal-content {
    padding: 2rem;
    max-width: 95%;
  }

  .modal-header h2 {
    font-size: 1.4rem;
  }

  /* Responsive Logo untuk Mobile */
  .logo-image {
    height: 80px !important;
    max-height: 80px !important;
    max-width: 150px !important;
  }

  .login-logo i {
    font-size: 80px;
  }
}
