:root {
  --primary-color: #ff7480; 
  --primary-hover: #fa5c69;
  --secondary-color: #a0aec0;
  --dark-text: #2d3748;
  --light-text: #ffffff;
  --border-color: #e2e8f0;
  --error-color: #e53e3e;
  --bg-color: #ffffff;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-color);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* --- 1. Initial Welcome Panel (Slides Right) --- */
.initial-welcome-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #ff7480 0%, #ff9a9e 100%);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.initial-welcome-panel.slide-out-right {
  transform: translateX(100%);
}

.intro-content {
  text-align: center;
  animation: scaleIn 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.intro-logo {
  width: 160px;
  margin-bottom: 20px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}

.intro-text {
  color: var(--light-text);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* --- 2. Top Fluid Section --- */
.top-header {
  position: relative;
  height: 45vh;
  background: var(--primary-color);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bg-shape {
  position: absolute;
  filter: blur(20px);
  opacity: 0.6;
  animation: morph 15s ease-in-out infinite alternate;
}
.bg-shape:nth-child(1) {
  width: 400px; height: 400px;
  background: rgba(255, 255, 255, 0.2);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.bg-shape:nth-child(2) {
  width: 500px; height: 500px;
  background: rgba(255, 255, 255, 0.15);
  bottom: -150px; right: -100px;
  animation-delay: -5s;
}

@keyframes morph {
  0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(0deg) scale(1); }
  34% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; transform: rotate(120deg) scale(1.05); }
  67% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; transform: rotate(240deg) scale(0.95); }
  100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(360deg) scale(1); }
}

.waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 15vh;
  min-height: 100px;
  max-height: 150px;
}
.parallax > use {
  animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

@keyframes move-forever {
  0% { transform: translate3d(-90px,0,0); }
  100% { transform: translate3d(85px,0,0); }
}

.logo-container {
  position: relative;
  z-index: 10;
  text-align: center;
  animation: slideDownAndFloat 4s ease-in-out infinite alternate;
}

@keyframes slideDownAndFloat {
  0% { transform: translateY(-20px) scale(0.9); opacity: 0; }
  20% { transform: translateY(0px) scale(1); opacity: 1; }
  100% { transform: translateY(10px) scale(1.02); opacity: 1; }
}

.logo-container img {
  width: 140px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

/* --- 3. Form Section --- */
.login-section {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 20px 30px;
  background: var(--bg-color);
  position: relative;
  z-index: 10;
}

.login-container {
  width: 100%;
  max-width: 420px;
  margin-top: -20px;
}

.login-header h2 {
  margin: 0 0 40px 0;
  color: var(--dark-text);
  font-size: 2.2rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  animation: fadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  opacity: 0;
}

.login-header h2::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
  z-index: -1;
  opacity: 0.6;
}

.form-group {
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.form-group:nth-child(1) { animation-delay: 0.2s; }
.form-group:nth-child(2) { animation-delay: 0.3s; }
.form-group:nth-child(3) { animation-delay: 0.4s; }

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--dark-text);
  font-size: 0.95rem;
}

.input-wrapper { position: relative; }

.form-control {
  width: 100%;
  padding: 10px 0 10px 25px;
  border: none;
  border-bottom: 2px solid var(--border-color);
  background: transparent;
  box-sizing: border-box;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  color: var(--dark-text);
  outline: none;
  transition: all 0.3s ease;
}

select.form-control { padding-left: 0; cursor: pointer; }
.form-control::placeholder { color: var(--secondary-color); font-weight: 400; }
.form-control:focus { border-bottom-color: var(--primary-color); }

.input-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-color);
  font-size: 1.1rem;
  transition: color 0.3s;
}
.form-control:focus + .input-icon { color: var(--primary-color); }

.btn {
  width: 100%;
  padding: 16px;
  margin-top: 10px;
  background-color: var(--primary-color);
  color: var(--light-text);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.5s;
  box-shadow: 0 8px 20px rgba(255, 116, 128, 0.3);
}

.btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(255, 116, 128, 0.4);
}
.btn:disabled { background-color: #fcb6bc; cursor: not-allowed; transform: none; box-shadow: none; }

.error-message-container { min-height: 24px; margin: 10px 0 20px 0; }
.error-message {
  color: var(--error-color);
  background-color: rgba(229, 62, 62, 0.05);
  border-left: 3px solid var(--error-color);
  padding: 10px 15px;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
}

.loading {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--light-text);
  animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer-text {
  margin-top: 30px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--secondary-color);
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.6s;
}
.footer-text a { color: var(--primary-color); text-decoration: none; font-weight: 600; transition: color 0.3s; }
.footer-text a:hover { color: var(--primary-hover); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 4. Success Post-Login Animation --- */
.fade-out-blur { animation: blurOut 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
@keyframes blurOut {
  0% { opacity: 1; filter: blur(0); transform: scale(1); }
  100% { opacity: 0; filter: blur(20px); transform: scale(0.95); }
}

.success-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-color);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.success-overlay.active { opacity: 1; pointer-events: auto; }

.blur-bubble {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.7;
  z-index: 1;
  animation: floatBubble 12s infinite ease-in-out alternate;
}
.bubble-1 { width: 400px; height: 400px; background: rgba(255, 116, 128, 0.4); top: 10%; left: -10%; animation-delay: 0s; }
.bubble-2 { width: 300px; height: 300px; background: rgba(160, 174, 192, 0.3); bottom: 20%; right: -5%; animation-delay: -4s; }
.bubble-3 { width: 350px; height: 350px; background: rgba(254, 207, 239, 0.6); top: -10%; right: 20%; animation-delay: -8s; }

@keyframes floatBubble {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 80px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.9); }
}

.success-content { position: relative; z-index: 2; text-align: center; }

.success-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.3;
  background: linear-gradient(135deg, var(--dark-text), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  transition-delay: 0.3s;
  margin: 0;
  padding: 0 20px;
}

.success-overlay.active .success-content h2 { opacity: 1; transform: translateY(0); }