/* Override isolado do Histórico desktop — aplica ao HTML real de openProfileOrders. */
@media (min-width: 769px) {
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-subpage.sd-hist-page {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 24px 26px 36px !important;
    overflow-x: hidden !important;
    background: #fff !important;
    color: #000000 !important;
    font-family: "Inter", sans-serif !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > header.sd-subpage-head {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    position: static !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > header.sd-subpage-head::before,
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > header.sd-subpage-head::after,
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page .sd-subpage-back::before,
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page .sd-subpage-back::after,
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page .sd-subhead-text::before,
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page .sd-subhead-text::after {
    content: none !important;
    display: none !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page .sd-subpage-back {
    display: grid !important;
    place-items: center !important;
    position: static !important;
    flex: 0 0 34px !important;
    box-sizing: border-box !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #f3f3f3 !important;
    color: #000000 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page .sd-subpage-back svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    margin: 0 !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page .sd-subhead-text {
    display: block !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #000000 !important;
    font: 600 17px/1.25 "Inter", sans-serif !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > .sd-hist-subtitle {
    display: block !important;
    width: 100% !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    color: #000000 !important;
    font: 400 14px/1.5 "Inter", sans-serif !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > .sd-hist-tabs {
    display: flex !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > .sd-hist-tabs > .sd-hist-tab,
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > .sd-hist-tabs > .sd-hist-tab.is-active,
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > .sd-hist-tabs > .sd-hist-tab[aria-selected="true"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0 !important;
    box-sizing: border-box !important;
    width: auto !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #000000 !important;
    font: 400 14px/1.2 "Inter", sans-serif !important;
    box-shadow: none !important;
    transform: none !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > .sd-hist-tabs > .sd-hist-tab.is-active,
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > .sd-hist-tabs > .sd-hist-tab[aria-selected="true"] {
    border-color: #d8d8d8 !important;
    background: #fff !important;
    color: #000000 !important;
    font-weight: 600 !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > #profileOrdersList {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > #profileOrdersList > .sd-hist-empty,
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > #profileOrdersList > .sd-hist-list {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 132px !important;
    margin: 0 !important;
    padding: 22px 16px !important;
    border: 1px solid #d8d8d8 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  /* Histórico: mesma distância uniforme dos cards de Código de entrega. */
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > #profileOrdersList > .sd-hist-list {
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    gap: 12px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  html body.sd-desktop #overlay.sd-profile-overlay .profile-page.sd-hist-page > #profileOrdersList > .sd-hist-list > .sd-hist-card {
    width: 100% !important;
    margin: 0 !important;
    padding: 14px !important;
  }
}
