/* Shared auth modal — SaaS Inter blues */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.auth-modal[hidden] {
  display: none !important;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}

.auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  padding: 1.35rem 1.35rem 1.5rem;
  outline: none;
}

.auth-modal__dialog:has([data-auth-panel="register"].is-active) {
  width: min(520px, 100%);
}

.auth-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-modal__close:hover,
.auth-modal__close:focus-visible {
  background: #F1F5F9;
  color: #0F172A;
  outline: none;
}

.auth-modal__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.25rem;
  margin: 0 2rem 1.15rem 0;
  background: #F1F5F9;
  border-radius: 0;
}

.auth-modal__tab {
  border: 0;
  border-radius: 0;
  padding: 0.65rem 0.75rem;
  background: transparent;
  color: #64748B;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.auth-modal__tab:hover {
  color: #1E40AF;
}

.auth-modal__tab.is-active {
  background: #fff;
  color: #0699D8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.auth-modal__tab:focus-visible {
  outline: 2px solid #93C5FD;
  outline-offset: 1px;
}

.auth-modal__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0F172A;
}

.auth-modal__lead {
  margin: 0 0 1.1rem;
  color: #64748B;
  font-size: 0.92rem;
}

.auth-modal__alert {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0;
  background: #fdecea;
  color: #b42318;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-modal__alert.is-success {
  background: #ecfdf3;
  color: #027a48;
}

.auth-modal__alert[hidden] {
  display: none !important;
}

.auth-modal__forgot {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-modal__forgot a,
.auth-modal__link-btn {
  color: #0699D8;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}

.auth-modal__forgot a:hover,
.auth-modal__link-btn:hover {
  text-decoration: underline;
}

.auth-modal__form .form-group {
  margin-bottom: 0.85rem;
}

.auth-modal__password {
  position: relative;
  display: block;
}

.auth-modal__password input {
  width: 100%;
  padding-right: 2.75rem;
}

.auth-modal__password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-modal__password-toggle:hover {
  color: #0699D8;
  background: rgba(6, 153, 216, 0.08);
}

.auth-modal__password-toggle[aria-pressed="true"] {
  color: #0699D8;
}

.auth-modal__password-toggle .auth-modal__eye[hidden] {
  display: none !important;
}

.auth-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-modal__submit {
  width: 100%;
  margin-top: 0.35rem;
  border-radius: 0;
}

.auth-modal__submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.auth-modal__panel[hidden] {
  display: none !important;
}

.auth-modal__captcha {
  display: flex;
  justify-content: center;
}

body.auth-modal-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .auth-modal {
    padding: 0.65rem;
    align-items: end;
  }

  .auth-modal__dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 0 18px 12px 12px;
    padding: 1.15rem 1rem 1.25rem;
  }

  .auth-modal__tabs {
    margin-right: 2.25rem;
  }

  .auth-modal__grid {
    grid-template-columns: 1fr;
  }

  .auth-modal__dialog input,
  .auth-modal__dialog button,
  .auth-modal__dialog .btn {
    min-height: 44px;
  }

  .auth-modal__dialog .btn {
    width: 100%;
  }
}
