/* ========================================
   Login Page Custom Styles
   Brand Colors from Wonderful Indonesia
   ======================================== */

:root {
  --wi-navy: #1a2e5a;
  --wi-orange: #e86f2c;
  --wi-cyan: #00b4c6;
  --wi-magenta: #c41e7e;
  --wi-green: #5eb319;
  --wi-gold: #d4af37;
}

/* Animated Gradient Background */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(-45deg, var(--wi-navy), #0d1a33, var(--wi-cyan), var(--wi-magenta));
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating Decorative Elements */
.login-bg::before,
.login-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: floatBubble 8s ease-in-out infinite;
}

.login-bg::before {
  width: 300px;
  height: 300px;
  background: var(--wi-cyan);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.login-bg::after {
  width: 250px;
  height: 250px;
  background: var(--wi-magenta);
  bottom: -80px;
  left: -80px;
  animation-delay: 4s;
}

@keyframes floatBubble {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.1); }
}

/* Additional Floating Shapes */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.25;
}

.floating-shape-1 {
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, var(--wi-orange), var(--wi-gold));
  top: 20%;
  left: 10%;
  animation: floatShape 12s ease-in-out infinite;
  filter: blur(40px);
}

.floating-shape-2 {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--wi-green), var(--wi-cyan));
  bottom: 30%;
  right: 15%;
  animation: floatShape 10s ease-in-out infinite reverse;
  filter: blur(35px);
}

.floating-shape-3 {
  width: 80px;
  height: 80px;
  background: var(--wi-gold);
  top: 60%;
  left: 5%;
  animation: floatShape 8s ease-in-out infinite;
  animation-delay: 2s;
  filter: blur(25px);
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -30px) rotate(5deg); }
  50% { transform: translate(-10px, -50px) rotate(-5deg); }
  75% { transform: translate(-30px, -20px) rotate(3deg); }
}

/* Glassmorphism Card */
.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 80px rgba(0, 180, 198, 0.1);
  animation: cardFadeIn 0.8s ease-out;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--wi-cyan), var(--wi-magenta), var(--wi-orange));
  background-size: 200% 100%;
  animation: gradientLine 3s linear infinite;
}

@keyframes gradientLine {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Logo Animation */
.login-logo {
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Welcome Text Animation */
.login-welcome {
  animation: slideInUp 0.6s ease-out 0.2s both;
}

.login-subtitle {
  animation: slideInUp 0.6s ease-out 0.3s both;
  color: #6b7280;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Elements Animation */
.login-form .form-group {
  animation: slideInUp 0.6s ease-out both;
}

.login-form .form-group:nth-child(1) { animation-delay: 0.4s; }
.login-form .form-group:nth-child(2) { animation-delay: 0.5s; }
.login-form .form-group:nth-child(3) { animation-delay: 0.6s; }

/* Custom Input Styling */
.login-form .form-control {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.8);
}

.login-form .form-control:focus {
  border-color: var(--wi-cyan);
  box-shadow: 
    0 0 0 4px rgba(0, 180, 198, 0.15),
    0 4px 12px rgba(0, 180, 198, 0.1);
  outline: none;
  background: #fff;
}

.login-form .form-control::placeholder {
  color: #9ca3af;
  transition: opacity 0.3s ease;
}

.login-form .form-control:focus::placeholder {
  opacity: 0.5;
}

/* Form Labels */
.login-form .form-label {
  font-weight: 600;
  color: var(--wi-navy);
  font-size: 14px;
  margin-bottom: 8px;
}

/* Input Group Styling */
.login-form .input-group .input-group-text {
  border: 2px solid #e5e7eb;
  border-left: none;
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.login-form .input-group .form-control {
  border-radius: 12px 0 0 12px;
  border-right: none;
}

.login-form .input-group:focus-within .input-group-text {
  border-color: var(--wi-cyan);
  background: #fff;
}

.login-form .input-group:focus-within .form-control {
  border-color: var(--wi-cyan);
}

/* Remember Me Checkbox */
.login-form .form-check-input:checked {
  background-color: var(--wi-cyan);
  border-color: var(--wi-cyan);
}

/* Primary Button Styling */
.login-btn {
  background: linear-gradient(135deg, var(--wi-cyan), var(--wi-magenta));
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInUp 0.6s ease-out 0.7s both;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 10px 30px rgba(0, 180, 198, 0.4),
    0 5px 15px rgba(196, 30, 126, 0.2);
}

.login-btn:hover::before {
  left: 100%;
}

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

/* Loading State */
.login-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.login-btn.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  display: inline-block;
  vertical-align: middle;
}

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

/* Link Styling */
.login-link {
  color: var(--wi-cyan);
  transition: color 0.3s ease;
  text-decoration: none;
  font-weight: 500;
}

.login-link:hover {
  color: var(--wi-magenta);
  text-decoration: underline;
}

/* Register Link Animation */
.login-register {
  animation: slideInUp 0.6s ease-out 0.8s both;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .login-card {
    margin: 16px;
    border-radius: 20px;
  }
  
  .floating-shape-1,
  .floating-shape-2,
  .floating-shape-3 {
    display: none;
  }
}

/* Dark Mode Support */
.dark-style .login-card {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-style .login-form .form-control {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dark-style .login-form .form-label {
  color: #e2e8f0;
}

.dark-style .login-form .input-group-text {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}
