.password-access-button,
.account-password-button,
.password-modal button {
  font: inherit;
}

.password-access-button {
  width: 100%;
  min-height: 46px;
  margin-top: 16px;
  border: 1px solid #d5d8cc;
  border-radius: 12px;
  color: #6e5708;
  background: #fffdf4;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.password-access-button:hover {
  border-color: #c4a128;
  background: #fff8d9;
}

.account-password-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d7d9cf;
  border-radius: 9px;
  color: #4f514a;
  background: #fff;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.account-password-button:hover {
  border-color: #c49b11;
  color: #6e5708;
  background: #fff8da;
}

.email-password-note {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid #e3cf82;
  border-radius: 12px;
  background: #fffaf0;
}

.email-password-note strong {
  font-size: 11px;
}

.email-password-note p {
  margin: 0;
  color: #6f6650;
  font-size: 10px;
  line-height: 1.5;
}

.password-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 25, 19, 0.5);
  backdrop-filter: blur(4px);
}

.password-modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #d9dbd2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(19, 22, 15, 0.28);
}

.password-modal > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #e2e3dc;
  background: rgba(255, 255, 255, 0.97);
}

.password-modal > header div {
  display: grid;
  gap: 7px;
}

.password-modal > header small {
  color: #8b6a00;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.password-modal > header h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.password-modal-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  color: #5e6258;
  background: #f1f2ed;
  font-size: 22px;
  cursor: pointer;
}

.password-modal-body {
  display: grid;
  gap: 18px;
  padding: 24px 26px 28px;
}

.password-flow-intro {
  margin: 0;
  color: #6f7369;
  font-size: 13px;
  line-height: 1.55;
}

.password-flow-form {
  display: grid;
  gap: 16px;
}

.password-flow-field {
  display: grid;
  gap: 7px;
}

.password-flow-field > span {
  color: #5f6359;
  font-size: 10px;
  font-weight: 900;
}

.password-flow-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d5d8cc;
  border-radius: 11px;
  outline: none;
  color: #171913;
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}

.password-flow-field input:focus {
  border-color: #bf970b;
  box-shadow: 0 0 0 3px rgba(191, 151, 11, 0.12);
}

.password-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.password-flow-security {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid #dfe3d4;
  border-radius: 11px;
  background: #f7f8f3;
}

.password-flow-security strong {
  font-size: 11px;
}

.password-flow-security p {
  margin: 0;
  color: #74786d;
  font-size: 10px;
  line-height: 1.45;
}

.password-flow-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.password-flow-actions-split .password-flow-primary {
  margin-left: auto;
}

.password-flow-primary,
.password-flow-secondary {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.password-flow-primary {
  border: 0;
  color: #171913;
  background: #f2d367;
}

.password-flow-secondary {
  border: 1px solid #d4d6ce;
  color: #55584f;
  background: #fff;
}

.password-flow-primary:disabled,
.password-flow-secondary:disabled {
  opacity: 0.58;
  cursor: wait;
}

.password-flow-error {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #efb5aa;
  border-radius: 10px;
  color: #ad3325;
  background: #fff3f0;
  font-size: 11px;
  line-height: 1.45;
}

.password-flow-success {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px 4px 6px;
  text-align: center;
}

.password-flow-success > b {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #3d6d1d;
  background: #e6f3da;
  font-size: 24px;
}

.password-flow-success h3 {
  margin: 0;
  font-size: 21px;
}

.password-flow-success p {
  max-width: 430px;
  margin: 0 0 5px;
  color: #6f7369;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .account-password-button {
    order: 5;
    width: 100%;
  }

  .password-modal-bg {
    align-items: end;
    padding: 10px;
  }

  .password-modal {
    max-height: calc(100vh - 20px);
    border-radius: 18px;
  }

  .password-modal > header {
    padding: 19px 18px 15px;
  }

  .password-modal > header h2 {
    font-size: 21px;
  }

  .password-modal-body {
    padding: 18px;
  }

  .password-flow-grid {
    grid-template-columns: 1fr;
  }

  .password-flow-actions,
  .password-flow-actions-split {
    display: grid;
    grid-template-columns: 1fr;
  }

  .password-flow-actions-split .password-flow-primary {
    margin-left: 0;
  }
}
