/**
 * Auth pages: login, register, forgot-password, reset-password
 * Full-screen background + overlay; single centered column (logo, info, form).
 * Form 70–80% width of content area. Uses theme.css tokens only.
 */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--spacing-6, 1.5rem);
  box-sizing: border-box;
}
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-safari.jpg') center/cover no-repeat;
  z-index: 0;
}
.auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--color-primary, #1b4965) 0%, var(--color-primary-dark, #16324d) 100%);
  opacity: 0.88;
  z-index: 1;
}
.auth-page__center {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.auth-page__center--wide {
  max-width: 950px;
}
.auth-page__logo {
  display: inline-block;
  margin-bottom: var(--spacing-6, 1.5rem);
}
.auth-page__logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}
.auth-page__info {
  color: var(--color-bg-white);
  margin-bottom: var(--spacing-8, 2rem);
}
.auth-page__tagline {
  font-family: var(--font-tagline);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1;
  color: var(--color-white);
  font-weight: 600;
  letter-spacing: 1.5px;
  margin: 0 0 var(--spacing-3, 0.75rem);
}
.auth-page__headline {
  font-family: var(--font-primary);
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 var(--spacing-3, 0.75rem);
}
.auth-page__desc {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.95;
  margin: 0 0 var(--spacing-4, 1rem);
}
.auth-page__points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-5, 1.25rem);
  flex-wrap: nowrap;
}
.auth-page__points li {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2, 0.5rem);
  font-size: 0.9rem;
  white-space: nowrap;
}
.auth-page__points li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-secondary);
  flex-shrink: 0;
}
.auth-trial-badge {
  display: inline-block;
  padding: var(--spacing-2, 0.5rem) var(--spacing-4, 1rem);
  background: rgba(16, 185, 129, 0.2);
  color: #d1fae5;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full, 999px);
  margin-top: var(--spacing-3, 0.75rem);
}
.auth-page__form-wrap {
  width: 100%;
  max-width: 78%;
  min-width: 280px;
}
.auth-page__form-wrap--wide {
  max-width: 85%;
}
.auth-card {
  width: 100%;
  padding: var(--spacing-8, 2rem);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl, 12px);
  border: 1px solid var(--color-border);
  box-sizing: border-box;
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-hero);
  transition: box-shadow var(--transition-slow), transform var(--transition-slow);
}
.auth-card__title {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--spacing-6, 1.5rem);
}
.auth-form .form-group {
  margin-bottom: var(--spacing-5, 1.25rem);
}
.auth-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-5, 1.25rem);
}
.auth-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--spacing-2, 0.5rem);
  text-align: left;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="url"],
.auth-form input[type="tel"],
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
  font-size: 1rem;
  font-family: var(--font-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 8px);
  background: rgba(255, 255, 255, 0.8);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(27, 73, 101, 0.15);
}
.auth-form .input-wrap {
  position: relative;
}
.auth-form .input-wrap input {
  padding-right: 48px;
}
.auth-form .pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-form .pw-toggle:hover {
  color: var(--color-text);
}
.auth-form .checkbox-wrap {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}
.auth-form input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--color-primary);
}
.auth-form .btn-primary {
  width: 100%;
  padding: var(--spacing-3, 0.75rem) var(--spacing-5, 1.25rem);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-primary);
  color: var(--color-bg-white);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-lg, 8px);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.auth-form .btn-primary:hover {
  background: var(--color-primary-dark);
}
.auth-form .btn-primary:active {
  transform: translateY(1px);
}
.auth-form .alert {
  padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
  border-radius: var(--radius-md, 6px);
  margin-bottom: var(--spacing-5, 1.25rem);
  font-size: 0.9375rem;
}
.auth-form .alert-danger {
  background: var(--color-danger-light);
  color: var(--color-danger-dark);
  border: 1px solid var(--color-danger);
}
.auth-form .alert-success {
  background: var(--color-success-light);
  color: var(--color-success-dark);
  border: 1px solid var(--color-success);
}
.auth-links {
  margin-top: var(--spacing-6, 1.5rem);
  text-align: center;
  font-size: 0.9375rem;
}
.auth-links a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}
.auth-links a:hover {
  text-decoration: underline;
}

/* Destination / option boxes (like inquiry Tour Type) */
.auth-form .destination-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2, 0.5rem);
}
.auth-form .destination-box {
  margin: 0;
  cursor: pointer;
}
.auth-form .destination-box input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.auth-form .destination-box .box-inner {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg, 8px);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 0.9375rem;
}
.auth-form .destination-box input:focus-visible + .box-inner {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.auth-form .destination-box input:checked + .box-inner {
  border-color: var(--color-secondary);
  background: rgba(181, 84, 58, 0.08);
  box-shadow: 0 0 0 1px var(--color-secondary);
}
.auth-form .destination-box:hover .box-inner {
  border-color: #adb5bd;
}

/* Custom dropdown (country with flags) - auth standalone */
.auth-form .custom-dropdown {
  position: relative;
  width: 100%;
}
.auth-form .custom-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 10px);
  padding: 0.5rem 0.75rem;
  padding-right: 2.25rem;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 8px);
  background: var(--color-bg-white);
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}
.auth-form .custom-dropdown-trigger .custom-dropdown-placeholder {
  color: var(--color-muted);
}
.auth-form .custom-dropdown-trigger .custom-dropdown-flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.auth-form .custom-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  margin-top: 2px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 8px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
  max-height: 260px;
  display: none;
  flex-direction: column;
}
.auth-form .custom-dropdown.open .custom-dropdown-panel {
  display: flex;
}
.auth-form .custom-dropdown-search {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
}
.auth-form .custom-dropdown-search input {
  width: 100%;
  padding: 0.4rem 0.75rem 0.4rem 2rem;
  font-size: 0.9375rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'%3e%3cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3e%3c/svg%3e") no-repeat left 0.5rem center;
  background-size: 14px 14px;
}
.auth-form .custom-dropdown-list {
  overflow-y: auto;
  padding: 0.25rem 0;
  max-height: 200px;
}
.auth-form .custom-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.9375rem;
}
.auth-form .custom-dropdown-item:hover,
.auth-form .custom-dropdown-item.highlight {
  background: var(--color-bg, #f8f9fa);
}
.auth-form .custom-dropdown-item .item-flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.auth-form .phone-group {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 8px);
  overflow: hidden;
  background: var(--color-bg-white);
}
.auth-form .phone-extension {
  padding: 0.5rem 0.75rem;
  background: var(--color-bg, #f1f5f9);
  color: var(--color-muted);
  font-size: 1rem;
  min-width: 4rem;
  text-align: center;
  border-right: 1px solid var(--color-border);
}
.auth-form .phone-group input {
  border: none;
  border-radius: 0;
  flex: 1;
}
.auth-form .phone-group:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(27, 73, 101, 0.15);
}
.auth-form .pw-strength {
  font-size: 0.8125rem;
  margin-top: var(--spacing-1, 0.25rem);
}
.auth-form .pw-strength.weak { color: var(--color-danger, #dc3545); }
.auth-form .pw-strength.medium { color: #d97706; }
.auth-form .pw-strength.strong { color: var(--color-success, #059669); }
.auth-form .help {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: var(--spacing-1, 0.25rem);
}

/* Utility (auth pages don't load Bootstrap) */
.d-none {
  display: none !important;
}

/* Label row with info icon */
.auth-form .label-inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  margin-bottom: 8px;
  width: 100%;
  text-align: left;
}
.auth-form .info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  outline: none;
}
.auth-form .info-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(27, 73, 101, 0.35);
  background: rgba(255, 255, 255, 0.75);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  font-family: var(--font-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.auth-form .info-wrap:hover .info-icon,
.auth-form .info-wrap:focus-visible .info-icon {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(27, 73, 101, 0.6);
}
.auth-form .info-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.94);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.auth-form .info-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid rgba(17, 24, 39, 0.94);
}
.auth-form .info-wrap:hover .info-tooltip,
.auth-form .info-wrap:focus-visible .info-tooltip,
.auth-form .info-wrap.open .info-tooltip {
  opacity: 1;
  visibility: visible;
}
.auth-form .info-wrap.open .info-tooltip {
  pointer-events: auto;
}

/* Inline async validation */
.auth-form .field-status {
  font-size: 0.8125rem;
  margin-top: var(--spacing-1, 0.25rem);
  text-align: left;
}
.auth-form .field-status.error {
  color: var(--color-danger);
}
.auth-form .field-status.success {
  color: var(--color-success);
}
.auth-form .is-invalid {
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* Password strength meter (5px bar) */
.auth-form .pw-meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(229, 231, 235, 0.9);
  overflow: hidden;
  margin-top: var(--spacing-2, 0.5rem);
}
.auth-form .pw-meter__fill {
  height: 100%;
  width: 0%;
  transition: width 0.2s ease, background-color 0.2s ease;
  background: var(--color-danger);
}
.auth-form .pw-meter__label {
  font-size: 0.8125rem;
  margin-top: var(--spacing-1, 0.25rem);
  text-align: left;
  color: var(--color-muted);
}

@media (max-width: 640px) {
  .auth-form .form-row {
    grid-template-columns: 1fr;
  }
  .auth-page__form-wrap,
  .auth-page__form-wrap--wide {
    max-width: 100%;
  }
  .auth-page__points {
    flex-wrap: wrap; /* prevent overflow on small screens */
    justify-content: center;
  }
}
