/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #28a745;
  --primary-dark: #1e7e34;
  --primary-light: #34ce57;
  --secondary-color: #6c757d;
  --accent-color: #17a2b8;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --white: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --border-color: #e9ecef;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Login Container */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1200px;
  height: 100vh;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

/* Background Animation */
.login-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(40, 167, 69, 0.1);
  animation: floatShape 8s ease-in-out infinite;
}

.shape-1 {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 3s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  bottom: 30%;
  left: 60%;
  animation-delay: 6s;
}

@keyframes floatShape {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-30px) rotate(180deg) scale(1.1);
    opacity: 0.2;
  }
}

/* Login Content */
.login-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  background: var(--white);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 1rem;
}

.logo img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.logo h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

/* Login Form */
.login-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  color: var(--text-secondary);
  font-size: 1.1rem;
  z-index: 2;
}

.input-container input {
  width: 100%;
  padding: 15px 15px 15px 50px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.input-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.toggle-password {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--primary-color);
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-secondary);
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  margin-right: 8px;
  position: relative;
  transition: var(--transition);
}

.checkbox-container input:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-container input:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 12px;
  font-weight: bold;
}

.forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.forgot-password:hover {
  text-decoration: underline;
}

/* Login Button */
.login-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.login-btn:active {
  transform: translateY(0);
}

.btn-text {
  transition: var(--transition);
}

.btn-icon {
  margin-left: 10px;
  transition: var(--transition);
}

.login-btn:hover .btn-icon {
  transform: translateX(5px);
}

/* Divider */
.divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
  color: var(--text-secondary);
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
}

.divider span {
  background: var(--white);
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

/* Social Login */
.social-login {
  margin-bottom: 2rem;
}

.social-btn {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  background: var(--white);
  color: var(--text-primary);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.social-btn:hover {
  border-color: var(--primary-color);
  background: var(--light-color);
}

.google-btn i {
  color: #db4437;
}

/* Login Footer */
.login-footer {
  text-align: center;
  color: var(--text-secondary);
}

.login-footer p {
  margin-bottom: 1rem;
}

.register-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.register-link:hover {
  text-decoration: underline;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.back-home:hover {
  color: var(--primary-color);
}

/* Login Info Panel */
.login-info {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("/placeholder.svg?height=600&width=600") center / cover;
  opacity: 0.1;
}

.info-content {
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.info-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.info-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1rem;
}

.feature i {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Success Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: slideIn 0.3s ease;
}

.modal-header {
  margin-bottom: 1.5rem;
}

.success-icon {
  font-size: 3rem;
  color: var(--success-color);
  margin-bottom: 1rem;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.loading-bar {
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.loading-progress {
  height: 100%;
  background: var(--primary-color);
  width: 0;
  animation: loadingProgress 3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loadingProgress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-container {
    grid-template-columns: 1fr;
    height: 100vh;
  }

  .login-info {
    display: none;
  }

  .login-content {
    padding: 2rem 1.5rem;
  }

  .logo h1 {
    font-size: 1.8rem;
  }

  .info-content h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .login-content {
    padding: 1.5rem 1rem;
  }

  .logo h1 {
    font-size: 1.5rem;
  }

  .form-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
