:root {
  --login-primary: #7B1FA2;
  --login-secondary: #EC407A;
  --login-accent: #FF9800;
  --login-success: #38EF7D;
  --login-light: #F5F5F5;
  --login-dark: #333333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  display: flex;
  max-width: 1200px;
  width: 100%;
  min-height: 850px;
  background: white;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.login-left {
  flex: 1;
  background: linear-gradient(135deg, var(--login-primary), var(--login-secondary));
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: white;
}

.login-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path fill="rgba(255,255,255,0.05)" d="M0,500Q0,250,250,250Q500,250,500,500Q500,750,750,750Q1000,750,1000,500L1000,1000L0,1000Z"></path></svg>');
  background-size: cover;
  opacity: 0.1;
}

.welcome-text {
  text-align: center;
  z-index: 1;
  max-width: 500px;
}

.welcome-text h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.welcome-text p {
  font-size: 1.2rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 30px;
}

.features {
  text-align: left;
  margin-top: 40px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 1rem;
}

.feature-item i {
  background: rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.login-right {
  flex: 1;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: white;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--login-primary), var(--login-secondary));
  margin-bottom: 10px;
  color: white;
}

.login-header h2 {
  color: var(--login-dark);
  font-size: 2rem;
  margin-bottom: 10px;
}

.login-header p {
  color: #666;
  font-size: 1rem;
}


.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.col-md-6 {
  flex: 1;
}

.form-label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  transition: all 0.3s ease;
  pointer-events: none;
  background: white;
  padding: 0 5px;
}

.form-input {
  width: 100%;
  padding: 18px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: transparent;
  color: #333;
}

.form-input:focus {
  outline: none;
  border-color: var(--login-primary);
  box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.form-input:focus+.form-label,
.form-input:not(:placeholder-shown)+.form-label {
  top: 0;
  transform: translateY(-50%) scale(0.9);
  color: var(--login-primary);
  font-weight: 600;
}

.form-input::placeholder {
  color: transparent;
}


.role-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 10px;
}

.role-option {
  position: relative;
  cursor: pointer;
}

.role-option input[type="radio"] {
  display: none;
}

.role-card {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  transition: all 0.3s ease;
  background: #f9f9f9;
  height: 100%;
}

.role-card i {
  font-size: 2rem;
  color: #666;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.role-card h4 {
  color: #333;
  margin: 10px 0;
  font-size: 1.1rem;
}

.role-card p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.role-option input[type="radio"]:checked+.role-card {
  border-color: var(--login-primary);
  background: linear-gradient(45deg, rgba(106, 17, 203, 0.1), rgba(37, 117, 252, 0.1));
}

.role-option input[type="radio"]:checked+.role-card i {
  color: var(--login-primary);
}

.role-option:hover .role-card {
  border-color: var(--login-secondary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}


.terms-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #666;
  font-size: 0.95rem;
}

.terms-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--login-primary);
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 0.95rem;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--login-primary);
}


.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.forgot-password {
  color: var(--login-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.forgot-password:hover {
  text-decoration: underline;
}


.btn {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.5px;
  margin-top: 10px;
}

.btn-primary {
  background: linear-gradient(45deg, var(--login-primary), var(--login-secondary));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(106, 17, 203, 0.3);
}

.btn-secondary {
  background: #f8f9fa;
  color: #333;
  border: 2px solid #e0e0e0;
  text-align: center;
}

.btn-secondary:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}


.password-toggle {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 1rem;
  padding: 5px;
}

.password-toggle:hover {
  color: var(--login-primary);
}


.form-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 1rem;
}


.divider {
  display: flex;
  align-items: center;
  margin: 30px 0;
  color: #999;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.divider span {
  padding: 0 15px;
  font-size: 0.9rem;
  text-transform: uppercase;
}


.social-login {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.social-btn {
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  color: #666;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-btn.google:hover {
  border-color: #DB4437;
  color: #DB4437;
}

.social-btn.facebook:hover {
  border-color: #4267B2;
  color: #4267B2;
}

.social-btn.twitter:hover {
  border-color: #1DA1F2;
  color: #1DA1F2;
}


.login-footer {
  text-align: center;
  margin-top: 30px;
  color: #666;
  font-size: 0.95rem;
}

.login-footer a {
  color: var(--login-primary);
  text-decoration: none;
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}


.message {
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.message.error {
  background: #FFE6E6;
  color: #D8000C;
  border-left: 5px solid #D8000C;
}

.message.success {
  background: #E6FFE6;
  color: #008000;
  border-left: 5px solid #008000;
}


.loading-btn {
  position: relative;
}

.loading-btn::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  right: 20px;
}

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


@media (max-width: 992px) {
  .login-container {
    flex-direction: column;
    height: auto;
    max-width: 500px;
  }

  .login-left {
    padding: 40px 20px;
  }

  .welcome-text h1 {
    font-size: 2rem;
  }

  .login-right {
    padding: 40px 30px;
  }

  .social-login {
    grid-template-columns: 1fr;
  }

  .role-options {
    grid-template-columns: 1fr;
  }

  .row {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 576px) {
  .login-container {
    border-radius: 15px;
  }

  .login-right {
    padding: 30px 20px;
  }
}