/* ============================================================
   NEW STREET — AUTHENTICATION STYLES (Sign In & Sign Up)
   Redesigned: Modern, Glassmorphism, Animated
   ============================================================ */

/* ── THEME VARIABLES ───────────────────────────────────────── */
:root {
  --auth-bg-light: #F8FAFC;
  --auth-bg-dark: #0F172A;
  
  --auth-card-bg-light: rgba(255, 255, 255, 0.85);
  --auth-card-bg-dark: rgba(30, 41, 59, 0.75);
  
  --auth-text-primary-light: #0F172A;
  --auth-text-primary-dark: #F8FAFC;
  
  --auth-text-secondary-light: #475569;
  --auth-text-secondary-dark: #94A3B8;
  
  --auth-border-light: rgba(226, 232, 240, 0.8);
  --auth-border-dark: rgba(255, 255, 255, 0.1);
  
  --auth-input-bg-light: #FFFFFF;
  --auth-input-bg-dark: rgba(15, 23, 42, 0.6);
  
  --auth-glass-border: rgba(255, 255, 255, 0.2);
  --auth-emerald: #10B981;
  --auth-emerald-hover: #059669;
  --auth-emerald-light: rgba(16, 185, 129, 0.1);
  
  --auth-focus-ring: rgba(16, 185, 129, 0.3);
  --font-sans: 'Inter', system-ui, sans-serif;
  
  --auth-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
  --auth-shadow-dark: 0 20px 40px -10px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root {
    --auth-bg: var(--auth-bg-dark);
    --auth-card-bg: var(--auth-card-bg-dark);
    --auth-text-primary: var(--auth-text-primary-dark);
    --auth-text-secondary: var(--auth-text-secondary-dark);
    --auth-border: var(--auth-border-dark);
    --auth-input-bg: var(--auth-input-bg-dark);
    --auth-shadow-current: var(--auth-shadow-dark);
  }
}
@media (prefers-color-scheme: light) {
  :root {
    --auth-bg: var(--auth-bg-light);
    --auth-card-bg: var(--auth-card-bg-light);
    --auth-text-primary: var(--auth-text-primary-light);
    --auth-text-secondary: var(--auth-text-secondary-light);
    --auth-border: var(--auth-border-light);
    --auth-input-bg: var(--auth-input-bg-light);
    --auth-shadow-current: var(--auth-shadow);
  }
}

/* Base Body */
.auth-body {
  margin: 0;
  padding: 0;
  background: var(--auth-bg);
  min-height: 100vh;
  display: flex;
  font-family: var(--font-sans);
  color: var(--auth-text-primary);
  overflow-x: hidden;
  transition: background-color 0.4s ease;
}

/* ── LAYOUT ────────────────────────────────────────────────── */
.auth-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

/* ── LEFT PANE (BRANDING) ────────────────────────────────── */
.auth-left {
  flex: 0 0 50%;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-left-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('india_skyline.jpg') center center / cover no-repeat;
  z-index: 1;
  transform: scale(1.05);
  animation: auth-bg-pan 30s ease-in-out infinite alternate;
}

@keyframes auth-bg-pan {
  0% { transform: scale(1.05) translate(0, 0); }
  100% { transform: scale(1.05) translate(-2%, 2%); }
}

.auth-left-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 100%);
  z-index: 2;
}

.auth-left-content {
  padding: 64px;
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  color: #FFFFFF;
}

.auth-logo {
  display: inline-block;
  margin-bottom: auto;
  text-decoration: none;
  animation: fade-in-down 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.auth-logo-text {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.auth-hero-text {
  margin-bottom: auto;
  animation: fade-in-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.auth-headline {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.auth-headline span {
  color: var(--auth-emerald);
}

.auth-desc {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  max-width: 480px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Glassmorphism Trust Badge */
.auth-trust-badge {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--auth-glass-border);
  padding: 20px 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: fade-in-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.4s;
  opacity: 0;
}
.auth-trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--auth-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-trust-icon svg { width: 24px; height: 24px; }
.auth-trust-text {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
}

/* ── RIGHT PANE (FORM) ────────────────────────────────────── */
.auth-right {
  flex: 0 0 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px;
  overflow-y: auto;
  height: 100vh;
  box-sizing: border-box;
}

/* Top Right Nav */
.auth-top-nav {
  position: absolute;
  top: 40px;
  right: 64px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--auth-text-secondary);
  animation: fade-in 1s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
}
.auth-top-nav a {
  color: var(--auth-emerald);
  font-weight: 700;
  text-decoration: none;
  margin-left: 8px;
  transition: color 0.2s ease;
}
.auth-top-nav a:hover {
  color: var(--auth-emerald-hover);
}

/* Main Form Card (Glassmorphism) */
.auth-card {
  background: var(--auth-card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  width: 100%;
  max-width: 480px;
  border-radius: 24px;
  padding: 40px 48px;
  box-shadow: var(--auth-shadow-current);
  border: 1px solid var(--auth-border);
  position: relative;
  z-index: 10;
  animation: scale-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  margin-top: 56px;
  margin-bottom: 40px;
}

/* Form Header */
.auth-header {
  margin-bottom: 24px;
}
.auth-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--auth-text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}
.auth-subtitle {
  font-size: 1rem;
  color: var(--auth-text-secondary);
}

/* Floating Label Form Group */
.auth-form-group {
  position: relative;
  margin-bottom: 18px;
}
.auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-text-secondary);
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
  z-index: 2;
  pointer-events: none;
}
.auth-input-icon svg { width: 20px; height: 20px; }

.auth-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--auth-text-primary);
  background: var(--auth-input-bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-sans);
  box-sizing: border-box;
}
.auth-input:focus {
  outline: none;
  border-color: var(--auth-emerald);
  box-shadow: 0 0 0 4px var(--auth-focus-ring);
  background: transparent;
}
.auth-input:focus + .auth-floating-label,
.auth-input:not(:placeholder-shown) + .auth-floating-label {
  top: 0;
  left: 44px;
  font-size: 0.75rem;
  padding: 0 4px;
  background: var(--auth-card-bg);
  color: var(--auth-emerald);
}
.auth-input:focus ~ .auth-input-icon {
  color: var(--auth-emerald);
}
.auth-input::placeholder {
  color: transparent; /* For floating label trick */
}

/* When not using floating label, standard placeholder */
.no-floating-label::placeholder {
  color: var(--auth-text-secondary);
}

.auth-floating-label {
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-text-secondary);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  z-index: 1;
}

.auth-pwd-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--auth-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.3s ease;
}
.auth-pwd-toggle:hover { color: var(--auth-text-primary); }

.auth-mobile-group {
  display: flex;
  gap: 12px;
}
.auth-select {
  width: 100px;
  padding: 16px;
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--auth-input-bg);
  color: var(--auth-text-primary);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.3s ease;
}
.auth-select:focus {
  outline: none;
  border-color: var(--auth-emerald);
  box-shadow: 0 0 0 4px var(--auth-focus-ring);
}
.auth-select-full {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--auth-text-primary);
  background: var(--auth-input-bg);
  font-family: var(--font-sans);
  appearance: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}
.auth-select-full:focus {
  outline: none;
  border-color: var(--auth-emerald);
  box-shadow: 0 0 0 4px var(--auth-focus-ring);
}

/* Checkboxes & Links */
.auth-flex-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--auth-text-secondary);
  cursor: pointer;
}
.auth-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--auth-emerald);
  cursor: pointer;
  border-radius: 4px;
}
.auth-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--auth-emerald);
  text-decoration: none;
  transition: color 0.2s ease;
}
.auth-link:hover { color: var(--auth-emerald-hover); }

/* Buttons */
.auth-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--auth-emerald) 0%, #059669 100%);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}
.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}
.auth-btn-primary:active {
  transform: translateY(0);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--auth-text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--auth-border);
}
.auth-divider::before { margin-right: 16px; }
.auth-divider::after { margin-left: 16px; }

.auth-btn-outline {
  width: 100%;
  background: transparent;
  color: var(--auth-text-primary);
  border: 1.5px solid var(--auth-border);
  padding: 16px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.2s ease;
}
.auth-btn-outline:hover {
  background: var(--auth-border);
}
.auth-btn-outline img {
  width: 24px;
  height: 24px;
}

/* Animations */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scale-up {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── RESPONSIVE DESIGN ────────────────────────────────────── */
@media (max-width: 1024px) {
  .auth-left { flex: 0 0 45%; }
  .auth-right { flex: 0 0 55%; }
  .auth-headline { font-size: 3rem; }
}

@media (max-width: 900px) {
  .auth-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  
  .auth-left { 
    flex: none;
    min-height: 40vh;
    height: 40vh;
    position: relative;
  }
  .auth-left-content { padding: 40px; }
  .auth-trust-badge { display: none; }
  
  .auth-right {
    flex: 1;
    height: auto;
    overflow-y: visible;
    padding: 32px 24px;
    background: var(--auth-bg);
  }
  .auth-top-nav {
    position: static;
    text-align: center;
    margin-bottom: 32px;
  }
  .auth-card {
    padding: 32px 24px;
    box-shadow: none;
    border: none;
    background: transparent;
    backdrop-filter: none;
    max-width: 100%;
    margin-top: 0;
  }
  .auth-floating-label {
    background: var(--auth-bg) !important;
  }
}
