/* ===== Auth Pages — Login, Forgot Password, Reset Password ===== */
/* Premium redesign with animated gradients, glassmorphism & micro-interactions */
/* NOTE: This file is loaded standalone (not through Tailwind), so NO @apply directives */

:root {
  --color-primary: var(--primary);
  --color-primary-dark: var(--primary-dark);
  --color-primary-light: #4d88c5;
  --color-cream: var(--surface-alt);
  --color-cream-dark: #e2e8f0;
  --color-pro: #ef4649;
  --color-care: #3fc4f0;
  --color-aayush: #14beb7;
  --color-enterprise: #2965a8;
  --color-standard: #0c849b;
}

[data-theme="light"] {
  --p: 213 62% 41%; --pf: 213 62% 34%; --pc: 210 40% 98%;
  --b1: 210 40% 98%; --b2: 210 30% 95%; --b3: 215 25% 91%; --bc: 215 28% 17%;
  --auth-form-bg: rgba(255, 255, 255, 0.88);
  --auth-form-border: rgba(255, 255, 255, 0.65);
  --auth-card-shadow: 0 25px 60px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.04);
  --auth-input-bg: rgba(255, 255, 255, 0.95);
  --auth-right-bg: #f0f4f8;
}
[data-theme="dark"] {
  --p: 213 62% 41%; --pf: 213 62% 48%; --pc: 210 40% 98%;
  --b1: 222 47% 11%; --b2: 217 33% 17%; --b3: 215 25% 23%; --bc: 210 40% 96%;
  --auth-form-bg: rgba(28, 42, 58, 0.78);
  --auth-form-border: rgba(51, 69, 90, 0.5);
  --auth-card-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.2);
  --auth-input-bg: rgba(17, 28, 43, 0.85);
  --auth-right-bg: #0d1a2a;
}

/* ── Typography ── */
* { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
.font-display { font-family: 'Outfit', Georgia, serif; }
html { scroll-behavior: smooth; }
::selection { background: rgba(var(--primary-rgb),0.3); color: inherit; }

/* ═══════════════════════════════════════
   LEFT BRANDING PANEL — ANIMATED AURORA
   ═══════════════════════════════════════ */
.login-panel-bg {
  background: linear-gradient(160deg, #0a1628 0%, #0e2240 25%, #163a6a 55%, #1d5096 80%, #2662ab 100%);
  position: relative;
  overflow: hidden;
}
.dark .login-panel-bg {
  background: linear-gradient(160deg, #040c18 0%, #081d36 25%, #0e2c4e 55%, #143a67 80%, #1a4880 100%);
}

/* ── Animated Mesh / Aurora overlay ── */
.login-panel-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(74, 174, 226, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 60%, rgba(38, 98, 171, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 80%, rgba(77, 136, 197, 0.12) 0%, transparent 70%);
  animation: aurora-shift 12s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes aurora-shift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  33%  { transform: translate(-3%, 2%) rotate(1deg); }
  66%  { transform: translate(2%, -3%) rotate(-1deg); }
  100% { transform: translate(-1%, 1%) rotate(0.5deg); }
}

/* ── Grid pattern overlay for depth ── */
.login-panel-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
  opacity: 0.5;
}

/* ── Floating geometric shapes ── */
.auth-floater {
  position: absolute;
  z-index: 2;
}

.auth-shape-hex {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: float-rotate 20s ease-in-out infinite;
}

.auth-shape-circle {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-shape-ring {
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
}

.auth-shape-dot {
  border-radius: 50%;
  background: rgba(74, 174, 226, 0.4);
  box-shadow: 0 0 20px rgba(74, 174, 226, 0.3);
}

/* ── Animations ── */
@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes float-rotate {
  0%   { transform: translateY(0) rotate(0deg); }
  25%  { transform: translateY(-18px) rotate(8deg); }
  50%  { transform: translateY(-6px) rotate(-4deg); }
  75%  { transform: translateY(-20px) rotate(6deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
@keyframes float-drift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(10px, -15px); }
  50% { transform: translate(-5px, -8px); }
  75% { transform: translate(8px, -20px); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.float-anim { animation: gentle-float 6s ease-in-out infinite; }
.float-anim-d { animation: gentle-float 7s ease-in-out infinite 1.5s; }

@keyframes pulse-soft {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.15; transform: scale(1.08); }
}
.pulse-glow { animation: pulse-soft 5s ease-in-out infinite; }

/* ── Stats counter on left panel ── */
.auth-stat-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 110px;
  transition: all 0.3s ease;
}
.auth-stat-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}
.auth-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.auth-stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

/* ═══════════════════════════════════════
   RIGHT PANEL — GLASSMORPHISM FORM CARD
   ═══════════════════════════════════════ */
.auth-right-panel {
  background: var(--auth-right-bg);
  position: relative;
  overflow: hidden;
}

/* Subtle radial gradient on right panel */
.auth-right-panel::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* Glassmorphism form card */
.auth-form-card {
  background: var(--auth-form-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--auth-form-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--auth-card-shadow);
  position: relative;
  z-index: 5;
  transition: box-shadow 0.4s ease;
}
.auth-form-card:hover {
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.1), 0 10px 25px rgba(0, 0, 0, 0.06);
}
.dark .auth-form-card:hover {
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), 0 10px 25px rgba(0, 0, 0, 0.25);
}

/* ── Welcome heading with gradient accent line ── */
.auth-welcome-heading {
  position: relative;
  padding-bottom: 1rem;
}
.auth-welcome-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary, #4aaee2));
}

/* ═══════════════════════════════════════
   FORM INPUT STYLING
   ═══════════════════════════════════════ */
.auth-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.auth-input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--icon-muted);
  pointer-events: none;
  z-index: 10;
  transition: color 0.3s ease;
}
.auth-input-group:focus-within .input-icon {
  color: var(--primary);
}

.auth-input {
  width: 100%;
  height: 64px;
  padding: 0 1rem 0 2.85rem;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--auth-input-bg);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-sizing: border-box;
}
.auth-input::placeholder {
  color: var(--text-muted);
}
.auth-input:hover {
  border-color: var(--icon-muted);
}
.auth-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1), 0 2px 8px rgba(var(--primary-rgb), 0.08);
  background: var(--surface);
}

.input-glow:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

/* ── Password toggle ── */
.auth-pass-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  border-radius: 8px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-pass-toggle:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}

/* ── HTMX Loading Indicators ── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; }
.htmx-request .htmx-hide-on-request { display: none; }

/* ── Checkbox ── */
.auth-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border) !important;
  cursor: pointer;
  transition: all 0.2s ease;
  accent-color: var(--primary);
}
.auth-checkbox:checked {
  border-color: var(--primary) !important;
}
.dark .auth-checkbox {
  border-color: #64748b !important;
}
/* Shared checkbox fallback */
.ui-checkbox {
  border-width: 2px !important;
  border-color: var(--text-muted) !important;
}
.dark .ui-checkbox {
  border-color: #64748b !important;
}

/* ═══════════════════════════════════════
   AUTH BUTTON — GRADIENT WITH SHIMMER
   ═══════════════════════════════════════ */
.btn-auth-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 64px !important;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #4d88c5, var(--secondary, #4aaee2)) !important;
  background-size: 200% 200% !important;
  color: white !important;
  box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.3) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: gradient-shift 4s ease-in-out infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.btn-auth-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-auth-primary:hover::before {
  transform: translateX(100%);
}
.btn-auth-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.4) !important;
  filter: brightness(1.08);
}
.btn-auth-primary:active {
  transform: translateY(0) scale(0.99);
}

/* ═══════════════════════════════════════
   BRANDING & ICONS
   ═══════════════════════════════════════ */
.auth-branding-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  width: 5rem !important;
  height: 5rem !important;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}
.auth-branding-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.auth-icon-circle-lg {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(77, 136, 197, 0.15));
}
.auth-icon-circle-inner {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #4d88c5);
}

.auth-mobile-logo-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.25);
  width: 3rem !important;
  height: 3rem !important;
  background: linear-gradient(135deg, var(--primary), #4d88c5) !important;
}

/* ── Feature pills in left panel ── */
.auth-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: default;
}
.auth-feature-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.auth-feature-pill i,
.auth-feature-pill svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.7);
}

/* ── Links & Accents ── */
.auth-link {
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}
.auth-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.auth-link:hover::after {
  width: 100%;
}
.auth-link:hover {
  color: var(--primary-dark);
}

/* ── Theme toggle button ── */
.auth-theme-toggle {
  padding: 0.625rem;
  border-radius: 14px;
  background: var(--auth-form-bg, rgba(255,255,255,0.85));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.06);
  transform: rotate(15deg);
}

/* ── Footer ── */
.auth-footer {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════
   ENTRANCE ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes auth-slide-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.auth-animate-in {
  animation: auth-slide-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.auth-animate-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.auth-animate-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.auth-animate-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.auth-animate-in-delay-4 { animation-delay: 0.4s; opacity: 0; }
.auth-animate-in-delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ── Particle animation ── */
@keyframes particle-float {
  0%, 100% { transform: translate(0, 0); opacity: 0.4; }
  25% { transform: translate(15px, -25px); opacity: 0.7; }
  50% { transform: translate(-10px, -40px); opacity: 0.3; }
  75% { transform: translate(20px, -15px); opacity: 0.6; }
}
.auth-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .auth-form-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }
}

/* ── Label override for auth forms ── */
.auth-form-card .form-control {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}
.auth-form-card .label {
  padding: 0 0 0.375rem 0 !important;
}
.auth-form-card .label-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}

/* ── Gradient text for "Confidence" ── */
.auth-gradient-text {
  background: linear-gradient(135deg, #ffffff, #93c5fd, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Input field icons — legacy selector support ── */
.form-control .relative > i[data-lucide],
.form-control .relative > svg {
  position: absolute;
  z-index: 10;
}

/* ── Product Suite Card & Badge Styles ── */

.product-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  border-color: var(--brand-color) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 0 12px 1px color-mix(in srgb, var(--brand-color) 20%, transparent) !important;
  transform: translateY(-1px);
}

.app-card-badge {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.badge-pink { background: color-mix(in srgb, var(--color-pro) 12%, transparent); color: var(--color-pro); }
.badge-peach { background: color-mix(in srgb, var(--color-standard) 12%, transparent); color: var(--color-standard); }
.badge-emerald { background: color-mix(in srgb, var(--color-enterprise) 12%, transparent); color: var(--color-enterprise); }

