/* ============================================================
   EcomNix — Auth Pages CSS
   Used by: merchant/login, merchant/register,
            admin/login
   Theme: Midnight Indigo
============================================================ */

/* ── Imports ── */
/* Plus Jakarta Sans + Inter loaded via <link> in HTML */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  background: #F5F7FA;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Auth Layout ── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
}

/* Left panel — branding side */
.auth-left {
  width: 420px;
  flex-shrink: 0;
  background: #0F172A;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Decorative blobs */
.auth-left::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.auth-left::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(249,115,22,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 56px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.auth-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.auth-logo-text .l-ecom { color: #FFFFFF; }
.auth-logo-text .l-nix  { color: #818CF8; }
.auth-logo-dot {
  width: 8px; height: 8px;
  background: #F97316;
  border-radius: 50%;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.auth-left-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.auth-tagline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.auth-tagline .accent { color: #818CF8; }

.auth-tagline-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 300px;
}

/* Feature bullets on left panel */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.auth-feature-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(99,102,241,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.auth-feature-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}
.auth-feature-text strong {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  display: block;
  margin-bottom: 1px;
}

/* Trust note at bottom of left panel */
.auth-left-footer {
  margin-top: auto;
  padding-top: 32px;
  position: relative;
  z-index: 1;
}
.auth-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}
.auth-trust-dot {
  width: 6px; height: 6px;
  background: #22C55E;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Right panel — form side */
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-card-header {
  margin-bottom: 28px;
}

.auth-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.auth-card-sub {
  font-size: 0.85rem;
  color: #6B7280;
  line-height: 1.5;
}

/* Flash messages */
.auth-alert {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.auth-alert-icon { flex-shrink: 0; margin-top: 1px; }

.auth-alert-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.auth-alert-success { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.auth-alert-info    { background: #EEF2FF; color: #4338CA; border: 1px solid #E0E7FF; }

/* Form groups */
.auth-form-group {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 5px;
}
.auth-label .req { color: #DC2626; margin-left: 2px; }

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: #0F172A;
  background: #FFFFFF;
  transition: all 0.15s;
  outline: none;
}
.auth-input:focus {
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.auth-input::placeholder { color: #9CA3AF; }
.auth-input.has-error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

/* Input with icon */
.auth-input-group { position: relative; }
.auth-input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  font-size: 0.9rem;
  pointer-events: none;
}
.auth-input-group .auth-input { padding-left: 36px; }

/* Show/hide password toggle */
.auth-input-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
  transition: color 0.15s;
}
.auth-input-toggle:hover { color: #6366F1; }

.auth-input-error {
  font-size: 0.72rem;
  color: #991B1B;
  font-weight: 500;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.auth-hint {
  font-size: 0.72rem;
  color: #9CA3AF;
  margin-top: 4px;
  line-height: 1.4;
}

/* Form row — two columns */
.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Forgot password link row */
.auth-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: #374151;
  cursor: pointer;
}
.auth-remember input[type="checkbox"] {
  width: 15px; height: 15px;
  border-radius: 4px;
  accent-color: #6366F1;
  cursor: pointer;
}
.auth-forgot {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6366F1;
  text-decoration: none;
  transition: color 0.15s;
}
.auth-forgot:hover { color: #4F46E5; }

/* Terms checkbox */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
}
.auth-terms input[type="checkbox"] {
  width: 15px; height: 15px;
  border-radius: 4px;
  accent-color: #6366F1;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.auth-terms-text {
  font-size: 0.78rem;
  color: #6B7280;
  line-height: 1.5;
}
.auth-terms-text a { color: #6366F1; font-weight: 600; }
.auth-terms-text a:hover { color: #4F46E5; }

/* Submit button */
.auth-btn {
  width: 100%;
  padding: 11px;
  background: #6366F1;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.auth-btn:hover {
  background: #4F46E5;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Divider with text */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}
.auth-divider-line { flex: 1; height: 1px; background: #E5E7EB; }
.auth-divider-text { font-size: 0.75rem; color: #9CA3AF; font-weight: 500; white-space: nowrap; }

/* Switch link — "Already have an account?" */
.auth-switch {
  text-align: center;
  font-size: 0.82rem;
  color: #6B7280;
}
.auth-switch a {
  color: #6366F1;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}
.auth-switch a:hover { color: #4F46E5; }

/* Password strength bar */
.password-strength {
  margin-top: 6px;
}
.password-strength-bar {
  height: 3px;
  border-radius: 2px;
  background: #E5E7EB;
  overflow: hidden;
  margin-bottom: 4px;
}
.password-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}
.strength-weak   .password-strength-fill { width: 33%; background: #DC2626; }
.strength-fair   .password-strength-fill { width: 66%; background: #F59E0B; }
.strength-strong .password-strength-fill { width: 100%; background: #16A34A; }

.password-strength-label {
  font-size: 0.68rem;
  font-weight: 600;
}
.strength-weak   .password-strength-label { color: #DC2626; }
.strength-fair   .password-strength-label { color: #D97706; }
.strength-strong .password-strength-label { color: #16A34A; }

/* Trial badge on register page */
.auth-trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EEF2FF;
  border: 1px solid #E0E7FF;
  color: #4338CA;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.auth-trial-dot {
  width: 6px; height: 6px;
  background: #6366F1;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right { padding: 32px 20px; }
  .auth-card { max-width: 100%; }
  .auth-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .auth-right { padding: 24px 16px; align-items: flex-start; padding-top: 40px; }
}
