:root {
  --bs-font-sans-serif:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans",
    "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";

  --bs-font-monospace:
    SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  --primary: #eab308;
  --primary-hover: #eab308;
  --dark: #07001f;
  --text: #333;
  --muted: #6b7280;
  --bg: #eab308;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 10px;
}

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

body {
  font-family: var(--bs-font-sans-serif);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  transition: max-width 0.3s ease;
}

/* --- Step Indicator --- */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.step {
  height: 5px;
  width: 35px;
  background: var(--border);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.step.active {
  background: var(--primary);
  width: 45px;
}

/* --- Brand & Header --- */
.brand-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.brand-logo img {
  height: 85px;
}
.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-header h1 {
  color: var(--dark);
  font-size: 1.8rem;
  margin-bottom: 5px;
}
.auth-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Form Stepping --- */
.form-step {
  display: none;
}
.form-step.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.form-group input,
select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  background: #fdfdfd;
  color: var(--text);
}

.form-group input:focus {
  border-color: var(--primary);
  outline: none;
  background: #fff;
}

input:invalid.attempted {
  border-color: #ff4d4d;
}

/* --- Buttons --- */
.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 1.5rem;
  justify-content: center;
}

.primary-btn,
.secondary-btn {
  flex: 1;
  padding: 0.8rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  transition: 0.2s;
}

.primary-btn {
  background: var(--primary);
  color: #000;
}
.primary-btn:hover {
  background: var(--primary-hover);
}

.secondary-btn {
  background: #f3f4f6;
  color: var(--text);
}
.secondary-btn:hover {
  background: #e5e7eb;
}

/* --- Social Auth --- */
.social-auth {
  margin-top: 1.8rem;
  text-align: center;
}

/* Mobile horizontal divider logic */
.mobile-divider-text {
  display: flex;
  align-items: center;
  color: var(--text);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}

.mobile-divider-text::before,
.mobile-divider-text::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.mobile-divider-text:not(:empty)::before {
  margin-right: 1rem;
}
.mobile-divider-text:not(:empty)::after {
  margin-left: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: 0.6rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: 0.2s;
}

.social-btn:hover {
  background: #f9fafb;
  border-color: var(--primary);
}
.social-btn img {
  width: 18px;
}

/* --- Footer --- */
.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}
.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover {
  text-decoration: underline;
}

/* --- DESKTOP SPLIT LAYOUT --- */
.side-divider {
  display: none;
}

@media (min-width: 850px) {
  .auth-card {
    max-width: 850px; /* Wider card for signup since it has more inputs */
    padding: 3rem;
  }

  .auth-content-container {
    display: flex;
    align-items: stretch;
    gap: 3rem;
    margin-top: 1rem;
  }

  .signup-form-section,
  .social-auth {
    flex: 1;
  }

  /* Adjust height of form area to keep everything aligned */
  .signup-form-section {
    min-height: 280px;
  }

  .mobile-divider-text {
    display: none;
  }

  .side-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 1px;
    background: var(--border);
  }

  .side-divider span {
    position: absolute;
    background: var(--card);
    padding: 10px 0;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: bold;
  }

  .social-auth {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .social-buttons-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Password Toggle Styling */
.password-container {
  position: relative;
  width: 100%;
}

#signup-password {
  width: 100%;
  padding-right: 40px;
}

#signupTogglePassword {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #7a797e;
  z-index: 2;
}

#signupTogglePassword:hover {
  color: #5887ef;
}

/* ============================================================
   DARK MODE OVERRIDES FOR AUTH PAGES
   ============================================================ */
html.dark {
  --bg: #000000;
  --card: #0d0e0f;
  --text: #f8fafc;
  --dark: #f8fafc;
  --muted: #a8b3c7;
  --border: rgba(245, 158, 11, 0.25);
}

html.dark body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

html.dark .auth-card {
  background-color: var(--card) !important;
  border: 1px solid var(--border);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

html.dark .form-group input,
html.dark .form-group select {
  background-color: #1a2338 !important;
  color: #f3f4f6 !important;
  border-color: var(--border) !important;
}

html.dark .form-group input::placeholder {
  color: #64748b !important;
}

html.dark .social-btn {
  background-color: #1a2338 !important;
  color: #f8fafc !important;
  border-color: var(--border) !important;
}

html.dark .social-btn:hover {
  background-color: rgba(245, 158, 11, 0.1) !important;
  border-color: #facc15 !important;
}

html.dark .social-btn img {
  filter: brightness(0.95);
}

html.dark .secondary-btn {
  background-color: #1a2338 !important;
  color: #f8fafc !important;
  border: 1px solid var(--border);
}

html.dark .secondary-btn:hover {
  background-color: rgba(245, 158, 11, 0.15) !important;
}

html.dark .side-divider span {
  background-color: var(--card) !important;
  color: var(--muted) !important;
}

html.dark .step {
  background-color: #1a2338;
}

html.dark .step.active {
  background-color: var(--primary);
}
