/* ═══════════════════════════════════════════════
   AUTHENTICATION PAGES — Crystal Water Filters v4.1
   Premium Light Water Theme — Custom Styles
   ═══════════════════════════════════════════════ */

@import "../styles.css";

/* AUTH CONTAINER */
.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  background: linear-gradient(165deg, #F0F9FF 0%, #E0F2FE 50%, #BAE6FD 100%);
  position: relative;
  overflow: hidden;
}

/* AUTH BACKGROUND SHAPES */
.auth-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.auth-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, rgba(6, 182, 212, 0.15), transparent);
  animation: floatShape 8s ease-in-out infinite;
}

.auth-shape-1 {
  width: 250px;
  height: 250px;
  top: -50px;
  left: -50px;
  opacity: 0.4;
}

.auth-shape-2 {
  width: 350px;
  height: 350px;
  bottom: -100px;
  right: -50px;
  animation-delay: 2s;
  opacity: 0.3;
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-25px) rotate(180deg); }
}

/* AUTH CARD */
.auth-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-xl);
  z-index: 2;
  opacity: 1;
  transform: translateY(0);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.auth-header .logo-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 4px 10px rgba(3, 105, 161, 0.2));
  animation: drip 2s ease-in-out infinite;
}

@keyframes drip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.auth-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* FORM STYLING */
.auth-form .form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.88rem;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.auth-form input {
  width: 100%;
  padding: 0.9rem 1.25rem 0.9rem 2.75rem;
  border: 2px solid rgba(3, 105, 161, 0.1);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: var(--transition);
  background: rgba(240, 249, 255, 0.5);
  font-family: var(--font-body);
  color: var(--dark);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(3, 105, 161, 0.1);
  background: var(--light);
  border-left: 4px solid var(--primary);
}

.auth-form input:focus + i {
  color: var(--primary);
}

.toggle-password {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 0.4rem;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

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

/* ERROR BANNER */
.alert-banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: authFadeIn 0.3s ease-out;
}

.alert-banner.error {
  background: #FEF2F2;
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-banner.success {
  background: #ECFDF5;
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

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

/* ACTIONS */
.auth-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.auth-meta label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  color: var(--gray);
  cursor: pointer;
}

.auth-meta label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.forgot-link {
  color: var(--primary);
  font-weight: 500;
  transition: var(--transition-fast);
}

.forgot-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* BUTTONS */
.auth-btn {
  width: 100%;
  background: var(--gradient);
  color: var(--light);
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(3, 105, 161, 0.2);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(3, 105, 161, 0.3);
}

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

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* SPINNER */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--light);
  animation: spin 0.8s linear infinite;
  display: none;
}

.auth-btn.loading .spinner {
  display: block;
}

.auth-btn.loading span {
  display: none;
}

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

/* CARD FOOTER */
.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--gray);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition-fast);
}

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

/* Form validation validation errors underneath inputs */
.field-error {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 0.4rem;
  display: none;
}

.form-group.error .field-error {
  display: block;
}

.form-group.error input {
  border-color: var(--error);
  background: #FFF5F5;
}

.form-group.error input:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
  border-left-color: var(--error);
}

