/* General Layout */
.login-wrapper {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #f6f7fb 0%, #e9f7ef 100%);
}

/* Left Side - Branding */
.login-branding {
  flex: 1;
  background: linear-gradient(135deg, #28a745 0%, #198754 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.branding-content {
  text-align: center;
  z-index: 2;
  max-width: 500px;
  padding: 2rem;
}

.logo-container {
  margin-bottom: 3rem;
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-circle {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: pulse 2s ease-in-out infinite;
}

.logo-circle i {
  font-size: 2.5rem;
  color: #fff;
}

.logo-container h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
  color: #fff;
}

.tagline {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0;
  font-weight: 300;
}

.features-preview {
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 1rem 0;
  font-size: 1.05rem;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.feature-item:hover {
  opacity: 1;
}

.feature-item i {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Floating Elements */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.float-element {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.element-1 {
  width: 120px;
  height: 120px;
  top: 15%;
  right: 10%;
  animation-delay: 0s;
}

.element-2 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 15%;
  animation-delay: 2s;
}

.element-3 {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 20%;
  animation-delay: 4s;
}

/* Right Side - Login Form */
.login-form-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #fff;
  min-height: 100vh;
}

.form-container {
  width: 100%;
  max-width: 420px;
  animation: fadeInRight 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #198754;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.form-header p {
  color: #6c757d;
  font-size: 1.05rem;
  margin: 0;
}

/* Form Styling */
.login-form {
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  opacity: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 1rem;
  color: #6c757d;
  font-size: 1.1rem;
  z-index: 1;
}

.input-wrapper input {
  width: 100%;
  padding: 1rem 1rem 1rem 2.8rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

/* Make space for the toggle button in the password input */
.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
  padding-right: 3rem;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #28a745;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Vertically center the toggle button */
.password-toggle {
  top: 50%;
  transform: translateY(-50%);
  right: 3rem;
  position: absolute;
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 1;
  transition: color 0.3s ease;
  padding: 0;
  line-height: 1;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: #28a745;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  background: #fff;
  transition: all 0.3s ease;
  position: relative;
}

.checkbox-wrapper input:checked + .checkbox-custom {
  background: #28a745;
  border-color: #28a745;
}

.checkbox-wrapper input:checked + .checkbox-custom:after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label {
  color: #495057;
  font-weight: 500;
}

.forgot-password {
  color: #28a745;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #198754;
}

/* Login Button */
.btn-login {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #28a745 0%, #198754 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login.loading {
  pointer-events: none;
}

.btn-text {
  transition: opacity 0.3s ease;
}

.btn-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-login.loading .btn-text {
  opacity: 0;
}

.btn-login.loading .btn-loader {
  opacity: 1;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

/* Divider */
.divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.divider:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e9ecef;
}

.divider span {
  background: #fff;
  color: #6c757d;
  padding: 0 1rem;
  font-size: 0.9rem;
  position: relative;
}

/* Register Section */
.register-section {
  text-align: center;
  margin-bottom: 2rem;
}

.register-section p {
  color: #6c757d;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.btn-register {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: #28a745;
  border: 2px solid #28a745;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-register:hover {
  background: #28a745;
  color: #fff;
  transform: translateY(-2px);
}

/* Back Home */
.back-home {
  text-align: center;
}

.back-home a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #6c757d;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.back-home a:hover {
  color: #28a745;
}

/* Message Overlay */
.message-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.message-overlay.show {
  opacity: 1;
  visibility: visible;
}

.message-card {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.message-overlay.show .message-card {
  transform: scale(1);
}

.message-icon {
  margin-bottom: 1rem;
}

.message-icon i {
  font-size: 3rem;
  color: #28a745;
}

.message-card h3 {
  color: #198754;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.message-card p {
  color: #6c757d;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .login-wrapper {
    flex-direction: column;
  }
  
  .login-branding {
    min-height: 40vh;
    flex: none;
  }
  
  .login-form-section {
    min-height: 60vh;
    flex: none;
  }
}

@media (max-width: 767.98px) {
  .login-branding {
    min-height: 30vh;
    padding: 1rem;
  }
  
  .branding-content {
    padding: 1rem;
  }
  
  .logo-container h1 {
    font-size: 2rem;
  }
  
  .form-container {
    padding: 1rem;
  }
  
  .form-header h2 {
    font-size: 1.75rem;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.animate-slide-in {
  animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-up {
  animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}