/* === AUTH PAGE STYLES === */
:root {
  --auth-bg: #1A2018;
  --auth-form-bg: rgba(255, 255, 255, 0.05);
  --auth-glass: blur(12px) saturate(180%);
}

/* Style all Django-rendered inputs to look like the designed inputs */
.auth-page .form-group input[type="text"],
.auth-page .form-group input[type="email"],
.auth-page .form-group input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius, 8px);
  color: white;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.auth-page .form-group input[type="text"]:focus,
.auth-page .form-group input[type="email"]:focus,
.auth-page .form-group input[type="password"]:focus {
  border-color: var(--sand, #C8A96E);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(200, 169, 110, 0.1);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

body.auth-page {
  background: var(--auth-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: white;
  font-family: 'Inter', sans-serif;
}

.auth-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.auth-image {
  display: none;
  flex: 1;
  background-size: cover;
  background-position: center;
  position: relative;
}

.auth-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent, var(--auth-bg));
}

.auth-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  z-index: 10;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--auth-form-bg);
  backdrop-filter: var(--auth-glass);
  -webkit-backdrop-filter: var(--auth-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--sand);
  margin-bottom: 1rem;
  display: block;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sand-light);
}

.form-group input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  color: white;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--sand);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(200, 169, 110, 0.1);
}

/* Password Toggle Styles */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  padding-right: 3.5rem !important;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7); /* Increased visibility */
  font-size: 1rem;
  transition: color 0.3s ease;
  z-index: 10;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: var(--sand);
}

.auth-btn {
  background: var(--sand);
  color: var(--charcoal);
  border: none;
  padding: 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
}

.auth-btn:hover {
  background: var(--sand-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 169, 110, 0.3);
}

.auth-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.auth-footer a {
  color: var(--sand);
  font-weight: 500;
  margin-left: 0.5rem;
}

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

.social-auth {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.8rem;
  border-radius: var(--radius);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider:not(:empty)::before { margin-right: 1rem; }
.divider:not(:empty)::after { margin-left: 1rem; }

@media (min-width: 992px) {
  .auth-image {
    display: block;
  }
  .auth-content {
    background: var(--auth-bg);
  }
}

.auth-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* === RESPONSIVE: Tablet (≤768px) === */
@media (max-width: 768px) {
  body.auth-page {
    align-items: flex-start;
    padding: 0;
  }

  .auth-wrapper {
    flex-direction: column;
    min-height: 100vh;
  }

  /* Show thin image strip at the top */
  .auth-image {
    display: block;
    flex: 0 0 180px;
    min-height: 180px;
  }

  .auth-image::after {
    background: linear-gradient(to bottom, transparent, var(--auth-bg));
  }

  .auth-content {
    flex: 1;
    padding: 2rem 1.5rem;
    justify-content: flex-start;
  }

  .auth-card {
    padding: 2.5rem 2rem;
    max-width: 100%;
    border-radius: 16px;
  }

  .auth-logo {
    font-size: 1.5rem;
  }

  .auth-title {
    font-size: 1.3rem;
  }
}

/* === RESPONSIVE: Mobile (≤480px) === */
@media (max-width: 480px) {
  .auth-image {
    display: none;
  }

  .auth-content {
    padding: 2rem 1rem;
    justify-content: center;
    min-height: 100vh;
  }

  .auth-card {
    padding: 2rem 1.25rem;
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  .auth-logo {
    font-size: 1.35rem;
  }

  .auth-header {
    margin-bottom: 1.75rem;
  }

  .auth-form {
    gap: 1.25rem;
  }

  .form-group input {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  .auth-btn {
    padding: 0.9rem;
    font-size: 0.95rem;
  }
}