/* ============================================================
   KARAMA LOGISTICS - AUTH PAGES (auth.css)
   Handles: Login, Register, Forgot Password
   ============================================================ */

/* ─── Auth Page Layout ─── */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  /* background: linear-gradient(135deg, var(--heading-color) 0%, #0a2a6e 50%, #001040 100%); */
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 600px;
  height: 600px;
  /* background: radial-gradient(circle, rgba(13, 66, 255, 0.15) 0%, transparent 70%); */
  border-radius: 50%;
  animation: float-glow 10s ease-in-out infinite;
}

.auth-page::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  animation: float-glow 12s ease-in-out infinite reverse;
}

@keyframes float-glow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.auth-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

/* ─── Auth Card ─── */
.auth-card {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(0,0,0,0.04);
  animation: fadeInUp 0.6s ease-out both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Auth Header ─── */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-color), #2563eb);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--contrast-color);
  font-size: 1.6rem;
  box-shadow: 0 8px 25px rgba(13, 66, 255, 0.3);
  transition: all var(--transition-base);
}

.auth-icon.accent {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.auth-card:hover .auth-icon {
  transform: scale(1.05);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--default-color);
  opacity: 0.65;
}

/* ─── Auth Alerts ─── */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.9rem;
  animation: slideDown 0.4s ease-out;
}

.auth-alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.auth-alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.auth-alert i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Auth Form ─── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--heading-color);
}

.form-input {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--default-color);
  background: var(--surface-color);
  transition: all var(--transition-base);
  outline: none;
  width: 100%;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(13, 66, 255, 0.1);
}

.form-input:hover {
  border-color: #cbd5e1;
}

.form-select {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--default-color);
  background: var(--surface-color);
  transition: all var(--transition-base);
  outline: none;
  width: 100%;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(13, 66, 255, 0.1);
}

.form-textarea {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--default-color);
  background: var(--surface-color);
  transition: all var(--transition-base);
  outline: none;
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.form-textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(13, 66, 255, 0.1);
}

/* ─── Password Field ─── */
.password-field {
  position: relative;
}

.password-field .form-input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: color var(--transition-fast);
}

.password-toggle:hover {
  color: var(--accent-color);
}

/* ─── Strength Meter ─── */
.strength-meter {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: all var(--transition-base);
}

.strength-fill.weak { width: 33%; background: #ef4444; }
.strength-fill.medium { width: 66%; background: #f59e0b; }
.strength-fill.strong { width: 100%; background: #10b981; }

.strength-text {
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 500;
}

.strength-text.weak { color: #ef4444; }
.strength-text.medium { color: #f59e0b; }
.strength-text.strong { color: #10b981; }

/* ─── Auth Options ─── */
.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-checkbox,
.terms-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--default-color);
  opacity: 0.8;
  cursor: pointer;
}

.auth-checkbox input,
.terms-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.auth-link {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.auth-link:hover {
  color: var(--heading-color);
}

/* ─── Auth Button ─── */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent-color), #2563eb);
  color: var(--contrast-color);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(13, 66, 255, 0.3);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 66, 255, 0.4);
}

.auth-btn:active {
  transform: translateY(0);
}

/* ─── Auth Footer ─── */
.auth-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.auth-footer-text {
  font-size: 0.9rem;
  color: var(--default-color);
  opacity: 0.7;
}

.auth-footer-text a {
  color: var(--accent-color);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.auth-footer-text a:hover {
  color: var(--heading-color);
}

/* ─── Responsive Design ─── */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .auth-card {
    padding: 36px 32px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .auth-page {
    padding: 20px 16px;
    background: linear-gradient(180deg, var(--heading-color) 0%, #0a2a6e 100%);
  }
  
  .auth-page::before,
  .auth-page::after {
    display: none;
  }
  
  .auth-card {
    padding: 32px 24px;
    border-radius: var(--radius-lg);
  }
  
  .auth-form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  
  .auth-title {
    font-size: 1.4rem;
  }
  
  .auth-icon {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
  }
  
  .auth-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
  }
  
  .auth-title {
    font-size: 1.3rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 10px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .auth-btn {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .auth-page::before,
  .auth-page::after {
    animation: none;
  }
  
  .auth-card {
    animation: none;
  }
}