/**
 * Golden Teak — split auth modal (Luxe-inspired, brand colors)
 */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.auth-modal.open {
  display: flex;
}

.auth-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(74, 63, 26, 0.55);
  backdrop-filter: blur(6px);
}

.auth-modal__shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  width: min(920px, 100%);
  max-height: min(92vh, 640px);
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(74, 63, 26, 0.22);
  font-family: 'Inter', system-ui, sans-serif;
}

.auth-modal__promo {
  padding: 32px 28px;
  background: linear-gradient(165deg, #4a3f1a 0%, #6b5a20 45%, #2d7a9f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-modal__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-modal__logo {
  height: 36px;
  width: auto;
}

.auth-modal__brand-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.auth-modal__promo-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 500;
}

.auth-modal__promo-lead strong {
  font-weight: 800;
  color: #fef08a;
}

.auth-modal__perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-modal__perks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.auth-modal__star {
  color: #fbbf24;
  flex-shrink: 0;
  font-size: 0.75rem;
  margin-top: 2px;
}

.auth-modal__panel {
  position: relative;
  padding: 28px 32px 32px;
  overflow-y: auto;
}

.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal__tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #faf6ed;
  border-radius: 12px;
  margin-bottom: 20px;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.auth-tab.is-active {
  background: #fef9eb;
  color: #5c4f20;
  box-shadow: 0 1px 4px rgba(74, 63, 26, 0.08);
}

.auth-modal__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #4a3f1a;
  margin: 0 0 8px;
  line-height: 1.25;
}

.auth-modal__sub {
  margin: 0 0 20px;
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.45;
}

.auth-modal__timer {
  margin: -12px 0 16px;
  font-size: 0.82rem;
  color: #94a3b8;
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 0 14px;
  margin-bottom: 16px;
  background: #fff;
  transition: border-color 0.15s ease;
}

.auth-field:focus-within {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}

.auth-field__ico {
  color: #94a3b8;
  display: flex;
}

.auth-field__input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 0;
  font-size: 1rem;
  color: #4a3f1a;
  background: transparent;
  min-width: 0;
}

.auth-field__input--otp {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  padding: 16px 0;
}

.auth-field--otp {
  justify-content: center;
  padding: 0 14px;
}

.auth-field__input--plain {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}

.auth-field-row .auth-field__input--plain {
  margin-bottom: 10px;
}

.auth-hint {
  margin: -8px 0 12px;
  font-size: 0.8rem;
  color: #b45309;
  background: #fffbeb;
  padding: 8px 12px;
  border-radius: 8px;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #475569;
  margin: 8px 0 16px;
  cursor: pointer;
}

.auth-btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.1s ease;
}

.auth-btn--primary {
  background: #4a3f1a;
  color: #fff;
  margin-bottom: 10px;
}

.auth-btn--primary:hover {
  background: #5c4f20;
}

.auth-btn--ghost {
  background: #f1f5f9;
  color: #5c4f20;
  margin-bottom: 8px;
}

.auth-btn--link {
  background: transparent;
  color: #b8860b;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px;
}

/* Login page full-screen variant */
.page-auth {
  background: #fef9eb;
}

.page-auth #main-content {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-page-wrap .auth-modal__shell {
  max-height: none;
  width: min(920px, 100%);
}

.auth-modal--embedded {
  position: relative;
  inset: auto;
  display: block;
  padding: 0;
  z-index: 1;
}

.auth-modal--embedded .auth-modal__overlay {
  display: none;
}

.auth-modal--embedded .auth-modal__close {
  display: none;
}

@media (max-width: 767.98px) {
  .auth-modal {
    padding: 0;
    align-items: flex-end;
  }

  .auth-modal__shell {
    grid-template-columns: 1fr;
    max-height: 96vh;
    border-radius: 20px 20px 0 0;
    width: 100%;
  }

  .auth-modal__promo {
    padding: 20px 20px 16px;
    gap: 12px;
  }

  .auth-modal__perks {
    display: none;
  }

  .auth-modal__panel {
    padding: 20px 20px 28px;
  }
}
