/* O tema do computador continua usando as regras originais. */
.main-header .account-icon {
  display: none;
  width: 24px;
  height: 24px;
}
.main-header .account-nav { display: inline-flex; align-items: center; }
.main-header .account-menu { display: none; }

@media (max-width: 900px) {
  .main-header {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 10px 12px;
    padding: 14px 6% 8px;
  }

  .main-header .logo {
    min-width: 0;
    min-height: 44px;
    max-width: calc(100% - 56px);
    white-space: normal;
    font-size: clamp(20px, 6vw, 26px);
  }

  .main-header .brand-name {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.1;
  }

  .main-header .brand-logo {
    width: 36px;
    height: 36px;
  }

  .main-header .search {
    order: 2;
    flex: 0 0 100%;
    min-width: 0;
    margin: 0;
  }

  .main-header nav {
    display: flex;
    order: 3;
    flex-basis: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 8px;
    margin: 0;
    padding: 0;
    font-size: 13px;
  }

  .main-header nav > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 4px;
  }

  .main-header nav > .account-nav {
    position: absolute;
    top: 14px;
    right: 6%;
    width: 44px;
    height: 44px;
  }

  .main-header .account-desktop { display: none; }
  .main-header .account-menu { display: block; position: relative; width: 44px; height: 44px; }
  .main-header .account-menu > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #101725;
    list-style: none;
    cursor: pointer;
  }
  .main-header .account-menu > summary::-webkit-details-marker { display: none; }
  .main-header .account-menu[open] > summary { border-color: #3674b5; background: #10233b; }
  .main-header .account-menu:not([open]) .account-popover { display: none; }
  .main-header .account-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(240px, calc(100vw - 24px));
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #101018;
    box-shadow: 0 18px 45px #0009;
    z-index: 2;
  }
  .main-header .account-popover a, .main-header .account-popover button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
  }
  .main-header .account-popover a:hover, .main-header .account-popover button:hover { background: #13263d; color: #a2ceff; }
  .main-header .account-popover form { margin: 0; }

  .main-header .account-icon {
    display: block;
  }

}
