/* ============================================================
   Authentication Pages (Login/Register) Styles - Enhanced UI/UX
   ============================================================ */

.auth-page {
  min-height: 100vh; 
  display: flex;
  align-items: center; 
  justify-content: center;
  background: linear-gradient(135deg, #2d6a4f 0%, #40916c 50%, #52b788 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Animated background pattern */
.auth-page::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.auth-card {
  background: var(--white); 
  border-radius: 20px;
  box-shadow: 0 24px 72px rgba(0,0,0,0.35);
  padding: 48px 40px;
  width: 100%; 
  max-width: 460px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s ease-out;
  border: 1px solid rgba(255,255,255,0.2);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-logo { 
  text-align: center; 
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-logo i { 
  font-size: 4rem; 
  color: var(--green);
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin: 0 0 20px 0;
  animation: iconPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(39,174,96,0.3));
  width: auto;
  line-height: 1;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.auth-logo h2 { 
  font-size: 1.6rem; 
  font-weight: 800; 
  margin: 0 0 8px 0; 
  color: var(--gray-900);
  line-height: 1.2;
  letter-spacing: -0.02em;
  width: 100%;
}

.auth-logo p { 
  font-size: .95rem; 
  color: var(--gray-600);
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
  width: 100%;
}

.auth-card h3 { 
  font-size: 1.1rem; 
  font-weight: 600; 
  margin-bottom: 20px; 
  color: var(--gray-800); 
}

/* Enhanced form inputs */
.auth-card .form-group {
  margin-bottom: 20px;
  position: relative;
}

/* Password input wrapper for toggle button */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .form-control {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  z-index: 2;
}

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

.password-toggle i {
  font-size: 1rem;
}

.auth-card .form-control {
  border: 2px solid var(--gray-200);
  transition: all 0.3s ease;
  padding: 13px 16px;
  font-size: .96rem;
  background: var(--white);
  border-radius: 10px;
  width: 100%;
}

.auth-card .form-control:hover {
  border-color: var(--gray-300);
}

.auth-card .form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(64, 145, 108, 0.12);
  transform: translateY(-1px);
  background: var(--white);
}

.auth-card .form-label {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
  font-size: .9rem;
  display: block;
}

/* Form row for side-by-side fields */
.auth-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}

/* Enhanced button */
.auth-card .btn-primary {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border: none;
  padding: 15px 24px;
  font-weight: 700;
  font-size: 1.02rem;
  box-shadow: 0 6px 20px rgba(64, 145, 108, 0.35);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  letter-spacing: 0.01em;
}

.auth-card .btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.auth-card .btn-primary:hover::before {
  width: 350px;
  height: 350px;
}

.auth-card .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(64, 145, 108, 0.45);
}

.auth-card .btn-primary:active {
  transform: translateY(0);
}

.auth-card .btn-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-card .btn-lg {
  padding: 16px 28px;
  font-size: 1.05rem;
}

/* Alert styling */
.auth-card .alert {
  border-radius: 10px;
  border-left: 4px solid;
  animation: slideIn 0.4s ease-out;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: .92rem;
  line-height: 1.6;
}

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

.auth-card .alert ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.auth-card .alert li {
  margin-bottom: 6px;
}

.auth-card .alert li:last-child {
  margin-bottom: 0;
}

.auth-link { 
  text-align: center; 
  margin-top: 28px; 
  font-size: .94rem; 
  color: var(--gray-600);
  font-weight: 500;
}

.auth-link a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

.auth-link a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width 0.3s ease;
}

.auth-link a:hover::after {
  width: 100%;
}

.auth-link a:hover {
  color: var(--green);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--gray-500);
  font-size: .85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--gray-200);
}

.auth-divider span {
  padding: 0 12px;
}

/* Responsive */
@media (max-width: 651px) {
  .auth-page {
    padding: 16px;
  }
  
  .auth-card { 
    padding: 36px 28px;
    border-radius: 16px;
  }
  
  .auth-logo i { 
    font-size: 3.5rem; 
    margin-bottom: 16px;
  }
  
  .auth-logo h2 { 
    font-size: 1.4rem; 
  }
  
  .auth-logo p {
    font-size: .9rem;
  }
  
  .auth-card .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .auth-card .btn-primary {
    padding: 14px 20px;
    font-size: .98rem;
  }
  
  .password-toggle {
    right: 10px;
    padding: 6px;
  }
}

@media (max-width: 430px) {
  .auth-card { 
    padding: 28px 24px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  }
  
  .auth-logo i { 
    font-size: 3rem; 
  }
  
  .auth-logo h2 { 
    font-size: 1.25rem; 
  }
  
  .auth-logo p {
    font-size: .85rem;
  }
  
  .auth-card .form-control {
    padding: 12px 14px;
    font-size: .92rem;
  }
  
  .auth-card .btn-primary {
    padding: 13px 18px;
    font-size: .95rem;
  }
  
  .auth-link {
    font-size: .88rem;
  }
}
