* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body, html {
  height: 100%;
}

.container {
  display: flex;
  height: 100vh;
}

.left {
  width: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
  position: relative;
  padding: 40px;
}

.logo {
  position: absolute;
  top: 50px;
  left: 70px;
  font-size: 20px;
  font-weight: 600;
  color: #2F4EFF;
}

.form-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 380px; /* Diperbesar untuk accommodate reCAPTCHA */
}

h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}

p {
  color: #888;
  margin-bottom: 30px;
  text-align: center;
}

label {
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
  color: #333;
  display: block;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline-color: #2F4EFF;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #2F4EFF;
  box-shadow: 0 0 0 3px rgba(47, 78, 255, 0.1);
}

/* Google reCAPTCHA Container */
.recaptcha-container {
  width: 100%;
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
}

.g-recaptcha {
  transform: scale(0.9);
  transform-origin: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

button[type="submit"] {
  width: 100%;
  background-color: #2F4EFF;
  color: white;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button[type="submit"]:hover:not(:disabled) {
  background-color: #1e3aef;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(47, 78, 255, 0.3);
}

button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
}

button[type="submit"]:disabled {
  background-color: #cccccc !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Loading animation untuk button */
button[type="submit"]:disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
}

button[type="submit"].loading::after {
  opacity: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.right {
  flex: 1;
  background-image: url('../img/bg-login.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Alert styling untuk pesan error */
.alert {
  background-color: #ffe6e6;
  color: #d63031;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid #ff7979;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
  display: none;
}

.alert.show {
  display: block;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  
  .left {
    width: 100%;
    height: 100vh;
    padding: 20px;
  }
  
  .form-container {
    max-width: 320px;
  }
  
  .g-recaptcha {
    transform: scale(0.8);
  }
  
  .right {
    display: none;
  }
  
  .logo {
    top: 30px;
    left: 30px;
    font-size: 18px;
  }
}
