/*
 * Gudfy UI foundation
 * -------------------
 * Capa compartida para layouts públicos, SaaS, Gaming y Admin. Define el
 * ritmo responsive y componentes semánticos sin reemplazar los tokens de
 * tema de cada superficie.
 */

:root {
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 20px;
  --ui-space-6: 24px;
  --ui-space-8: 32px;
  --ui-radius-sm: 8px;
  --ui-radius-md: 12px;
  --ui-radius-lg: 16px;
  --ui-control-height: 44px;
  --ui-input-height: 48px;
  --ui-content-width: 1200px;
  --ui-reading-width: 72ch;
  --ui-z-sticky: 40;
  --ui-z-nav: 50;
  --ui-z-drawer: 60;
  --ui-z-dialog: 100;
  --ui-z-toast: 110;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.55;
}

button,
input,
select,
textarea,
summary,
[role='button'] {
  font: inherit;
}

button,
summary,
[role='button'],
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(123, 47, 190, 0.12);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.5;
}

.ui-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ui-page {
  width: min(100%, var(--ui-content-width));
  margin-inline: auto;
  padding: var(--ui-space-6) var(--ui-space-5) var(--ui-space-8);
}

/* El shell global ya aporta gutters y espacio para la barra inferior. */
.main-pad > .ui-page {
  padding: 0;
}

.ui-page--reading {
  width: min(100%, var(--ui-reading-width));
}

.ui-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ui-space-4);
  margin-bottom: var(--ui-space-6);
}

.ui-page-header__copy {
  min-width: 0;
}

.ui-page-header h1 {
  margin: 0;
  color: var(--text-1, #1a0a30);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.ui-page-header p {
  max-width: 68ch;
  margin: var(--ui-space-2) 0 0;
  color: var(--text-3, #6f5a86);
  font-size: 0.92rem;
}

.ui-actions,
.ui-cluster {
  display: flex;
  align-items: center;
  gap: var(--ui-space-2);
  flex-wrap: wrap;
}

.ui-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ui-space-4);
}

.ui-card {
  min-width: 0;
  padding: var(--ui-space-5);
  border: 1px solid var(--border, #ddd2f4);
  border-radius: var(--ui-radius-md);
  color: var(--text-1, #1a0a30);
  background: var(--bg-card, #fff);
  box-shadow: 0 1px 2px rgba(31, 0, 70, 0.04);
}

.ui-btn {
  min-height: var(--ui-control-height);
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-2);
  border: 1px solid transparent;
  border-radius: var(--ui-radius-sm);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease,
    color 180ms ease, box-shadow 180ms ease;
}

.ui-btn--primary {
  color: #fff;
  background: var(--accent, #7b2fbe);
}

.ui-btn--primary:hover {
  color: #fff;
  background: var(--accent-hover, #6a23a8);
}

.ui-btn--secondary {
  color: var(--text-1, #1a0a30);
  border-color: var(--border-mid, #c2adec);
  background: var(--bg-card, #fff);
}

.ui-btn--ghost {
  color: var(--accent-text, var(--accent, #7b2fbe));
  background: transparent;
}

.ui-scroll-row {
  display: flex;
  gap: var(--ui-space-2);
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.ui-scroll-row::-webkit-scrollbar {
  display: none;
}

.ui-scroll-row > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.ui-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--border, #ddd2f4);
  border-radius: var(--ui-radius-md);
  background: var(--bg-card, #fff);
}

.ui-table-scroll table {
  width: 100%;
  border-collapse: collapse;
}

.ui-mobile-only {
  display: none !important;
}

.gf-priority-banner {
  padding: 10px 16px;
  border-bottom: 1px solid currentColor;
  font-size: 0.84rem;
}

.gf-priority-banner--danger {
  color: var(--error, #a61b3c);
  background: var(--error-dim, rgba(200, 32, 64, 0.08));
}

.gf-priority-banner--warn {
  color: var(--warn, #9a5705);
  background: var(--warn-dim, rgba(217, 119, 6, 0.1));
}

.gf-priority-banner--info {
  color: var(--accent-text, var(--accent, #6a23a8));
  background: var(--accent-dim, rgba(123, 47, 190, 0.09));
}

.gf-priority-banner__inner {
  width: min(100%, 1280px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gf-priority-banner__title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  font-weight: 750;
}

.gf-priority-banner__detail {
  min-width: 0;
  flex: 1;
  color: var(--text-2, #4a2d7a);
}

.gf-priority-banner__action {
  min-height: 40px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: var(--ui-radius-sm);
  color: currentColor;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gfhdr-mobile-profile {
  display: none;
}

.gfhdr img.gfhdr-logo-mark {
  display: none !important;
}

/* Navigation shared by every listing-management channel ----------------- */
.listing-channel-nav {
  margin: 0 0 16px;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  border: 1px solid var(--border, var(--gx-border));
  border-radius: 11px;
  background: var(--bg-card, var(--gx-card));
}

.listing-channel-nav::-webkit-scrollbar { display: none; }

.listing-channel-nav a {
  min-height: 44px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--text-3, var(--gx-text-3));
  font-size: 0.76rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.listing-channel-nav a.is-active {
  color: var(--accent-text, var(--accent, var(--gx-accent)));
  background: var(--accent-dim, rgba(123, 47, 190, 0.12));
}

.listing-channel-nav__new {
  margin-left: auto;
  color: var(--accent-text, var(--accent, var(--gx-accent))) !important;
}

/* Unified orders hub ----------------------------------------------------- */
.order-hub {
  width: min(100%, 920px);
}

.order-hub__header,
.sell-hub__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ui-space-4);
  margin-bottom: var(--ui-space-5);
}

.order-hub__header h1,
.sell-hub__header h1 {
  margin: 2px 0 4px;
  color: var(--text-1);
  font-size: clamp(1.55rem, 5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.order-hub__header p,
.sell-hub__header p {
  max-width: 62ch;
  margin: 0;
  color: var(--text-3);
  font-size: 0.9rem;
}

.ui-kicker {
  color: var(--accent-text, var(--accent));
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-hub__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ui-space-3);
  margin-bottom: var(--ui-space-4);
}

.order-summary-card {
  min-width: 0;
  min-height: 92px;
  padding: 14px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 10px;
  border: 1px solid var(--border);
  border-radius: var(--ui-radius-md);
  color: var(--text-2);
  background: var(--bg-card);
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.order-summary-card:hover,
.order-summary-card.is-active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.order-summary-card__icon {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--accent-text, var(--accent));
  background: var(--accent-dim);
}

.order-summary-card strong {
  color: var(--text-1);
  font-size: 1.25rem;
  line-height: 1;
}

.order-summary-card > span:last-child {
  min-width: 0;
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-role-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 430px;
  padding: 4px;
  margin-bottom: var(--ui-space-3);
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-card);
}

.order-role-tabs a {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-3);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.order-role-tabs a.is-active {
  color: var(--accent-text, var(--accent));
  background: var(--accent-dim);
}

.order-hub__filters {
  display: flex;
  align-items: end;
  gap: var(--ui-space-3);
  margin-bottom: var(--ui-space-4);
}

.order-hub__filters label {
  display: grid;
  gap: 5px;
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 650;
}

.order-hub__filters select {
  min-width: 170px;
  min-height: 44px;
  padding: 8px 26px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-1);
  background: var(--bg-card);
  font-size: 0.76rem;
  font-weight: 600;
}

.order-hub__clear {
  min-height: 44px;
  padding: 8px 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.order-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--ui-radius-md);
  background: var(--bg-card);
}

.order-row {
  min-height: 84px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 150ms ease;
}

.order-row:last-child { border-bottom: 0; }
.order-row:hover { background: var(--bg-card-2); }

.order-row__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--accent-text, var(--accent));
  background: var(--accent-dim);
}

.order-row__content { min-width: 0; }

.order-row__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-row__topline strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text-1);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-status {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 99px;
  color: var(--text-2);
  background: var(--bg-card-2);
  font-size: 0.66rem;
  font-weight: 750;
  text-transform: capitalize;
}

.order-status--pending { color: var(--warn, #925600); background: var(--warn-dim, #fff4df); }
.order-status--dispute { color: var(--error, #a61b3c); background: var(--error-dim, #ffe8ee); }
.order-status--final { color: var(--teal, #0f8f62); background: rgba(15, 158, 106, 0.1); }

.order-row__meta,
.order-row__date {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-3);
  font-size: 0.72rem;
}

.order-row__date { margin-top: 2px; }
.order-row__chevron { color: var(--text-3); }

.order-hub__empty {
  padding: 44px 20px;
  border: 1px solid var(--border);
  border-radius: var(--ui-radius-md);
  color: var(--text-2);
  background: var(--bg-card);
  text-align: center;
}

.order-hub__empty > span {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--accent-text, var(--accent));
  background: var(--accent-dim);
}

.order-hub__empty h2 { margin: 0 0 4px; color: var(--text-1); font-size: 1rem; }
.order-hub__empty p { margin: 0 0 16px; font-size: 0.84rem; }

.order-pagination {
  min-height: 54px;
  margin-top: 10px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text-3);
  background: var(--bg-card);
  font-size: 0.74rem;
}

.order-pagination > div { display: flex; align-items: center; gap: 7px; }
.order-pagination a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--accent-text, var(--accent));
  background: var(--accent-dim);
}
.order-pagination strong { min-width: 42px; color: var(--text-2); text-align: center; }

/* Sell chooser ----------------------------------------------------------- */
.sell-hub {
  width: min(100%, 820px);
}

.sell-hub__header {
  display: block;
  max-width: 640px;
}

.sell-hub__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ui-space-3);
}

.sell-option {
  min-height: 104px;
  padding: 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: var(--ui-radius-md);
  color: inherit;
  background: var(--bg-card);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.sell-option:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.sell-option__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #fff;
  background: var(--accent);
}

.sell-option__copy { min-width: 0; display: grid; gap: 3px; }
.sell-option__copy strong { color: var(--text-1); font-size: 0.92rem; }
.sell-option__copy span { color: var(--text-3); font-size: 0.76rem; line-height: 1.4; }
.sell-option__arrow { color: var(--text-3); }

.sell-hub__signin {
  margin-top: var(--ui-space-4);
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--ui-radius-md);
  color: var(--text-2);
  background: var(--bg-card-2);
}

.sell-hub__signin > span { color: var(--teal); }
.sell-hub__signin strong { display: block; color: var(--text-1); font-size: 0.82rem; }
.sell-hub__signin p { margin: 2px 0 0; font-size: 0.74rem; }
.sell-hub__signin a { min-height: 44px; display: flex; align-items: center; color: var(--accent-text, var(--accent)); font-size: 0.8rem; font-weight: 700; }

.sell-hub__footer {
  margin-top: var(--ui-space-5);
  padding-top: var(--ui-space-4);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.sell-hub__footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 650;
}

@media (max-width: 900px) {
  html.gfhdr-drawer-open,
  html.gfhdr-drawer-open body {
    overflow: hidden !important;
  }

  html {
    scroll-padding-top: 64px;
  }

  .ui-desktop-only {
    display: none !important;
  }

  .ui-mobile-only {
    display: initial !important;
  }

  .ui-page {
    padding: var(--ui-space-5) var(--ui-space-4)
      calc(88px + env(safe-area-inset-bottom));
  }

  .main-pad {
    padding: var(--ui-space-5) var(--ui-space-4)
      calc(88px + env(safe-area-inset-bottom)) !important;
  }

  .main-bleed {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .ui-page-header {
    gap: var(--ui-space-3);
    margin-bottom: var(--ui-space-5);
  }

  .ui-page-header h1 {
    font-size: clamp(1.45rem, 7vw, 1.8rem);
  }

  .ui-card {
    padding: var(--ui-space-4);
  }

  :where(
    button,
    input[type='submit'],
    input[type='button'],
    input[type='reset'],
    select,
    summary,
    [role='button'],
    .btn,
    .mp-primary-cta,
    .mp-pub-fab-main
  ) {
    min-height: var(--ui-control-height);
  }

  :where(
    button[aria-label],
    a[aria-label].gfhdr-bell,
    a[aria-label].gfhdr-link,
    [role='button'][aria-label]
  ) {
    min-width: var(--ui-control-height);
  }

  :where(
    input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
    select,
    textarea
  ) {
    min-height: var(--ui-input-height);
    font-size: 16px !important;
  }

  textarea {
    line-height: 1.5;
  }

  /* El idioma sigue disponible dentro del drawer. Eliminarlo del cluster
     superior evita que el logo y las acciones se recorten en teléfonos. */
  .gfhdr > .gfhdr-inner .gfhdr-lang {
    display: none !important;
  }

  .gfhdr-inner {
    min-height: 56px;
    padding: 6px 12px !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px !important;
  }

  .gfhdr-left {
    gap: 8px !important;
  }

  .gfhdr-logo img {
    height: 22px !important;
  }

  .gfhdr-inner .gfhdr-logo,
  .gfhdr-drawer .gfhdr-logo {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .gfhdr-center {
    min-width: 0;
  }

  .gfhdr-center .gf-wsw {
    max-width: 100%;
  }

  .gfhdr-center .gf-wsw-seg {
    min-width: 44px;
    min-height: 44px;
    padding: 7px 9px;
    justify-content: center;
  }

  .gfhdr-right {
    min-width: 44px;
    gap: 4px !important;
  }

  .gfhdr-right > .gfhdr-user-wrap {
    display: none !important;
  }

  .gfhdr-mobile-profile {
    width: 44px;
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--header-text-2);
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
  }

  .gfhdr-mobile-profile .avatar-wrap,
  .gfhdr-mobile-profile .avatar {
    width: 34px !important;
    height: 34px !important;
  }

  .gfhdr-hamburger,
  .gfhdr-bell,
  .gfhdr-user-btn,
  .gfhdr-right > .gfhdr-user-wrap > .gfhdr-link {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  .gfhdr-user-btn {
    padding: 4px !important;
  }

  .gfhdr-renewal {
    display: none !important;
  }

  .gfhdr-drop {
    position: fixed !important;
    top: 66px !important;
    right: 12px !important;
    width: min(300px, calc(100vw - 24px));
    min-width: 0 !important;
    max-height: calc(100dvh - 82px);
    overflow-y: auto;
  }

  .gfhdr-drawer {
    width: min(360px, 88vw) !important;
    max-width: 88vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: calc(14px + env(safe-area-inset-top)) 14px
      calc(20px + env(safe-area-inset-bottom)) !important;
    display: flex;
    flex-direction: column;
    color: rgba(255, 255, 255, 0.88);
    background: var(--header-bg) !important;
    overscroll-behavior: contain;
  }

  .gfhdr-drawer-head {
    min-height: 52px;
    padding: 0 2px 8px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--header-border);
  }

  .gfhdr-drawer-head .gfhdr-logo img {
    height: 24px !important;
  }

  .gfhdr-drawer-close {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ui-radius-sm);
    border: 0;
    color: var(--header-text-2);
    background: transparent;
  }

  .gfhdr-drawer-user {
    min-height: 64px;
    margin: 10px 0 6px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
  }

  .gfhdr-drawer-user:hover,
  .gfhdr-drawer-user:focus-visible {
    background: rgba(255, 255, 255, 0.06);
  }

  .gfhdr-drawer-user__copy {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .gfhdr-drawer-user__copy strong,
  .gfhdr-drawer-user__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gfhdr-drawer-user__copy strong { color: #fff; font-size: 0.86rem; }
  .gfhdr-drawer-user__copy small { color: var(--header-text-3); font-size: 0.69rem; }

  .gfhdr-drawer-attention {
    margin: 4px 0 8px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.045);
  }

  .gfhdr-drawer-attention h2 {
    margin: 0 4px 5px;
    color: var(--header-text-3);
    font-size: 0.64rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .gfhdr-drawer-attention a,
  .gfhdr-drawer-attention a > span {
    display: flex;
    align-items: center;
  }

  .gfhdr-drawer-attention a {
    min-height: 44px;
    justify-content: space-between;
    gap: 8px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.76rem;
    text-decoration: none;
  }

  .gfhdr-drawer-attention a > span { gap: 9px; }
  .gfhdr-drawer-attention a strong { color: var(--teal); font-size: 0.78rem; }

  .gfhdr-drawer-nav { display: grid; gap: 2px; }

  .gfhdr-drawer-group {
    margin: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  }

  .gfhdr-drawer-section-btn {
    min-height: 48px;
    padding: 8px 10px !important;
    border-radius: 9px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.82rem !important;
  }

  .gfhdr-drawer-section-btn > span,
  .gfhdr-drawer-item > span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  .gfhdr-drawer-section-btn[aria-expanded='true'] {
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
  }

  .gfhdr-drawer-section-btn[aria-expanded='true'] > svg:last-child {
    transform: rotate(180deg);
  }

  .gfhdr-drawer-item {
    min-height: 46px;
    padding: 7px 10px 7px 20px !important;
    justify-content: space-between;
    font-size: 0.8rem !important;
  }

  .gfhdr-drawer-item.is-active {
    color: #fff;
    background: rgba(155, 72, 237, 0.22) !important;
    box-shadow: inset 2px 0 0 var(--accent);
  }

  .gfhdr-drawer-admin,
  .gfhdr-drawer-public a,
  .gfhdr-drawer-logout {
    min-height: 48px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.86);
    background: transparent;
    font: 600 0.8rem/1.3 inherit;
    text-decoration: none;
  }

  .gfhdr-drawer-admin { margin-top: 6px; color: #d7b9ff; }
  .gfhdr-drawer-public { display: grid; gap: 2px; }

  .gfhdr-drawer-guest {
    margin: 14px 0 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
  }

  .gfhdr-drawer-guest h2 { margin: 0 0 5px; color: #fff; font-size: 0.96rem; }
  .gfhdr-drawer-guest p { margin: 0 0 12px; color: var(--header-text-3); font-size: 0.73rem; line-height: 1.5; }
  .gfhdr-drawer-guest a { min-height: 44px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.78rem; font-weight: 700; }
  .gfhdr-drawer-guest__primary { border-radius: 9px; background: var(--accent); text-decoration: none; }

  .gfhdr-drawer-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--header-border);
  }

  .gfhdr-drawer-footer form { margin: 0; }

  .gfhdr-drawer-logout {
    width: 100%;
    color: #ffb8c7;
    cursor: pointer;
  }

  .gfhdr-drawer-lang {
    margin: 4px 4px 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--ui-radius-md);
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.05);
  }

  .gfhdr-drawer-lang label {
    font-size: 0.75rem;
    font-weight: 650;
  }

  .gfhdr-drawer-lang select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: var(--ui-radius-sm);
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  .gfhdr-drawer-lang option {
    color: #1f1433;
    background: #fff;
  }

  .gfhdr-drawer .gf-theme-choice {
    min-height: 44px;
  }

  .gfhdr-crumb {
    min-height: 44px;
    padding: 8px 16px !important;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .gfhdr-crumb::-webkit-scrollbar {
    display: none;
  }

  .gf-priority-banner {
    padding: 8px 12px;
  }

  .gf-priority-banner__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
  }

  .gf-priority-banner__title {
    min-width: 0;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .gf-priority-banner__detail {
    grid-column: 1 / -1;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-2, #4a2d7a);
    font-size: 0.76rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .gf-priority-banner__action {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    min-height: 44px;
    padding: 7px 4px 7px 10px;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .order-hub__header {
    align-items: center;
    margin-bottom: 16px;
  }

  .order-hub__header .ui-btn {
    flex: 0 0 auto;
    padding-inline: 12px;
  }

  .order-hub__summary {
    gap: 8px;
    margin-bottom: 12px;
  }

  .order-summary-card {
    min-height: 78px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    text-align: center;
  }

  .order-summary-card__icon { display: none; }
  .order-summary-card strong { font-size: 1.05rem; }
  .order-summary-card > span:last-child {
    overflow: visible;
    font-size: 0.64rem;
    line-height: 1.25;
    white-space: normal;
  }
  .order-role-tabs { max-width: none; }

  .order-hub__filters {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 8px;
  }

  .order-hub__filters select { width: 100%; min-width: 0; }
  .order-hub__clear { grid-column: 1 / -1; justify-content: center; }
  .order-row { min-height: 82px; padding-inline: 11px; gap: 10px; }
  .order-row__topline strong { font-size: 0.82rem; }
  .order-row__meta { overflow: hidden; white-space: nowrap; }

  .sell-hub__grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .sell-option { min-height: 88px; padding: 12px; grid-template-columns: 40px minmax(0, 1fr) 20px; }
  .sell-option__icon { width: 40px; height: 40px; }
  .sell-hub__signin { grid-template-columns: 28px minmax(0, 1fr); }
  .sell-hub__signin a { grid-column: 2; }
  .sell-hub__footer { flex-direction: column; gap: 2px; }

  .overflow-x-auto,
  .table-responsive,
  [data-table-scroll] {
    max-width: 100%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .gf-footer-section > summary,
  .gf-footer-section a {
    min-height: 44px;
    display: flex !important;
    align-items: center;
  }
}

@media (max-width: 350px) {
  .gf-priority-banner__action {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 40px;
    padding: 4px 0;
  }

}

@media (max-width: 480px) {
  .order-hub__filters { grid-template-columns: minmax(0, 1fr); }
  .order-hub__clear { grid-column: 1; }
}

@media (max-width: 640px) {
  .listing-channel-nav {
    margin-inline: -4px;
  }

  .listing-channel-nav__new {
    margin-left: 0;
  }

  .ui-page-header {
    flex-direction: column;
  }

  .ui-page-header .ui-actions,
  .ui-page-header > .ui-btn,
  .ui-page-header > .btn,
  .ui-page-header > .mp-primary-cta {
    width: 100%;
  }

  .ui-page-header .ui-actions > * {
    flex: 1 1 140px;
  }

  .ui-btn--mobile-block {
    width: 100%;
  }

  .g-2cols,
  .g-3cols {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--ui-space-3) !important;
  }
}

@media (max-width: 370px) {
  .gfhdr-inner {
    padding-inline: 8px !important;
    gap: 5px !important;
  }

  .gfhdr-inner .gfhdr-logo-full { display: none; }
  .gfhdr-inner img.gfhdr-logo-mark { width: 32px; height: 32px !important; display: block !important; }

  .gfhdr-center .gf-wsw-seg {
    min-width: 35px;
    padding-inline: 7px;
  }

  .order-hub__header p { display: none; }
  .order-hub__header .ui-btn { padding-inline: 10px; }
}

@media (orientation: landscape) and (max-height: 540px) {
  .gfhdr-drawer,
  .gfhdr-drop {
    overscroll-behavior: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .gfhdr-drawer,
  .gfhdr-drawer-backdrop {
    transition: none !important;
  }
}
