/* ===== CENTERED CARD LAYOUT (DARK THEME) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Dark Theme Palette (Grey/Black) */
  --bg-body: #141414;
  /* Very dark grey/black background */
  --bg-card: #1f1f1f;
  /* Lighter grey for the card/right panel */
  --bg-input: #2a2a2a;
  /* Input fields */
  --bg-brand: #0f0f0f;
  /* Left panel branding bg */

  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #666666;

  --primary-color: #6366f1;
  /* Vibrant Indigo/Purple Accent */
  --primary-hover: #4f46e5;

  --border-color: #333333;
  --border-focus: #6366f1;

  --danger: #ef4444;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  /* Allow scrolling */
  display: flex;
  flex-direction: column;
  /* CRITICAL: Stack card and footer vertically */
  justify-content: center;
  align-items: center;
  /* Ensure padding prevents edge collision on small screens */
  padding: 40px 20px;
  overflow-y: auto;
  /* Force scroll capability */
}

/* ===== MAIN CARD CONTAINER ===== */
.auth-container {
  width: 100%;
  max-width: 1000px;
  /* Give it some breathing room */
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.main-card {
  width: 100%;
  max-width: 900px;
  min-height: 560px;
  background-color: var(--bg-card);
  border-radius: 20px;
  /* Slightly smoother corners */
  display: flex;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  /* Stronger shadow for depth */
  border: 1px solid rgba(255, 255, 255, 0.05);
  /* Subtle rim light */
  backdrop-filter: blur(10px);
}

/* ===== LEFT SIDE (BRANDING) ===== */
.card-left {
  flex: 4;
  background-color: var(--bg-brand);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

/* Removed overlay to make logo bright */
.card-left::after {
  display: none;
}

.brand-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

.brand-text p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.5;
}

/* ===== RIGHT SIDE (FORM) ===== */
.card-right {
  flex: 5;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* HEADER */
.form-header {
  margin-bottom: 32px;
}

.form-header h2 {
  font-size: 24px;
  /* Refined size */
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-accent {
  color: var(--primary-color);
  font-weight: 500;
  opacity: 0.9;
  font-size: 16px;
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.toggle-text {
  color: var(--text-secondary);
  font-size: 14px;
}

.toggle-text a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.toggle-text a:hover {
  text-decoration: underline;
}

/* SOCIAL */
.social-section {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.social-btn:hover {
  background-color: #333;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-icon {
  width: 18px;
  height: 18px;
}

/* DIVIDER */
.divider {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
  z-index: 1;
}

.divider span {
  background: var(--bg-card);
  padding: 0 10px;
  position: relative;
  z-index: 2;
}

/* INPUTS */
.input-row {
  display: flex;
  gap: 12px;
}

.input-group {
  margin-bottom: 16px;
  width: 100%;
}

.input-group.half {
  flex: 1;
}

.auth-form input:not([type="checkbox"]) {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.auth-form input::placeholder {
  color: #666;
}

.auth-form input:focus {
  border-color: var(--border-focus);
  background-color: var(--bg-input);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  /* Focus ring instead of just border */
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.checkbox-group a {
  color: var(--text-primary);
  text-decoration: underline;
}

/* BUTTONS */
.primary-btn {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.primary-btn:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}


/* GUEST ACCESS */
.guest-option {
  text-align: center;
  margin-top: 16px;
}

.guest-link {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.guest-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* UTILS */
.hidden {
  display: none;
}

/* RESPONSIVE */
@media (max-width: 800px) {
  .main-card {
    flex-direction: column;
    min-height: auto;
  }

  .card-left {
    display: none;
    /* Hide branding on mobile for compactness */
  }

  .card-right {
    padding: 30px;
  }
}