/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== LOGIN WRAPPER ===== */
.login-wrapper {
  width: 100%;
  max-width: 450px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 50px 40px;
  animation: fadeIn 0.4s ease;
}

/* ===== HEADER SECTION ===== */
.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  object-fit: contain;
}

.user-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-header h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-header p {
  color: #666;
  font-size: 14px;
}

/* ===== ALERT BOX ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
  animation: slideDown 0.3s ease;
}

.alert-error {
  background: #ffebee;
  color: #c62828;
  border-left: 3px solid #c62828;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 3px solid #2e7d32;
}

/* ===== FORM STYLES ===== */
.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}

.form-group input:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-group input::placeholder {
  color: #999;
}

/* Password Toggle */
.password-group {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 5px;
  display: flex;
  align-items: center;
  transition: color 0.3s;
}

.toggle-password:hover {
  color: #1976d2;
}

.toggle-password svg {
  width: 20px;
  height: 20px;
}

/* ===== FORM OPTIONS ===== */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 14px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #666;
  user-select: none;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1976d2;
  margin: 0;
  flex-shrink: 0;
}

.remember-me span {
  line-height: 1;
  padding-top: 1px;
}

.forgot-password {
  color: #1976d2;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  white-space: nowrap;
  line-height: 1;
}

.forgot-password:hover {
  color: #1565c0;
}

/* ===== LOGIN BUTTON ===== */
.btn-login {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: #3b82f6;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0;
}

.btn-login:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-login:active {
  transform: translateY(0);
}

/* Loading State */
.loading {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto;
}

.btn-login.loading-state {
  pointer-events: none;
  opacity: 0.8;
}

.btn-login.loading-state .btn-text {
  display: none;
}

.btn-login.loading-state .loading {
  display: block;
}

/* ===== DIVIDER ===== */
.divider {
  display: flex;
  align-items: center;
  margin: 25px 0;
  color: #999;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.divider span {
  padding: 0 12px;
  font-weight: 500;
}

/* ===== SOCIAL LOGIN ===== */
.social-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 25px;
}

.social-login-container iframe {
  margin: 0 auto !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.social-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 25px;
}

.social-btn {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  color: #333;
  line-height: 1;
}

.social-btn:hover {
  border-color: #1976d2;
  background: #f5f5f5;
  transform: translateY(-1px);
}

.social-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ===== FOOTER LINKS ===== */
.signup-link {
  text-align: center;
  margin-top: 25px;
  font-size: 14px;
  color: #666;
}

.signup-link a {
  color: #1976d2;
  text-decoration: none;
  font-weight: 600;
}

.signup-link a:hover {
  text-decoration: underline;
}

.back-to-home {
  text-align: center;
  margin-top: 20px;
}

.back-to-home a {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}

.back-to-home a:hover {
  color: #1976d2;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
  .login-wrapper {
    padding: 40px 30px;
  }

  .social-login {
    grid-template-columns: 1fr;
  }
}
