/* ── AUTH MODAL ───────────────────────────────────── */

.modalOverlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(25,19,17,0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: overlayFadeIn 0.2s ease;
  padding: 16px;
}

@keyframes overlayFadeIn{
  from{ opacity: 0; }
  to  { opacity: 1; }
}

/* Modal Container */
.modal{
  width: 100%;
  max-width: 420px;
  background: #FAF7F2;
  border-radius: 18px;
  border: 1px solid var(--cream-border);
  box-shadow: 0 24px 60px rgba(25,19,17,0.18), 0 4px 16px rgba(25,19,17,0.08);
  animation: modalSlideUp 0.28s cubic-bezier(0.34,1.36,0.64,1);
}

@keyframes modalSlideUp{
  from{ opacity: 0; transform: translateY(18px) scale(0.97); }
  to  { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Header */
.modal__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 14px;
}

.modal__title{
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0;
}

.modal__iconBtn{
  width: 34px;
  height: 34px;
  border: 1px solid var(--cream-border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.modal__iconBtn:hover{
  background: var(--hover);
  border-color: #D5CBBC;
}

.modal__iconBtn:disabled{
  opacity: 0.4;
  cursor: not-allowed;
}

/* Body */
.modal__body{
  padding: 0 24px 28px;
}

/* Stacks */
.stack32{ display: flex; flex-direction: column; gap: 22px; }
.stack20{ display: flex; flex-direction: column; gap: 18px; }
.stack16{ display: flex; flex-direction: column; gap: 14px; }

/* Fields */
.field{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label{
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.inputWrap{
  position: relative;
  width: 100%;
}

.input{
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1.5px solid var(--cream-border);
  border-radius: 10px;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
}

.input:focus{
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.14);
}

.input::placeholder{
  color: var(--muted);
  opacity: 0.5;
}

.input:disabled{
  background: var(--hover);
  cursor: not-allowed;
}

.inputIconBtn{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.13s;
}

.inputIconBtn:hover{ background: var(--hover); }

/* Primary button */
.btnPrimary{
  position: relative;
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--btn);
  color: #FAF7F2;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.13s ease;
  overflow: hidden;
}

.btnPrimary:hover:not(:disabled){
  background: #2a2622;
  box-shadow: 0 6px 20px rgba(58,47,42,0.22);
  transform: translateY(-1px);
}

.btnPrimary:active:not(:disabled){
  transform: translateY(0);
}

.btnPrimary:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

/* link-style row button */
.linkRow{
  background: none;
  border: none;
  padding: 0;
  color: var(--btn);
  font-family: 'Geist', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  text-underline-offset: 2px;
  transition: opacity 0.18s ease;
  display: flex;
  justify-content: flex-start;
}

.linkRow:hover:not(:disabled){ opacity: 0.7; }

.linkRow:disabled{
  opacity: 0.4;
  cursor: not-allowed;
}

/* Divider */
.divider{
  position: relative;
  text-align: center;
}

.divider::before{
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--cream-border);
}

.divider span{
  position: relative;
  display: inline-block;
  padding: 0 14px;
  background: #FAF7F2;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* Help text */
.helpText{
  margin: 0;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--muted);
  line-height: 1.55;
}

.helpText.center{ text-align: center; }

.helpText a{
  color: var(--btn);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Error text */
.errorText{
  margin: 0;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: #B91C1C;
  line-height: 1.5;
}

/* Password checklist */
.passwordChecks{
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.passwordChecks li{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: -0.01em;
  color: var(--muted);
  transition: color 0.2s;
}

.passwordChecks li.valid{ color: #067647; }

.passwordChecks li .checkIcon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--cream-border);
  color: transparent;
  font-size: 11px;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.passwordChecks li.valid .checkIcon{
  background: #067647;
  color: #fff;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 480px){
  .modal{
    max-width: 100%;
    margin: 0;
    border-radius: 16px;
  }

  .modal__top{
    padding: 18px 18px 12px;
  }

  .modal__body{
    padding: 0 18px 24px;
  }
}