.authModalRoot {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.authModalRoot[hidden] {
  display: none;
}

.authModalOverlay {
  background: rgba(10, 10, 11, .18);
  inset: 0;
  position: absolute;
}

.authModalPanel {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  box-sizing: border-box;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e1e1df;
  box-shadow: 0 24px 72px rgba(10, 10, 11, .14);
  color: #0a0a0b;
  left: 50%;
  max-width: calc(100vw - 40px);
  padding: 34px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 430px;
}

.authModalClose {
  align-items: center;
  background: transparent;
  border: 0;
  color: #0a0a0b;
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 18px;
  top: 16px;
  width: 32px;
}

.authModalPanel h2 {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 42px 10px 0;
}

.authModalIntro {
  color: #6b6b6e;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 24px;
}

.authModalForm {
  display: grid;
  gap: 16px;
}

.authModalForm label {
  color: #17171a;
  display: grid;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
}

.authModalForm input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #d8d8d5;
  border-radius: 6px;
  color: #0a0a0b;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
}

.authModalForm input:hover {
  border-color: #cfcfcc;
}

.authModalForm input:focus {
  border-color: #0a0a0b;
  box-shadow: 0 0 0 3px rgba(10, 10, 11, .06);
  outline: none;
}

.authModalSubmit {
  align-items: center;
  background: #0a0a0b;
  border: 1px solid #0a0a0b;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  transition: background 150ms ease, box-shadow 150ms ease;
  width: 100%;
}

.authModalSubmit:hover {
  background: #17171a;
  box-shadow: 0 10px 26px rgba(10, 10, 11, .12);
}

.authModalSubmit:disabled {
  background: #ececea;
  border-color: #ececea;
  box-shadow: none;
  color: #9c9c9f;
  cursor: default;
}

.authModalLinks {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-top: 2px;
}

.authModalLinks a,
.authModalLinkButton {
  background: transparent;
  border: 0;
  color: #0a0a0b;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  text-decoration: none;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.authModalLinks a:hover,
.authModalLinkButton:hover {
  text-decoration: underline;
}

.authModalMessage {
  color: #6b6b6e;
  font-size: 13px;
  line-height: 1.45;
  min-height: 18px;
}

.authModalMessage.error {
  color: #b42318;
}

.authModalRoot [hidden] { display: none !important; }
.authModalRoot :focus-visible { outline: 2px solid #0a0a0b; outline-offset: 3px; }
.authModalForm .passwordFieldControl { min-width: 0; width: 100%; }
.authDialogHost { color: #0a0a0b; font-family: Inter, sans-serif; margin: 12vh auto; max-width: 280px; padding: 24px; text-align: center; }
.publicAuthPage { margin: 0; background: #f5f5f4; font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif; }

@media (max-width: 520px) {
  .authModalPanel {
    padding: 30px 22px;
    width: calc(100vw - 28px);
  }
}
