.member-invite {
  padding: clamp(4rem, 8vw, 8rem) max(5vw, 35px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  background: linear-gradient(120deg, #17213d, #080808);
  color: #fff;
  border-top: 7px solid #c8172c;
}
.member-invite > div { max-width: 850px; }
.member-invite h2 { margin: .5rem 0; font-size: clamp(2.7rem, 6vw, 6rem); line-height: .92; letter-spacing: -.065em; }
.member-invite p:not(.eyebrow) { max-width: 650px; color: #d7d8de; font-size: 1.05rem; }
.member-invite .button { flex: none; cursor: pointer; }
.member-invite-actions { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.member-login-link { color: #fff; border-color: #ffffff70; }

.member-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 30px 100px #0008;
}
.member-dialog::backdrop { background: #070914d9; backdrop-filter: blur(3px); }
.member-form { position: relative; padding: 0; background: #f3f0eb; }
.member-form-header { min-height: 174px; padding: 34px 92px 32px 36px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; color: #fff; background: linear-gradient(125deg,#10182e,#17213d 62%,#9e1426 155%); }
.member-form-header > div { max-width: 700px; }
.member-form-header .eyebrow { margin: 0 0 7px; color: #ff7181; }
.member-form-header h2 { margin: 0; font-size: clamp(2.15rem, 4vw, 3.55rem); line-height: .96; letter-spacing: -.055em; }
.member-form-header p:last-child { max-width: 650px; margin: 11px 0 0; color: #d9dce5; font-size: .86rem; }
.member-form-header > a { flex: none; color: #fff; font-size: .72rem; font-weight: 900; text-decoration: none; border-bottom: 1px solid #ffffff88; padding-bottom: 4px; }

.member-form-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  align-items: start;
}
.member-form-column {
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 14px;
  background: #fff;
  border: 1px solid #dedad4;
  border-radius: 17px;
  box-shadow: 0 10px 28px #17213d0c;
}
.member-column-title { display: flex; align-items: center; gap: 11px; padding-bottom: 12px; border-bottom: 1px solid #ece8e2; }
.member-column-title > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  background: #c8172c;
  color: #fff;
  font-size: .7rem;
  font-weight: 900;
}
.member-column-title div { display: grid; gap: 2px; }
.member-column-title strong { color: #181818; font-size: .91rem; }
.member-column-title small { color: #777; font-size: .69rem; }

.member-form label { display: grid; gap: 6px; color: #252525; font-size: .76rem; font-weight: 800; }
.member-form label small, .member-fieldset legend small { color: #777; font-weight: 500; }
.member-form input, .member-form select {
  width: 100%;
  min-height: 45px;
  border: 1px solid #c8c5c0;
  border-radius: 9px;
  padding: 0 12px;
  background: #fff;
  color: #111;
  font: inherit;
  outline: none;
}
.member-form input:focus, .member-form select:focus { border-color: #17213d; box-shadow: 0 0 0 3px #17213d14; }
.member-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.member-form-grid.city-state { grid-template-columns: 1fr 78px; }
.member-fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  display: grid;
  gap: 11px;
  border: 1px solid #d8d4ce;
  border-radius: 11px;
  background: #f8f7f4;
}
.member-fieldset legend { padding: 0 7px; color: #252525; font-size: .76rem; font-weight: 850; }
.member-cep-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.member-cep-row button {
  min-height: 45px;
  padding: 0 16px;
  border: 1px solid #17213d;
  border-radius: 9px;
  background: #17213d;
  color: #fff;
  font-size: .73rem;
  font-weight: 850;
  cursor: pointer;
}
.cep-status { color: #666; font-size: .68rem; line-height: 1.45; }
.member-password-fieldset>p{margin:0;color:#666;font-size:.69rem;line-height:1.45}

.leader-search-label span { font-weight: 800; }
.selected-leader { margin: 0; padding: 8px 10px; color: #5c5c5c; background: #f0eee9; border-radius: 8px; font-size: .7rem; }
.leader-results {
  height: 330px;
  overflow-y: auto;
  border: 1px solid #d8d4ce;
  border-radius: 9px;
  background: #fff;
  scrollbar-color: #a7a29a #f3f1ed;
}
.leader-results button {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  display: grid;
  gap: 2px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eeeae4;
  background: #fff;
  color: #191919;
  cursor: pointer;
}
.leader-results button:last-child { border-bottom: 0; }
.leader-results button:hover, .leader-results button.is-selected { background: #f4eee8; }
.leader-results button.is-selected { box-shadow: inset 3px 0 #c8172c; }
.leader-results strong { font-size: .76rem; }
.leader-results span { color: #777; font-size: .66rem; }
.leader-loading, .leader-empty { margin: 0; padding: 18px 12px; color: #777; font-size: .72rem; line-height: 1.45; }

.ministry-section[hidden] { display: none; }
.ministry-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ministry-options label {
  min-height: 46px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ddd9d3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: .73rem;
}
.ministry-options label:has(input:checked) { border-color: #c8172c; background: #fff0f2; box-shadow: inset 3px 0 #c8172c; }
.ministry-options input {
  width: 15px;
  height: 15px;
  min-height: 0;
  flex: 0 0 15px;
  margin: 0;
  padding: 0;
  accent-color: #c8172c;
  box-shadow: none;
}

.member-form-footer { padding: 0 18px 22px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.member-form-footer > div { min-width: 0; }
.member-form-footer > .button { min-width: 220px; border-radius: 9px; cursor: pointer; }
.member-form-footer > .button:disabled { opacity: .55; }
.member-form-status { min-height: 18px; margin: 0; color: #176735; font-size: .79rem; font-weight: 800; }
.member-form-status.error { color: #9b1526; }
.member-privacy { display: block; margin-top: 4px; color: #777; font-size: .67rem; line-height: 1.45; }
.member-dialog-close {
  position: absolute;
  z-index: 2;
  right: 24px;
  top: 24px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #ffffff18;
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 760px) {
  .member-invite { align-items: stretch; flex-direction: column; padding: 4rem 20px; }
  .member-invite-actions { display: grid; }
  .member-invite .button { width: 100%; }
  .member-dialog { width: min(100% - 18px, 560px); max-height: calc(100vh - 18px); border-radius: 16px; }
  .member-form-header { min-height: 200px; padding: 28px 62px 27px 22px; display: block; }
  .member-form-header > a { display: inline-block; margin-top: 17px; }
  .member-form-columns { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
  .member-form-column { padding: 16px; }
  .member-dialog-close { right: 16px; top: 16px; }
  .leader-results { height: 300px; }
  .member-form-footer { padding: 0 14px 18px; grid-template-columns: 1fr; gap: 12px; }
  .member-form-footer > .button { width: 100%; }
}
@media (max-width: 480px) {
  .member-form-grid, .member-form-grid.city-state, .member-cep-row { grid-template-columns: 1fr; }
  .member-cep-row button { width: 100%; }
  .ministry-options { grid-template-columns: 1fr 1fr; }
}
