/* ============================================
   AUTH PAGES — InsightLo v2 Redesign
   Premium dark theme with glassmorphism
   ============================================ */

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

/* ——— Full-page background ——— */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #0B0F1A;
  position: relative;
  overflow: hidden;
}

/* Animated mesh gradient background */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(13, 148, 136, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 60% 10%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  animation: meshShift 12s ease-in-out infinite alternate;
}
@keyframes meshShift {
  0%   { transform: scale(1)   translate(0, 0); }
  50%  { transform: scale(1.1) translate(-2%, 3%); }
  100% { transform: scale(1)   translate(2%, -2%); }
}

/* Floating orbs */
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: orbFloat 8s ease-in-out infinite;
  pointer-events: none;
}
.auth-orb--1 {
  width: 320px; height: 320px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  top: -80px; left: -60px;
  animation-duration: 10s;
}
.auth-orb--2 {
  width: 240px; height: 240px;
  background: linear-gradient(135deg, #0D9488, #14B8A6);
  bottom: -50px; right: -40px;
  animation-duration: 8s;
  animation-delay: -3s;
}
.auth-orb--3 {
  width: 180px; height: 180px;
  background: linear-gradient(135deg, #F59E0B, #EAB308);
  top: 30%; right: 10%;
  opacity: 0.2;
  animation-duration: 12s;
  animation-delay: -5s;
}
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-30px) scale(1.08); }
}

/* ——— Main card ——— */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(40px) saturate(1.3);
  -webkit-backdrop-filter: blur(40px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 24px 64px rgba(0, 0, 0, 0.4);
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ——— Logo ——— */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.auth-logo svg { flex-shrink: 0; filter: drop-shadow(0 0 12px rgba(13,148,136,0.3)); }
.auth-logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: #fff;
  letter-spacing: -0.02em;
}
.auth-logo-text span {
  background: linear-gradient(135deg, #0D9488, #14B8A6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ——— Heading ——— */
.auth-heading {
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.auth-subheading {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ——— Status message ——— */
.auth-status-msg {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34D399;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

/* ——— Form groups ——— */
.auth-form-group {
  margin-bottom: 20px;
}
.auth-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  transition: color 0.2s;
}
.auth-form-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-size: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.auth-form-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
.auth-form-input:focus ~ .auth-input-icon {
  color: #818CF8;
}
.auth-form-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.auth-form-error {
  font-size: 12px;
  color: #F87171;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.auth-form-error::before {
  content: '⚠';
  font-size: 11px;
}

/* ——— Row (remember + forgot) ——— */
.auth-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.auth-remember:hover { color: rgba(255, 255, 255, 0.7); }
.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #6366F1;
  border-radius: 4px;
  cursor: pointer;
}
.auth-link {
  font-size: 13px;
  color: #818CF8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.auth-link:hover { color: #A5B4FC; }

/* ——— Submit button ——— */
.auth-submit-btn {
  width: 100%;
  padding: 15px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #7C3AED 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.3s;
}
.auth-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}
.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.2);
}
.auth-submit-btn:hover::before {
  transform: translateX(100%);
}
.auth-submit-btn:active {
  transform: translateY(0);
}

/* ——— Divider ——— */
.auth-separator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* ——— Alt text ——— */
.auth-alt-text {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 28px;
}
.auth-alt-text a {
  color: #818CF8;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-alt-text a:hover { color: #A5B4FC; text-decoration: underline; }

/* ——— Features list (login only) ——— */
.auth-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.auth-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.auth-feat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.auth-feat-dot--indigo  { background: #6366F1; box-shadow: 0 0 8px rgba(99,102,241,0.4); }
.auth-feat-dot--teal    { background: #14B8A6; box-shadow: 0 0 8px rgba(20,184,166,0.4); }
.auth-feat-dot--amber   { background: #F59E0B; box-shadow: 0 0 8px rgba(245,158,11,0.4); }
.auth-feat-dot--violet  { background: #8B5CF6; box-shadow: 0 0 8px rgba(139,92,246,0.4); }

/* ——— Noise overlay for texture ——— */
.auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ——— Responsive ——— */
@media (max-width: 540px) {
  .auth-card {
    padding: 36px 24px;
    border-radius: 20px;
  }
  .auth-heading { font-size: 24px; }
  .auth-features {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .auth-orb--1 { width: 200px; height: 200px; }
  .auth-orb--2 { width: 160px; height: 160px; }
  .auth-orb--3 { display: none; }
}

/* ——— Google OAuth button ——— */
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.auth-google-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

