/* =====================================================
   NAMIREMBE GUESTHOUSE -- AUTH PAGES
   Login, Register, Forgot Password
   ===================================================== */

/* "-"- PAGE LAYOUT -- Two-column split "-"- */
.auth-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 100vh;
}

/* "-"- LEFT PANEL -- Brand / Decorative "-"- */
.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-12) var(--space-10);
  overflow: hidden;
  background: var(--color-earth);
}

/* Hero photo background */
.auth-brand-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.45;
  transform: scale(1.04);
  transition: transform 10s ease-out;
}

.auth-brand-panel:hover .auth-brand-bg {
  transform: scale(1.08);
}

/* Dark gradient overlay -- ensures text legibility */
.auth-brand-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(30,13,26, 0.55) 0%,
    rgba(30,13,26, 0.30) 40%,
    rgba(30,13,26, 0.80) 100%
  );
}

.auth-brand-content {
  position: relative;
  z-index: 1;
}

/* Logo inside left panel */
.auth-brand-panel .auth-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  position: absolute;
  top: var(--space-10);
  left: var(--space-10);
  z-index: 2;
}

.auth-brand-panel .logo-mark {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.40);
  border: 2px solid rgba(255,255,255,0.25);
  background: var(--color-earth);
  flex-shrink: 0;
}

.auth-brand-panel .logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-brand-panel .logo-text {
  display: flex;
  flex-direction: column;
}

.auth-brand-panel .logo-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-white);
  font-weight: var(--weight-semibold);
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.auth-brand-panel .logo-sub {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.75);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Decorative golden line accent */
.auth-brand-content::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gradient-gold);
  margin-bottom: var(--space-8);
  border-radius: var(--radius-full);
}

/* Quote in left panel */
.auth-quote {
  border-left: none;
  padding-left: 0;
  margin-bottom: 0;
}

.auth-quote p {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-style: italic;
  color: var(--color-white);
  line-height: var(--leading-snug);
  font-weight: var(--weight-normal);
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.auth-quote footer {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-style: normal;
}

/* Perks list below the quote */
.auth-perks {
  list-style: none;
  padding: 0;
  margin: var(--space-8) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.auth-perks li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.80);
  font-family: var(--font-body);
}

.auth-perks li svg {
  flex-shrink: 0;
  opacity: 0.9;
  color: var(--color-ochre-light);
}

/* "-"- RIGHT PANEL -- Form "-"- */
.auth-form-panel {
  background: var(--color-ivory);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-12) var(--space-8);
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

/* "-"- MOBILE LOGO (shown only on small screens) "-"- */
.auth-mobile-logo {
  display: none;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  margin-bottom: var(--space-8);
}

.auth-mobile-logo .logo-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-earth);
  flex-shrink: 0;
}

.auth-mobile-logo .logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-mobile-logo .logo-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-earth);
  font-weight: var(--weight-semibold);
  line-height: 1.1;
}

.auth-mobile-logo .logo-sub {
  font-size: var(--text-xs);
  color: var(--color-earth-mid);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

/* "-"- TAB SWITCHER "-"- */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-8);
  background: var(--color-ivory-warm);
  border-radius: var(--radius-lg);
  padding: 4px;
  border: var(--border-thin);
}

.auth-tab {
  flex: 1;
  padding: 0.625rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-earth-light);
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  text-align: center;
}

.auth-tab:hover {
  color: var(--color-earth);
}

.auth-tab.active {
  background: var(--bg-surface);
  color: var(--color-earth);
  font-weight: var(--weight-semibold);
  box-shadow: var(--shadow-sm);
}

/* "-"- ALERT BANNER "-"- */
.auth-alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  line-height: var(--leading-normal);
}

.auth-alert.hidden {
  display: none;
}

.auth-alert.error {
  background: var(--color-rust-pale);
  color: var(--color-rust);
  border: 1px solid rgba(166, 61, 47, 0.2);
}

.auth-alert.success {
  background: var(--color-success-pale);
  color: var(--color-success);
  border: 1px solid rgba(42, 122, 75, 0.2);
}

/* "-"- AUTH PANELS "-"- */
.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
  animation: auth-fade-in var(--duration-base) var(--ease-out);
}

@keyframes auth-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* "-"- TITLES "-"- */
.auth-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-earth);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--color-earth-light);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

/* "-"- FORM ELEMENTS "-"- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-earth);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-group input[type="email"],
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--color-earth);
  background: var(--bg-surface);
  border: 1.5px solid var(--color-ivory-dark);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  min-height: 46px;
  box-sizing: border-box;
}

.form-group input::placeholder {
  color: var(--color-mist);
}

.form-group input:hover {
  border-color: var(--color-earth-light);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-ochre);
  box-shadow: 0 0 0 3px rgba(214,99,193, 0.12);
  background: var(--bg-surface);
}

.form-group input.error {
  border-color: var(--color-rust);
  box-shadow: 0 0 0 3px rgba(166, 61, 47, 0.08);
}

/* Field error messages */
.field-error {
  font-size: var(--text-xs);
  color: var(--color-rust);
  min-height: 0;
  line-height: var(--leading-normal);
}

.field-error:empty {
  display: none;
}

/* "-"- PASSWORD FIELD "-"- */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding: 0.75rem 2.75rem 0.75rem 1rem;
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--color-earth);
  background: var(--color-white);
  border: 1.5px solid var(--color-ivory-dark);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  min-height: 46px;
  box-sizing: border-box;
}

.password-field input:hover {
  border-color: var(--color-earth-light);
}

.password-field input:focus {
  outline: none;
  border-color: var(--color-ochre);
  box-shadow: 0 0 0 3px rgba(214,99,193, 0.12);
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: var(--space-1);
  cursor: pointer;
  color: var(--color-earth-light);
  transition: var(--transition-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.password-toggle svg {
  display: block;
}

/* Password strength meter */
.password-strength {
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--color-ivory-dark);
  margin-top: var(--space-2);
  overflow: hidden;
  transition: var(--transition-base);
}

.password-strength:empty {
  display: none;
}

.password-strength .strength-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--duration-base) var(--ease-out);
}

/* "-"- CHECKBOX "-"- */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--color-ivory-dark);
  border-radius: 4px;
  accent-color: var(--color-ochre);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check label {
  font-size: var(--text-sm);
  color: var(--color-earth-mid);
  cursor: pointer;
  user-select: none;
}

/* "-"- FORGOT PASSWORD LINK "-"- */
.forgot-link {
  font-size: var(--text-xs);
  color: var(--color-ochre-dark);
  font-weight: var(--weight-medium);
  transition: var(--transition-color);
}

.forgot-link:hover {
  color: var(--color-ochre);
}

/* "-"- BUTTONS "-"- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  min-height: 46px;
  text-decoration: none;
  letter-spacing: var(--tracking-wide);
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn-block {
  width: 100%;
}

/* "-"- DIVIDER "-"- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-block: var(--space-6);
  color: var(--color-earth-light);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-ivory-dark);
}

/* "-"- GOOGLE BUTTON "-"- */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 0.75rem 1.5rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--color-ivory-dark);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-earth);
  cursor: pointer;
  transition: var(--transition-base);
  min-height: 46px;
  text-decoration: none;
}

.btn-google:hover {
  border-color: var(--color-cloud);
  box-shadow: var(--shadow-md);
  background: var(--color-ivory-warm);
  transform: translateY(-1px);
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* "-"- TERMS TEXT "-"- */
.auth-terms {
  font-size: var(--text-xs);
  color: var(--color-earth-light);
  line-height: var(--leading-relaxed);
}

.auth-terms a {
  color: var(--color-ochre-dark);
  font-weight: var(--weight-medium);
  text-decoration: underline;
  text-decoration-color: rgba(214,99,193, 0.3);
  text-underline-offset: 2px;
}

.auth-terms a:hover {
  color: var(--color-ochre);
  text-decoration-color: var(--color-ochre);
}

/* "-"- BACK BUTTON "-"- */
.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-ochre-dark);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: var(--space-6);
  transition: var(--transition-color);
  font-family: var(--font-body);
}

.auth-back-btn:hover {
  color: var(--color-ochre);
}

/* "-"- FOOTER LINK "-"- */
.auth-footer-link {
  text-align: center;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: var(--border-thin);
}

.auth-footer-link a {
  font-size: var(--text-sm);
  color: var(--color-earth-light);
  transition: var(--transition-color);
  text-decoration: none;
}

.auth-footer-link a:hover {
  color: var(--color-ochre);
}

/* "-"- SUCCESS STATE "-"- */
.auth-success {
  text-align: center;
  padding: var(--space-8) 0;
}

.auth-success__icon {
  width: 72px;
  height: 72px;
  background: var(--color-success-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  color: var(--color-success);
}

.auth-success__icon svg {
  width: 36px;
  height: 36px;
}

.auth-success h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-earth);
  margin-bottom: var(--space-3);
}

.auth-success p {
  font-size: var(--text-sm);
  color: var(--color-earth-mid);
  line-height: var(--leading-relaxed);
}

/* "-"- RESPONSIVE "-"- */
@media (max-width: 1023px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-mobile-logo {
    display: flex;
  }

  .auth-form-panel {
    min-height: 100vh;
    padding: var(--space-8) var(--space-6);
    background: var(--bg-body);
  }

  .auth-form-wrap {
    max-width: 480px;
  }

  .auth-title {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 480px) {
  .auth-form-panel {
    padding: var(--space-6) var(--space-4);
    justify-content: flex-start;
    padding-top: var(--space-8);
  }

  .auth-form-wrap {
    max-width: 100%;
  }

  .auth-title {
    font-size: calc(var(--text-xl) + 0.25rem);
  }

  .auth-tabs {
    border-radius: var(--radius-md);
  }

  .auth-form {
    gap: var(--space-4);
  }
}


