.mm-modal-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(246, 183, 0, 0.12), transparent 45%),
    rgba(7, 15, 34, 0.78);
  backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.mm-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.mm-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  font-family: 'Montserrat', sans-serif;
}

.mm-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.mm-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: linear-gradient(180deg, var(--white) 0%, #f7faff 100%);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(5, 18, 44, 0.30);
  border: 1px solid rgba(23, 57, 107, 0.14);
  transform: translateY(24px) scale(.96);
  transition: transform .28s ease;
}

.mm-modal.is-active .mm-modal__dialog {
  transform: translateY(0) scale(1);
}

.mm-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background .2s ease, transform .2s ease, color .2s ease;
}

.mm-modal__close:hover,
.mm-modal__close:focus-visible {
  background: var(--blue2);
  color: #ffcc33;
  transform: scale(1.06);
}

.mm-modal__brand {
  padding: 32px;
  text-align: left;
  background:
    radial-gradient(circle at top right, rgba(246, 183, 0, 0.16), transparent 30%),
    linear-gradient(180deg, var(--white) 0%, #f2f7ff 100%);
}

.mm-modal__brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffcc33;
  border: 1px solid rgba(255, 204, 51, 0.34);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.mm-modal__title {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.02em;
}

.mm-modal__subtitle {
  margin: 0;
  color: #4f6079;
  font-size: 14px;
  line-height: 1.6;
  max-width: 100%;
}

.mm-form {
  padding: 8px 32px 28px;
  display: grid;
  gap: 14px;
}

.mm-form__group + .mm-form__group {
  margin-top: 0;
}

.mm-form__group {
  display: flex;
  flex-direction: column;
}

.mm-form__label {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mm-form__input {
  width: 100%;
  height: 40px;
  border: 1px solid #c8d4e8;
  border-radius: 12px;
  padding: 0 16px;
  background: #fbfdff;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  box-sizing: border-box;
}

.mm-form__input:hover {
  border-color: #9ab0cf;
}

.mm-form__input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 57, 107, 0.14);
  background: var(--white);
}

.mm-form__input::placeholder {
  color: #9aa6b7;
}

.mm-form__row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 2px;
}

.mm-form__row--between {
  justify-content: space-between;
}

.mm-form__check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: #5f6e84;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.mm-form__check input {
  margin-top: 3px;
  accent-color: var(--blue);
}

.mm-form__link {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.mm-form__link:hover {
  color: #9a6500;
  text-decoration: underline;
}

.mm-btn {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, background .2s ease, box-shadow .2s ease;
  font-family: 'Montserrat', sans-serif;
}

.mm-btn:hover {
  transform: translateY(-1px);
}

.mm-btn--primary {
  background: linear-gradient(120deg, var(--yellow) 0%, #ffcc33 100%);
  color: var(--blue);
  box-shadow: 0 12px 26px rgba(246, 183, 0, 0.28);
}

.mm-btn--primary:hover {
  filter: brightness(1.02);
}

.mm-btn--ghost {
  background: linear-gradient(120deg, var(--yellow) 0%, #ffcc33 100%);
  color: var(--blue);
  border: 1px solid rgba(246, 183, 0, 0.5);
  max-width: 190px;
  box-shadow: 0 10px 20px rgba(246, 183, 0, 0.22);
}

.mm-btn--ghost:hover {
  filter: brightness(1.02);
}

.mm-btn--outline {
  background: var(--white);
  color: var(--blue);
  border: 1px solid rgba(23, 57, 107, 0.28);
  box-shadow: none;
}

.mm-btn--outline:hover {
  background: #f2f7ff;
}

.mm-btn--danger {
  background: linear-gradient(120deg, var(--red) 0%, #c8332e 100%);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(200, 51, 46, 0.28);
}

.mm-btn--danger:hover {
  filter: brightness(1.02);
}

.mm-modal__footer {
  border-top: 1px solid #dbe5f5;
  padding: 20px 32px 24px;
  text-align: center;
  background: linear-gradient(180deg, #f6f9ff 0%, #eef3fb 100%);
}

.mm-modal__footer p {
  margin: 0 0 12px;
  color: #4f6079;
  font-size: 13px;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

/* ===== AJUSTES ESPECÍFICOS DO MODAL DE CADASTRO ===== */

#modalCadastro .mm-modal__dialog {
  max-width: 920px;
}

#modalCadastro .mm-modal__brand {
  padding-bottom: 20px;
}

#modalCadastro .mm-modal__subtitle {
  max-width: 680px;
}

#modalCadastro .mm-form__group {
  margin: 0;
}

#modalCadastro .mm-form .col-12,
#modalCadastro .mm-form .col-6 {
  margin-top: 12px;
}

#modalCadastro .mm-form__group + .mm-form__group {
  margin-top: 0;
}

#modalCadastro .mm-modal__footer {
  padding: 16px 32px;
}

/* ===== LOGIN/CADASTRO SEM GRADIENTE ===== */
#modalLogin .mm-modal__dialog,
#modalCadastro .mm-modal__dialog {
  background: var(--white);
}

#modalLogin .mm-modal__brand,
#modalCadastro .mm-modal__brand {
  background: var(--white);
}

#modalLogin .mm-modal__footer,
#modalCadastro .mm-modal__footer {
  background: var(--white);
}

#modalLogin .mm-btn--primary,
#modalCadastro .mm-btn--primary,
#modalLogin .mm-btn--ghost,
#modalCadastro .mm-btn--ghost {
  background: var(--yellow);
}

.mm-form__helper {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #6b7280;
}

.mm-form__helper.is-error {
  color: var(--red);
}

.mm-form__helper.is-success {
  color: #1f7a3d;
}

.mm-form__feedback {
  grid-column: 1 / -1;
  min-height: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  margin-top: -4px;
}

.mm-form__input.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(234, 75, 69, 0.10);
}

.mm-form__input.is-valid {
  border-color: #1f7a3d;
  box-shadow: 0 0 0 4px rgba(31, 122, 61, 0.10);
}

.mm-btn[disabled] {
  opacity: .65;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.mm-modal__dialog--action {
  max-width: 520px;
}

.mm-action-modal {
  padding: 28px 32px 32px;
  text-align: center;
}

.mm-action-modal__icon {
  width: 124px;
  height: 124px;
  margin: 4px auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe07e 0%, var(--yellow) 100%);
  border: 1px solid rgba(246, 183, 0, 0.54);
  box-shadow: 0 12px 24px rgba(246, 183, 0, 0.28);
  animation: mm-action-icon-float 2.4s ease-in-out infinite;
}

.mm-action-modal__icon-lottie {
  width: 72%;
  height: 72%;
  display: block;
  flex-shrink: 0;
}

.mm-action-modal__icon-offer {
  display: none;
  width: 78px;
  height: 78px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #17396b 0%, #21477f 100%);
  color: #ffcc33;
  border: 3px solid rgba(255, 204, 51, 0.24);
  box-shadow: 0 12px 24px rgba(23, 57, 107, 0.24);
}

.mm-action-modal__icon-offer i {
  font-size: 30px;
  transform: rotate(-10deg);
}

.mm-action-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 2px auto 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(23, 57, 107, 0.08);
  border: 1px solid rgba(23, 57, 107, 0.14);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

#modalAcao[data-tone="success"] .mm-action-modal__icon-lottie {
  transform: scaleY(-1);
  transform-origin: center;
}

@keyframes mm-action-icon-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.mm-action-modal__title {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 32px;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.02em;
}

.mm-action-modal__text {
  margin: 0 auto;
  max-width: 360px;
  color: #55657e;
  font-size: 14px;
  line-height: 1.55;
}

.mm-action-modal__highlight {
  margin: 14px auto 0;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(246, 183, 0, 0.16) 0%, rgba(255, 204, 51, 0.34) 100%);
  border: 1px solid rgba(246, 183, 0, 0.34);
  color: var(--blue);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

.mm-action-modal__actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mm-action-modal__actions.is-single {
  grid-template-columns: 1fr;
}

#modalAcao[data-tone="danger"] .mm-modal__divider,
#modalAcao[data-tone="success"] .mm-modal__divider {
  display: none;
}

#modalAcao.mm-modal--accent-offer .mm-modal__dialog {
  background:
    radial-gradient(circle at top right, rgba(246, 183, 0, 0.16), transparent 30%),
    linear-gradient(180deg, var(--white) 0%, #f7faff 100%);
}

#modalAcao.mm-modal--accent-offer .mm-action-modal__icon {
  background: radial-gradient(circle at 30% 30%, #fff0a6 0%, #f6b700 100%);
  box-shadow: 0 14px 28px rgba(246, 183, 0, 0.26);
}

#modalAcao.mm-modal--accent-offer .mm-action-modal__icon-lottie {
  display: none;
}

#modalAcao.mm-modal--accent-offer .mm-action-modal__icon-offer {
  display: inline-flex;
}

#modalAcao.mm-modal--accent-offer .mm-action-modal__title {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

#modalAcao.mm-modal--accent-offer .mm-action-modal__actions {
  margin-top: 24px;
}

.mm-modal__divider {
  position: relative;
  display: block;
  width: 100%;
  height: 6px;
  min-height: 6px;
  margin: 0;
  border-radius: 0;
  background: rgba(23, 57, 107, 0.14);
  overflow: hidden;
  flex-shrink: 0;
}

.mm-modal__divider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    var(--blue) 0 33.333%,
    var(--yellow) 33.333% 66.666%,
    var(--red) 66.666% 100%
  );
  animation: mm-divider-carousel 16s linear infinite;
}

@keyframes mm-divider-carousel {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-action-modal__icon {
    animation: none;
  }

  .mm-modal__divider::before {
    animation: none;
  }
}

.mm-password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.mm-password-field .mm-form__input {
  padding-right: 56px;
}

.mm-password-field__actions {
  position: absolute;
  top: 50%;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(-50%);
}

.mm-password-field__action,
.mm-password-field__generate {
  height: 32px;
  border: none;
  background: var(--white);
  color: var(--blue);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  font-family: 'Montserrat', sans-serif;
}

.mm-password-field__action:hover,
.mm-password-field__generate:hover {
  background: #f6f9ff;
  border-color: #9ab0cf;
  transform: translateY(-1px);
}

.mm-password-field__action {
  width: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  #modalCadastro .mm-form {
    grid-template-columns: 1fr;
  }

  #modalCadastro .mm-form__group,
  #modalCadastro .mm-form__group--full,
  #modalCadastro .mm-form__check--full,
  #modalCadastro .mm-btn--primary,
  .mm-form__feedback {
    grid-column: 1 / -1;
  }
}

.mm-form__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mm-form__label-row .mm-form__label {
  margin-bottom: 0;
}

.mm-form__label-action {
  width: 24px;
  height: 24px;
  border: none;
  background: var(--white);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.mm-form__label-action:hover,
.mm-form__label-action:focus-visible {
  background: #f6f9ff;
  border-color: #9ab0cf;
  transform: translateY(-1px);
}

.mm-form {
  padding: 8px 32px 28px;
}

.mm-form__group {
  display: flex;
  flex-direction: column;
}
