/* Login Page Specific Styles */
.login-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
  padding: 6rem 0 2rem;
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.login-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 25% 25%, rgba(8, 145, 178, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  background-size: 800px 800px, 600px 600px, 400px 400px;
  animation: patternMove 20s ease-in-out infinite;
}

.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 8rem);
  width: 100%;
  padding: 0 1rem;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 700px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.login-form {
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-light);
  z-index: 1;
}

.form-input {
  width: 100%;
  padding: 1.25rem 1rem 1.25rem 3rem; /* Slightly taller input fields */
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1.1rem; /* Slightly larger font */
  transition: all 0.3s ease;
  background: white;
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.form-input::placeholder {
  color: var(--text-light);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.3s ease;
  z-index: 1;
}

.password-toggle:hover {
  color: var(--primary-color);
}

.hidden {
  display: none;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  appearance: none;
  transition: all 0.3s ease;
}

.checkbox:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.login-btn {
  position: relative;
  overflow: hidden;
  padding: 1.25rem; /* Taller button */
  font-size: 1.1rem; /* Larger text */
}

.btn-loading {
  animation: spin 1s linear infinite;
}

.login-footer {
  text-align: center;
  margin-bottom: 0; /* Removed margin since we removed social login */
}

.signup-prompt {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.signup-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.signup-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Error states */
.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  animation: shake 0.5s ease-in-out;
}

.form-input.error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Shake animation for errors */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Success states */
.form-input.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Loading button states */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading .btn-text {
  opacity: 0;
}

.btn.loading .btn-loading {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Message toast styles */
.message-toast {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.message-toast.message-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.message-toast.message-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.error-message {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Success states */
.form-input.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Loading state */
.login-btn.loading .btn-text {
  opacity: 0;
}

.login-btn.loading .btn-loading {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .login-section {
    padding: 5rem 0 1rem;
  }

  .login-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
    border-radius: 16px;
    max-width: 90%; /* Responsive width for mobile */
  }

  .login-title {
    font-size: 1.75rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem 1rem;
    max-width: 95%; /* Even more responsive for small screens */
  }

  .login-title {
    font-size: 1.5rem;
  }

  .form-input {
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
  }

  .input-icon {
    left: 0.875rem;
  }

  .password-toggle {
    right: 0.875rem;
  }

  .message-toast {
    right: 10px;
    left: 10px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
  }

  .message-toast.show {
    transform: translateY(0);
  }
}

/* Animation for form validation */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

/* Focus states for accessibility */
.checkbox:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

.password-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth transitions */
* {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

/* Signup Page Specific Styles */
.signup-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
  padding: 6rem 0 2rem;
}

.signup-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.signup-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 25% 25%, rgba(8, 145, 178, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  background-size: 800px 800px, 600px 600px, 400px 400px;
  animation: patternMove 20s ease-in-out infinite;
}

.signup-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 8rem);
  width: 100%;
  padding: 0 1rem;
}

.signup-card {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 800px;
  position: relative;
  overflow: hidden;
}

.signup-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.signup-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.signup-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.signup-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.signup-form {
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-row .form-group {
  margin-bottom: 0;
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-fill.weak {
  width: 25%;
  background: #ef4444;
}

.strength-fill.fair {
  width: 50%;
  background: #f59e0b;
}

.strength-fill.good {
  width: 75%;
  background: #3b82f6;
}

.strength-fill.strong {
  width: 100%;
  background: #10b981;
}

.strength-text {
  font-size: 0.8rem;
  font-weight: 500;
}

.strength-text.weak {
  color: #ef4444;
}

.strength-text.fair {
  color: #f59e0b;
}

.strength-text.good {
  color: #3b82f6;
}

.strength-text.strong {
  color: #10b981;
}

.password-requirements {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.requirement {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.requirement.met {
  color: #10b981;
}

.requirement-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
}

.requirement.met .requirement-icon {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

/* Terms and Conditions */
.terms-group {
  margin-bottom: 2rem;
}

.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.terms-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.terms-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.terms-link:hover {
  text-decoration: underline;
}

.signup-btn {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  font-size: 1.1rem;
}

.signup-footer {
  text-align: center;
  margin-bottom: 0;
}

.login-prompt {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.login-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.login-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Role Badge */
.role-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Mobile Responsive for Signup */
@media (max-width: 768px) {
  .signup-section {
    padding: 5rem 0 1rem;
  }

  .signup-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
    border-radius: 16px;
    max-width: 90%;
  }

  .signup-title {
    font-size: 1.75rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-row .form-group {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .signup-card {
    padding: 1.5rem 1rem;
    max-width: 95%;
  }

  .signup-title {
    font-size: 1.5rem;
  }
}

/* Add these styles at the end of the file */
.institute-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.institute-info {
  background-color: #f0f9ff;
  border-left: 3px solid #0891b2;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.domain-match-info {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  padding: 0 0.5rem;
}

.domain-match-info.success {
  color: #10b981;
}

.domain-match-info.warning {
  color: #f59e0b;
}

.domain-match-info.error {
  color: #ef4444;
}
