/* Auth Pages (Login & Register) Styling */

/* Auth Background */
body.auth-page {
  background: linear-gradient(135deg, #e8f4f8 0%, #f0e8f4 50%, #f9e8e8 100%);
  min-height: 100vh;
}

/* Auth Card */
.auth-card {
  border: none;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  transition: all 0.3s ease;
}

.auth-card:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

/* Auth Card Header */
.auth-header {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(124, 156, 191, 0.05) 0%,
    rgba(168, 197, 228, 0.05) 100%
  );
  border-bottom: 2px solid rgba(124, 156, 191, 0.1);
}

.auth-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-soft) 0%,
    var(--primary-light) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 24px rgba(124, 156, 191, 0.25);
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.auth-logo i {
  font-size: 2.5rem;
  color: white;
}

.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-soft);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: #6b7280;
  font-size: 1rem;
}

/* Auth Form */
.auth-form {
  padding: 2rem 1.5rem;
}

.auth-form .form-label {
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.auth-form .form-control {
  border: 2px solid #e8edf5;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  padding-left: 3rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #f9fafb;
}

.auth-form .form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.25rem rgba(124, 156, 191, 0.1);
  background-color: white;
  transform: translateY(-2px);
}

.auth-form .input-group {
  position: relative;
}

.auth-form .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-soft);
  font-size: 1.2rem;
  z-index: 10;
  pointer-events: none;
}

.auth-form .form-select {
  border: 2px solid #e8edf5;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  padding-left: 3rem;
  font-size: 1rem;
  background-color: #f9fafb;
  transition: all 0.3s ease;
}

.auth-form .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.25rem rgba(124, 156, 191, 0.1);
  background-color: white;
}

/* Auth Button */
.auth-btn {
  width: 100%;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  background: linear-gradient(
    135deg,
    var(--primary-soft) 0%,
    var(--primary-light) 100%
  );
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(124, 156, 191, 0.3);
  transition: all 0.3s ease;
  margin-top: 1.5rem;
}

.auth-btn:hover {
  background: linear-gradient(135deg, #6a89ab 0%, #96b5d5 100%);
  box-shadow: 0 6px 20px rgba(124, 156, 191, 0.4);
  transform: translateY(-2px);
  color: white;
}

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

.auth-btn i {
  margin-right: 0.5rem;
}

/* Auth Links */
.auth-links {
  text-align: center;
  padding: 1.5rem;
  background-color: #f9fafb;
  border-top: 2px solid rgba(124, 156, 191, 0.1);
}

.auth-links a {
  color: var(--primary-soft);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-links a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Auth Alert */
.auth-alert {
  border-radius: 12px;
  border: none;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-alert.alert-danger {
  background: linear-gradient(135deg, var(--danger-soft) 0%, #f9c1bf 100%);
  color: #7a2c2a;
}

.auth-alert.alert-success {
  background: linear-gradient(135deg, var(--success-soft) 0%, #b5e4ca 100%);
  color: #2d5a3d;
}

.auth-alert i {
  font-size: 1.3rem;
  margin-right: 0.8rem;
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6b7280;
  font-size: 1.2rem;
  z-index: 10;
  transition: color 0.3s ease;
}

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

/* Role Info Badge */
.role-info {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.role-info.admin {
  background: linear-gradient(
    135deg,
    rgba(124, 156, 191, 0.15) 0%,
    rgba(168, 197, 228, 0.15) 100%
  );
  color: var(--primary-soft);
}

.role-info.customer {
  background: linear-gradient(
    135deg,
    rgba(159, 216, 181, 0.15) 0%,
    rgba(181, 228, 202, 0.15) 100%
  );
  color: var(--success-soft);
}

.role-info.owner {
  background: linear-gradient(
    135deg,
    rgba(244, 208, 155, 0.15) 0%,
    rgba(249, 223, 176, 0.15) 100%
  );
  color: var(--warning-soft);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 2px solid #e8edf5;
}

.auth-divider::before {
  margin-right: 1rem;
}

.auth-divider::after {
  margin-left: 1rem;
}

/* Footer Text */
.auth-footer {
  text-align: center;
  margin-top: 2rem;
  color: #6b7280;
  font-size: 0.9rem;
}

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

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

/* Responsive */
@media (max-width: 576px) {
  .auth-card {
    border-radius: 16px;
    margin: 1rem;
  }

  .auth-logo {
    width: 70px;
    height: 70px;
  }

  .auth-logo i {
    font-size: 2rem;
  }

  .auth-title {
    font-size: 1.75rem;
  }

  .auth-form {
    padding: 1.5rem 1rem;
  }

  .auth-btn {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
  }
}

/* Loading State */
.auth-btn.loading {
  position: relative;
  color: transparent;
}

.auth-btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spinner 0.8s linear infinite;
}

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