body.bp-auth-modal-open {
  overflow: hidden;
}

.bp-profile-backdrop,
.bp-profile-backdrop * {
  box-sizing: border-box;
}

.bp-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1010;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
  background: rgba(4, 18, 38, 0.78);
  backdrop-filter: blur(8px);
}

.bp-profile-backdrop[hidden],
.bp-profile-backdrop [hidden] {
  display: none !important;
}

.bp-profile-card {
  width: min(100%, 580px);
  max-height: calc(100vh - 40px);
  padding: 28px;
  overflow: auto;
  border: 1px solid rgba(173, 218, 239, 0.72);
  border-radius: 18px;
  background: #f8fcff;
  box-shadow: 0 28px 80px rgba(4, 18, 38, 0.42);
  color: #0f253d;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.bp-profile-header {
  margin-bottom: 20px;
}

.bp-profile-header h2 {
  margin: 0;
  color: #07152c;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.1;
}

.bp-profile-note,
.bp-profile-match {
  margin: 7px 0 0;
  color: #60758a;
  font-size: 0.82rem;
  line-height: 1.45;
}

.bp-profile-match {
  color: #116f78;
  font-weight: 750;
}

.bp-profile-link {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #167ca6;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.bp-profile-proposal {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #cfe0e9;
  border-radius: 10px;
  background: #eef7fa;
}

.bp-profile-photo-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #cfe0e9;
  border-radius: 12px;
  background: #eef7fa;
}

.bp-profile-photo-preview {
  display: grid;
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 2px solid #56bcae;
  border-radius: 50%;
  background: #dff3f1;
  color: #116f78;
  font-size: 1.25rem;
  font-weight: 900;
}

.bp-profile-photo-preview img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.bp-profile-photo-details {
  min-width: 0;
  flex: 1;
}

.bp-profile-photo-heading {
  margin: 0;
  color: #17324f;
  font-size: 0.94rem;
  font-weight: 850;
}

.bp-profile-photo-heading span {
  color: #60758a;
  font-size: 0.75rem;
  font-weight: 700;
}

.bp-profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.bp-profile-photo-actions .bp-auth-secondary {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.82rem;
}

.bp-profile-photo-actions .bp-profile-link {
  margin: 0;
}

.bp-profile-photo-status,
.bp-profile-photo-dialog-status {
  min-height: 1.25em;
  margin: 8px 0 0;
  color: #60758a;
  font-size: 0.8rem;
  line-height: 1.4;
}

.bp-profile-photo-status.is-error,
.bp-profile-photo-dialog-status.is-error {
  color: #a11d2b;
}

.bp-profile-skip-photo {
  width: 100%;
  margin-top: 10px;
}

.bp-profile-photo-dialog {
  width: min(92vw, 520px);
  max-height: 94vh;
  padding: 0;
  overflow: auto;
  border: 1px solid #b6d5e2;
  border-radius: 14px;
  background: #f8fcff;
  color: #0f253d;
  box-shadow: 0 28px 80px rgba(4, 18, 38, 0.42);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.bp-profile-photo-dialog::backdrop {
  background: rgba(2, 8, 20, 0.78);
  backdrop-filter: blur(5px);
}

.bp-profile-photo-dialog-inner {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.bp-profile-photo-dialog h3 {
  margin: 0;
  color: #07152c;
  font-size: 1.35rem;
}

.bp-profile-photo-dialog p {
  margin: 5px 0 0;
}

.bp-profile-crop-stage {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  justify-self: center;
  overflow: hidden;
  background: #020817;
  touch-action: none;
}

.bp-profile-crop-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: grab;
}

.bp-profile-crop-stage canvas:focus-visible {
  outline: 3px solid #20ad9b;
  outline-offset: -3px;
}

.bp-profile-crop-stage canvas:active {
  cursor: grabbing;
}

.bp-profile-crop-mask {
  position: absolute;
  inset: 2px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(2, 8, 23, 0.58);
  pointer-events: none;
}

.bp-profile-crop-controls {
  display: grid;
  gap: 8px;
  color: #17324f;
  font-size: 0.9rem;
  font-weight: 760;
}

.bp-profile-crop-controls input {
  width: 100%;
}

.bp-profile-photo-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.bp-profile-photo-dialog-actions .bp-auth-primary {
  width: auto;
  margin-top: 0;
}

.bp-profile-card button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.bp-auth-backdrop,
.bp-auth-backdrop * {
  box-sizing: border-box;
}

.bp-auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
  background: rgba(4, 18, 38, 0.72);
  backdrop-filter: blur(8px);
}

.bp-auth-backdrop[hidden],
.bp-auth-backdrop [hidden] {
  display: none !important;
}

.bp-auth-card {
  width: min(100%, 540px);
  max-height: calc(100vh - 40px);
  padding: 28px;
  overflow: auto;
  border: 1px solid rgba(173, 218, 239, 0.72);
  border-radius: 18px;
  background: #f8fcff;
  box-shadow: 0 28px 80px rgba(4, 18, 38, 0.36);
  color: #0f253d;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.bp-auth-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.bp-auth-kicker {
  margin: 0 0 6px;
  color: #167ca6;
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bp-auth-header h2 {
  margin: 0;
  color: #07152c;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.1;
}

.bp-auth-copy,
.bp-auth-meta,
.bp-auth-choice p {
  color: #52677d;
  line-height: 1.55;
}

.bp-auth-copy {
  margin: 8px 0 0;
}

.bp-auth-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid #c8dce7;
  border-radius: 50%;
  background: #fff;
  color: #17324f;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.bp-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 18px;
  padding: 5px;
  border-radius: 10px;
  background: #e8f3f8;
}

.bp-auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #52677d;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.bp-auth-tabs button.is-active {
  background: #fff;
  color: #0f253d;
  box-shadow: 0 5px 14px rgba(15, 37, 61, 0.1);
}

.bp-auth-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #17324f;
  font-size: 0.9rem;
  font-weight: 760;
}

.bp-auth-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #bfd5e1;
  border-radius: 9px;
  background: #fff;
  color: #0f253d;
  font: inherit;
}

.bp-auth-password-shell {
  position: relative;
  display: block;
}

.bp-auth-password-shell input {
  padding-right: 68px;
}

.bp-auth-password-shell button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #167ca6;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 760;
  cursor: pointer;
}

.bp-auth-forgot {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #167ca6;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.bp-auth-primary,
.bp-auth-secondary,
.bp-auth-google {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 9px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.bp-auth-primary {
  width: 100%;
  margin-top: 20px;
  border: 1px solid #168db4;
  background: linear-gradient(135deg, #168db4, #20ad9b);
  color: #fff;
}

.bp-auth-secondary,
.bp-auth-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfd5e1;
  background: #fff;
  color: #17324f;
}

.bp-auth-google {
  width: 100%;
}

.bp-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #738699;
  font-size: 0.8rem;
}

.bp-auth-divider::before,
.bp-auth-divider::after {
  height: 1px;
  flex: 1;
  background: #d7e5ec;
  content: "";
}

.bp-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bp-auth-actions .bp-auth-primary {
  width: auto;
  margin-top: 0;
}

.bp-auth-error {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: #a11d2b;
  font-size: 0.88rem;
  font-weight: 680;
}

@media (max-width: 560px) {
  .bp-auth-backdrop {
    align-items: end;
    padding: 0;
  }

  .bp-auth-card {
    width: 100%;
    max-height: 94vh;
    padding: 22px 18px;
    border-radius: 18px 18px 0 0;
  }

  .bp-profile-backdrop {
    align-items: end;
    padding: 0;
  }

  .bp-profile-card {
    width: 100%;
    max-height: 94vh;
    padding: 22px 18px;
    border-radius: 18px 18px 0 0;
  }

  .bp-profile-photo-section {
    align-items: flex-start;
  }

  .bp-profile-photo-preview {
    width: 68px;
    height: 68px;
  }

  .bp-profile-photo-dialog {
    width: calc(100vw - 20px);
  }

  .bp-profile-photo-dialog-inner {
    padding: 18px;
  }
}
