/* ====================================
   LOGIN & REGISTER PAGE - STYLES
   ==================================== */

/* Base Setup - Prevent Page Scrolling */
html,
body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body {
  background-color: var(--color-bg);
}

.auth-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: stretch;
  background-color: var(--color-bg);
  overflow: hidden;
}

.auth-page .container-fluid {
  max-width: 100%;
  height: 100%;
}

/* ==========================================
   LEFT COLUMN - IMAGE (FIXED)
   ========================================== */
.auth-image-container {
  position: relative;
  overflow: hidden;
  background-color: #f5f1ed;
  height: 100%;
  flex-shrink: 0;
}

.auth-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  display: block;
}

/* ==========================================
   RIGHT COLUMN - FORM (SCROLLABLE)
   ========================================== */
.auth-form-container {
  background-color: var(--color-bg);
  padding: 40px 20px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Hide Mobile Logo on Desktop/Tablet */
.auth-mobile-logo {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 500px;
  animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   TOGGLE TABS
   ========================================== */
.auth-toggle-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.auth-toggle {
  display: inline-flex;
  background-color: transparent;
  border-bottom: 2px solid var(--color-border);
  position: relative;
  gap: 0;
}

.auth-toggle-btn {
  background: none;
  border: none;
  padding: 12px 32px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
  z-index: 2;
}

.auth-toggle-btn.active {
  color: var(--color-primary);
}

.auth-toggle-btn:hover {
  color: var(--color-primary);
}

.auth-toggle-indicator {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: all 0.3s ease;
  z-index: 1;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */
.auth-form-wrapper {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.auth-form-wrapper.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-heading);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0 0 32px 0;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================
   INPUT FIELDS
   ========================================== */
.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-heading);
  letter-spacing: 0.5px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-size: 0.95rem;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background-color: white;
  color: var(--color-heading);
  transition: all 0.3s ease;
  font-family: inherit;
  outline: none;
}

.auth-input::placeholder {
  color: #bbb;
}

.auth-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(140, 189, 188, 0.1);
  background-color: white;
}

.auth-input-icon {
  position: absolute;
  left: 16px;
  font-size: 0.95rem;
  color: var(--color-primary);
  z-index: 2;
}

.auth-password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  z-index: 3;
  transition: all 0.2s ease;
}

.auth-password-toggle:hover {
  color: var(--color-primary);
}

/* ==========================================
   CHECKBOXES
   ========================================== */
.auth-checkbox {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
  gap: 10px;
  user-select: none;
}

.auth-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.auth-checkbox input[type="checkbox"]:hover {
  border-color: var(--color-primary);
}

.auth-checkbox input[type="checkbox"]:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.auth-checkbox span {
  line-height: 1.4;
}

.auth-checkbox strong {
  font-weight: 600;
  color: var(--color-heading);
}

/* ==========================================
   ACTIONS ROW
   ========================================== */
.auth-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 12px 0 24px 0;
}

.auth-link-forgot {
  font-size: 0.85rem;
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-link-forgot:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* ==========================================
   BUTTONS
   ========================================== */
.auth-btn {
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  width: 100%;
  margin-top: 16px;
}

.auth-btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.auth-btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(140, 189, 188, 0.25);
}

.auth-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(140, 189, 188, 0.15);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================
   FOOTER TEXT
   ========================================== */
.auth-footer-text {
  font-size: 0.85rem;
  color: var(--color-text);
  text-align: center;
  margin: 24px 0 0 0;
  font-style: italic;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablet (768px and below) - Maintain Split-Screen Scrolling */
@media (max-width: 991px) {
  .auth-form-container {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 20px;
  }

  .auth-card {
    max-width: 450px;
  }

  .auth-title {
    font-size: 1.4rem;
  }

  .auth-subtitle {
    font-size: 0.85rem;
  }

  .auth-input {
    padding: 12px 14px 12px 40px;
    font-size: 0.9rem;
  }

  .auth-input-icon {
    left: 14px;
    font-size: 0.85rem;
  }

  .auth-btn {
    padding: 12px 28px;
    font-size: 0.9rem;
  }

  .auth-toggle-btn {
    padding: 10px 24px;
    font-size: 0.8rem;
  }
}

/* Mobile (576px and below) - Branded Design */
@media (max-width: 575px) {
  /* Allow page to scroll on mobile */
  html,
  body {
    height: auto;
    overflow: visible;
    background-color: var(--color-primary);
  }

  .auth-page {
    height: auto;
    flex-direction: column;
    overflow: visible;
    background-color: var(--color-primary);
  }

  .auth-page .container-fluid {
    height: auto;
  }

  .auth-image-container {
    display: none !important;
    height: 300px;
    border-radius: 12px;
    margin: 0;
    width: 100%;
    flex-shrink: 0;
  }

  .auth-image {
    border-radius: 12px;
  }

  .auth-form-container {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 40px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background-color: var(--color-primary);
  }

  /* Mobile Logo */
  .auth-mobile-logo {
    width: 140px;
    height: auto;
    object-fit: contain;
    margin: 0;
    display: block;
  }

  .auth-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 32px 20px;
  }

  /* Mobile Toggle Styling */
  .auth-toggle {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    border-bottom: none;
    padding: 4px;
    gap: 4px;
  }

  .auth-toggle-btn {
    color: var(--color-text);
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    background-color: transparent;
  }

  .auth-toggle-btn.active {
    color: var(--color-primary);
    background-color: white;
    font-weight: 700;
  }

  .auth-toggle-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
  }

  .auth-toggle-btn.active:hover {
    color: var(--color-primary);
    background-color: white;
  }

  .auth-toggle-indicator {
    display: none;
  }

  /* Mobile Form Title & Subtitle */
  .auth-title {
    color: var(--color-heading);
  }

  .auth-subtitle {
    color: var(--color-text);
  }

  /* Mobile Action Button */
  .auth-btn-primary {
    background-color: white;
    color: var(--color-primary);
    font-weight: 700;
  }

  .auth-btn-primary:hover {
    background-color: #f5f5f5;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  }

  .auth-btn-primary:active {
    background-color: #f0f0f0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  }

  .auth-toggle-wrapper {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .auth-title {
    font-size: 1.2rem;
  }

  .auth-subtitle {
    font-size: 0.8rem;
    margin-bottom: 24px;
  }

  .auth-form {
    gap: 16px;
  }

  .auth-input-group {
    gap: 6px;
  }

  .auth-label {
    font-size: 0.8rem;
  }

  .auth-input {
    padding: 11px 12px 11px 38px;
    font-size: 0.85rem;
  }

  .auth-input-icon {
    left: 12px;
    font-size: 0.8rem;
  }

  .auth-password-toggle {
    right: 12px;
    font-size: 0.8rem;
  }

  .auth-checkbox {
    font-size: 0.8rem;
    gap: 8px;
  }

  .auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }

  .auth-actions {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    margin: 16px 0 20px 0;
  }

  .auth-link-forgot {
    font-size: 0.8rem;
  }

  .auth-btn {
    padding: 11px 24px;
    font-size: 0.85rem;
    margin-top: 12px;
  }

  .auth-toggle-btn {
    padding: 8px 20px;
    font-size: 0.7rem;
  }

  .auth-footer-text {
    font-size: 0.8rem;
    margin-top: 16px;
  }
}

/* Extra Small (320px and below) */
@media (max-width: 319px) {
  .auth-card {
    width: 100%;
  }

  .auth-title {
    font-size: 1rem;
  }

  .auth-toggle-btn {
    padding: 8px 16px;
    font-size: 0.65rem;
  }

  .auth-input {
    padding: 10px 10px 10px 34px;
    font-size: 0.8rem;
  }
}
