/* =====================================================
   VARSACORE AUTH PAGES — Premium split-screen Design System
   ===================================================== */

:root {
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
  --radius-xl: 0.75rem;
  --radius-2xl: 1.25rem;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  /* Light Theme (Dashboard Indigo matching) */
  --color-bg:              #f8fafc; /* Slate 50 */
  --color-left-bg:         #ffffff;
  --color-surface:         #ffffff;
  --color-surface-offset:  #f1f5f9; /* Slate 100 */
  --color-border:          #e2e8f0; /* Slate 200 */
  --color-text:            #0f172a; /* Slate 900 */
  --color-text-muted:      #64748b; /* Slate 500 */
  --color-primary:         #4f46e5; /* Indigo 600 */
  --color-primary-glow:    rgba(79, 70, 229, 0.15);
  --color-shadow:          rgba(15, 23, 42, 0.08);
  --glass-blur:            20px;
}

html[data-theme="dark"] {
  /* Dark Theme (Dashboard Indigo matching) */
  --color-bg:              #0f172a; /* Slate 900 */
  --color-left-bg:         #0b0f19;
  --color-surface:         #1e293b; /* Slate 800 */
  --color-surface-offset:  #0f172a; /* Slate 900 */
  --color-border:          #334155; /* Slate 700 */
  --color-text:            #f8fafc; /* Slate 50 */
  --color-text-muted:      #94a3b8; /* Slate 400 */
  --color-primary:         #6366f1; /* Indigo 500 */
  --color-primary-glow:    rgba(99, 102, 241, 0.25);
  --color-shadow:          rgba(0, 0, 0, 0.3);
  --glass-blur:            12px;
}

/* Base Styles */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  margin: 0;
  padding: 0;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  position: relative;
}

/* Split Layout Container */
.auth-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
}

.auth-layout__left {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem;
  background-color: var(--color-left-bg);
  position: relative;
  overflow: hidden;
}

html[data-theme="light"] .auth-layout__left {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.02) 0%, transparent 60%);
}

html[data-theme="dark"] .auth-layout__left {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 45%);
}

.auth-layout__right {
  flex: 0.9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  background-color: var(--color-bg);
  position: relative;
}

@media (max-width: 991.98px) {
  .auth-layout {
    flex-direction: column;
  }
  .auth-layout__left {
    display: none !important;
  }
  .auth-layout__right {
    flex: 1;
    width: 100%;
    padding: 3rem 1.5rem;
  }
}

/* Brand Welcome/Hero Card */
.brand-hero-card {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: 1.25rem 2rem;
  box-shadow: 0 20px 45px -10px var(--color-shadow);
  max-width: 480px;
  width: 100%;
  margin-bottom: 3.5rem;
  z-index: 10;
  animation: floating 6s ease-in-out infinite;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: var(--transition-smooth);
}

@keyframes floating {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.brand-hero-card__logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-hero-card__logo {
  height: 44px;
  width: auto;
}

.brand-hero-card__logo-subtitle {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-hero-card__logo-subtitle strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
}

.brand-hero-card__logo-subtitle span {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.brand-hero-card__divider {
  width: 1px;
  height: 35px;
  background: var(--color-border);
  margin: 0 1.25rem;
}

.brand-hero-card__title {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.brand-hero-card__title strong {
  color: var(--color-text);
  font-weight: 700;
  display: block;
}

.brand-hero-illustration {
  max-width: 440px;
  width: 100%;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-hero-illustration img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  filter: drop-shadow(0 20px 30px var(--color-shadow));
}

/* Theme Toggle Float Wrapper */
.auth-theme-toggle-wrapper {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  z-index: 100;
}

@media (max-width: 991.98px) {
  .auth-theme-toggle-wrapper {
    top: 1rem;
    right: 1.5rem;
  }
}

/* Auth Container */
.auth-container {
  width: 100%;
  max-width: 440px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Brand Logo for Mobile (Shown on mobile, hidden on desktop) */
.brand-logo-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-decoration: none !important;
  margin-bottom: 0.5rem;
}

@media (max-width: 991.98px) {
  .brand-logo-mobile {
    display: flex;
  }
}

.brand-logo-mobile__img {
  height: 40px;
  width: auto;
}

.brand-logo-mobile__text {
  display: flex;
  flex-direction: column;
}

.brand-logo-mobile__text h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.1;
}

.brand-logo-mobile__text p {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Auth Card */
.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: 0 20px 40px -10px var(--color-shadow);
  padding: 2.75rem 2.25rem;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: var(--transition-smooth);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

html[data-theme="dark"] .auth-card {
  box-shadow: 0 30px 60px -15px var(--color-shadow) !important;
}

@media (max-width: 576px) {
  .auth-card {
    padding: 2rem 1.5rem;
  }
}

.auth-header {
  text-align: left;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.auth-header p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Forms */
.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  display: block;
}

.form-control {
  background: var(--color-surface-offset) !important;
  border: 1px solid var(--color-border) !important;
  color: var(--color-text) !important;
  padding: 0.75rem 1rem !important;
  border-radius: var(--radius-xl) !important;
  margin-bottom: 0px;
  transition: var(--transition-smooth) !important;
  font-size: 0.95rem !important;
  box-shadow: none !important;
}

.form-control:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 4px var(--color-primary-glow) !important;
  background: var(--color-surface) !important;
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* Autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-text) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--color-surface-offset) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Buttons */
.btn-varsa {
  background: var(--color-primary) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 0.8rem 1.5rem !important;
  border-radius: var(--radius-xl) !important;
  width: 100%;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-smooth) !important;
  box-shadow: 0 6px 15px -4px var(--color-primary-glow) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 1rem;
}

.btn-varsa:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -4px var(--color-primary-glow) !important;
  filter: brightness(1.05);
}

.btn-varsa:active {
  transform: translateY(0);
}

.btn-google {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-xl) !important;
  padding: 0.75rem 1.5rem !important;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth) !important;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px var(--color-shadow);
}

.btn-google:hover {
  background: var(--color-surface-offset) !important;
  border-color: var(--color-text-muted) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px var(--color-shadow);
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.75rem 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.divider::before { margin-right: 1rem; }
.divider::after { margin-left: 1rem; }

/* Theme Toggle */
.navbar__theme-toggle {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 4px;
  cursor: pointer;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px var(--color-shadow);
}

.navbar__theme-toggle:hover {
  transform: scale(1.05);
  border-color: var(--color-primary);
}

.theme-toggle__track {
  position: relative;
  width: 60px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

.theme-toggle__icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5px;
}

.theme-toggle__pill {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  background: var(--color-primary);
  border-radius: 50%;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px var(--color-primary-glow);
}

html[data-theme="light"] .theme-toggle__icon--sun { color: #fff; }
html[data-theme="dark"] .theme-toggle__icon--moon { color: #fff; }

html[data-theme="light"] .theme-toggle__pill { transform: translateX(0); }
html[data-theme="dark"] .theme-toggle__pill { transform: translateX(30px); }

/* Custom Checkbox */
.form-check {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  margin-bottom: 1.5rem !important;
}

.form-check-input {
  float: none !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  background-color: var(--color-surface-offset) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 0.35rem !important;
  cursor: pointer;
  transition: var(--transition-smooth);
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.form-check-input:checked {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.form-check-input:checked::after {
  content: "";
  position: absolute;
  top: 45%;
  left: 50%;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.form-check-label {
  margin-bottom: 0 !important;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  line-height: 1.2;
}

.form-check-input:checked + .form-check-label {
  color: var(--color-text);
}

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 1rem;
}

.auth-footer a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.auth-footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.auth-footer .copyright {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Alerts */
.alert {
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-weight: 500;
  border-left: 3px solid #ef4444;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.9rem;
}
