/* Final shell hit-test lock. Loaded last on purpose. */
@media (min-width: 1181px) {
  .app-shell:not(.hidden) {
    grid-template-columns: 260px minmax(0, 1fr) !important;
    grid-template-rows: 112px minmax(0, 1fr) !important;
    height: 100vh !important;
    overflow: hidden !important;
  }

  .global-command-header {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    height: 112px !important;
    max-height: 112px !important;
    overflow: hidden !important;
    z-index: 80 !important;
  }

  .global-command-header .brand,
  .global-command-header .topbar {
    height: 112px !important;
    max-height: 112px !important;
    overflow: hidden !important;
  }

  .global-command-header .topbar {
    margin: 0 !important;
    padding: 0 24px !important;
    align-items: center !important;
  }

  .global-command-header .top-actions,
  .global-command-header .session-strip {
    max-height: 78px !important;
    overflow: hidden !important;
  }

  .global-command-header .sync-status-strip {
    display: grid !important;
    grid-template-columns: auto repeat(4, minmax(74px, auto)) !important;
    align-items: center !important;
    gap: 6px !important;
    max-width: 560px !important;
  }

  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-time-pill {
    display: inline-grid !important;
    align-content: center !important;
    min-height: 34px !important;
    max-width: none !important;
    overflow: hidden !important;
    padding: 6px 9px !important;
    border: 1px solid rgba(142, 244, 216, .22) !important;
    border-radius: 999px !important;
    color: rgba(222, 250, 244, .92) !important;
    background: rgba(5, 24, 22, .72) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03) !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .top-actions .sync-status-strip > .sync-time-pill {
    display: inline-grid !important;
  }

  .global-command-header .top-actions .sync-status-strip > #dataStamp.sync-legacy,
  .global-command-header .top-actions .sync-status-strip > #syncStamp.sync-legacy {
    display: none !important;
  }

  .global-command-header .sync-time-pill small {
    display: block !important;
    color: rgba(142, 244, 216, .72) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  .global-command-header .sync-time-pill strong {
    display: block !important;
    color: #f7fffb !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    line-height: 1.1 !important;
  }

  .global-command-header .sync-time-pill.pending strong {
    color: rgba(255, 214, 123, .9) !important;
  }

  .global-command-header .sync-legacy {
    display: none !important;
  }

  .app-shell .side {
    grid-column: 1 !important;
    grid-row: 2 !important;
    position: relative !important;
    z-index: 20 !important;
    height: calc(100vh - 112px) !important;
    max-height: calc(100vh - 112px) !important;
    padding-top: 16px !important;
  }

  .app-shell .main {
    grid-column: 2 !important;
    grid-row: 2 !important;
    position: relative !important;
    z-index: 1 !important;
    height: calc(100vh - 112px) !important;
    max-height: calc(100vh - 112px) !important;
  }

  .system-rail,
  .system-rail button,
  .side-function-map button {
    position: relative !important;
    z-index: 25 !important;
  }
}

@media (min-width: 1181px) and (max-width: 1500px) {
  .global-command-header .sync-status-strip {
    grid-template-columns: auto repeat(2, minmax(76px, auto)) !important;
    max-width: 360px !important;
  }

  .global-command-header .sync-time-pill {
    min-height: 30px !important;
    padding: 5px 8px !important;
  }
}

@media (max-width: 760px) {
  .global-command-header .sync-status-strip {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-time-pill {
    display: inline-grid !important;
  }

  .global-command-header .sync-legacy {
    display: none !important;
  }
}

/* V21: desktop header uses two rows so sync timestamps do not crowd account actions. */
@media (min-width: 1181px) {
  .app-shell:not(.hidden) {
    grid-template-rows: 136px minmax(0, 1fr) !important;
  }

  .global-command-header {
    height: 136px !important;
  }

  .global-command-header .brand {
    height: 136px !important;
  }

  .global-command-header .topbar {
    height: 136px !important;
    min-height: 136px !important;
    grid-template-columns: minmax(300px, .72fr) minmax(740px, 1.28fr) !important;
    align-items: center !important;
    gap: 24px !important;
    padding: 0 28px !important;
  }

  .global-command-header .topbar h2 {
    max-width: 100% !important;
    font-size: clamp(28px, 2vw, 38px) !important;
  }

  .global-command-header .top-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 42px 42px !important;
    align-content: center !important;
    align-items: center !important;
    justify-content: end !important;
    gap: 8px 10px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .global-command-header .sync-status-strip {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: flex !important;
    grid-template-columns: none !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .global-command-header .action-buttons {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: end !important;
  }

  .global-command-header .session-strip {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
  }

  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-time-pill {
    height: 38px !important;
    min-height: 38px !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    width: auto !important;
    max-width: none !important;
    padding: 0 13px !important;
    font-weight: 800 !important;
  }

  .global-command-header .sync-time-pill {
    width: 116px !important;
    max-width: 116px !important;
    padding: 5px 10px !important;
  }

  .global-command-header .sync-time-pill small {
    font-size: 10px !important;
  }

  .global-command-header .sync-time-pill strong {
    font-size: 12px !important;
  }

  .global-command-header .action-buttons #shareBtn,
  .global-command-header .action-buttons #topReloadBtn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 16px !important;
    font-size: 14px !important;
  }

  .global-command-header .session-strip {
    height: 38px !important;
    min-height: 38px !important;
    max-width: 360px !important;
  }

  .global-command-header .session-strip strong {
    max-width: 116px !important;
  }

  .global-command-header .session-strip span:nth-child(2) strong {
    max-width: 136px !important;
  }

  .global-command-header .session-strip button {
    height: 30px !important;
    min-height: 30px !important;
  }

  .app-shell .side,
  .app-shell .main {
    height: calc(100vh - 136px) !important;
    max-height: calc(100vh - 136px) !important;
  }
}

@media (min-width: 1181px) and (max-width: 1450px) {
  .global-command-header .topbar {
    grid-template-columns: minmax(260px, .58fr) minmax(700px, 1.42fr) !important;
    gap: 16px !important;
  }

  .global-command-header .topbar h2 {
    font-size: clamp(24px, 1.75vw, 32px) !important;
  }

  .global-command-header .sync-time-pill {
    width: 106px !important;
    max-width: 106px !important;
  }
}

/* V22: command header is a two-line control deck, matching the cloud cockpit layout. */
@media (min-width: 1181px) {
  .app-shell:not(.hidden) {
    grid-template-columns: 260px minmax(0, 1fr) !important;
    grid-template-rows: 134px minmax(0, 1fr) !important;
  }

  .global-command-header {
    height: 134px !important;
    max-height: 134px !important;
    grid-template-columns: 260px minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .global-command-header .brand {
    width: 260px !important;
    height: 134px !important;
    max-height: 134px !important;
    padding: 0 18px !important;
  }

  .global-command-header .brand .mark {
    width: 54px !important;
    height: 54px !important;
    flex: 0 0 54px !important;
  }

  .global-command-header .brand h1 {
    font-size: 23px !important;
  }

  .global-command-header .topbar {
    height: 134px !important;
    min-height: 134px !important;
    max-height: 134px !important;
    padding: 16px 22px 14px 28px !important;
    display: grid !important;
    grid-template-columns: minmax(310px, 1fr) minmax(700px, 0.92fr) !important;
    grid-template-rows: 48px 44px !important;
    column-gap: 22px !important;
    row-gap: 6px !important;
    align-items: center !important;
  }

  .global-command-header .title-block {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .global-command-header .title-block .eyebrow,
  .global-command-header .title-block .topline {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .topbar h2 {
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #fff !important;
    font-size: clamp(28px, 2.1vw, 40px) !important;
    line-height: 1.05 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .top-actions {
    grid-column: 2 !important;
    grid-row: 1 / 3 !important;
    align-self: stretch !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 43px 43px !important;
    gap: 8px 10px !important;
    min-width: 0 !important;
    width: 100% !important;
    justify-self: end !important;
    align-content: center !important;
  }

  .global-command-header .sync-status-strip {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  .global-command-header .action-buttons {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .global-command-header .action-buttons .top-link {
    display: none !important;
  }

  .global-command-header .session-strip {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    height: 38px !important;
    max-width: 350px !important;
    padding: 4px 6px 4px 12px !important;
  }

  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-time-pill {
    height: 38px !important;
    min-height: 38px !important;
    border-color: rgba(142, 244, 216, .24) !important;
    background: linear-gradient(180deg, rgba(12, 33, 30, .86), rgba(5, 18, 17, .86)) !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex: 0 0 auto !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  .global-command-header .sync-time-pill {
    flex: 0 0 112px !important;
    width: 112px !important;
    max-width: 112px !important;
    padding: 5px 10px !important;
  }

  .global-command-header .sync-time-pill small {
    font-size: 10px !important;
    font-weight: 900 !important;
    color: #8ef4d8 !important;
  }

  .global-command-header .sync-time-pill strong {
    font-size: 12px !important;
    font-weight: 900 !important;
  }

  .global-command-header .action-buttons #shareBtn,
  .global-command-header .action-buttons #topReloadBtn,
  .global-command-header .session-strip button {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 16px !important;
    white-space: nowrap !important;
  }

  .global-command-header .session-strip span {
    min-width: 0 !important;
  }

  .global-command-header .session-strip small {
    display: none !important;
  }

  .global-command-header .session-strip strong {
    max-width: 120px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .session-strip span:nth-child(2) strong {
    max-width: 145px !important;
  }

  .app-shell .side,
  .app-shell .main {
    height: calc(100vh - 134px) !important;
    max-height: calc(100vh - 134px) !important;
  }
}

@media (min-width: 1181px) and (max-width: 1500px) {
  .global-command-header .topbar {
    grid-template-columns: minmax(260px, .8fr) minmax(620px, 1fr) !important;
    column-gap: 16px !important;
    padding-left: 24px !important;
    padding-right: 16px !important;
  }

  .global-command-header .topbar h2 {
    font-size: clamp(24px, 1.8vw, 32px) !important;
  }

  .global-command-header .sync-time-pill {
    flex-basis: 102px !important;
    width: 102px !important;
    max-width: 102px !important;
  }

  .global-command-header .session-strip {
    max-width: 310px !important;
  }
}

/* V23: taste gate cleanup. Top command deck + UE board must stay aligned, readable and mobile-safe. */
@media (min-width: 1181px) {
  :root {
    --yunshu-side-w: 248px;
    --yunshu-header-h: 148px;
  }

  .app-shell:not(.hidden) {
    grid-template-columns: var(--yunshu-side-w) minmax(0, 1fr) !important;
    grid-template-rows: var(--yunshu-header-h) minmax(0, 1fr) !important;
  }

  .global-command-header {
    height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    grid-template-columns: var(--yunshu-side-w) minmax(0, 1fr) !important;
    border-bottom-color: rgba(142, 244, 216, .16) !important;
    background:
      linear-gradient(90deg, rgba(4, 14, 13, .98), rgba(4, 16, 15, .95)),
      radial-gradient(circle at 82% 18%, rgba(142, 244, 216, .10), transparent 34%) !important;
  }

  .global-command-header .brand,
  .app-shell .side {
    width: var(--yunshu-side-w) !important;
  }

  .global-command-header .brand {
    height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    padding: 0 14px !important;
    gap: 12px !important;
  }

  .global-command-header .brand .mark {
    width: 54px !important;
    height: 54px !important;
    flex-basis: 54px !important;
  }

  .global-command-header .brand h1 {
    font-size: 24px !important;
    letter-spacing: 0 !important;
  }

  .global-command-header .topbar {
    height: var(--yunshu-header-h) !important;
    min-height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    display: grid !important;
    grid-template-columns: minmax(320px, .78fr) minmax(780px, 1.22fr) !important;
    grid-template-rows: 58px 48px !important;
    align-content: center !important;
    align-items: center !important;
    gap: 8px 24px !important;
    padding: 18px 22px 16px 30px !important;
    overflow: hidden !important;
  }

  .global-command-header .title-block {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    min-width: 0 !important;
    padding-right: 10px !important;
  }

  .global-command-header .title-block .eyebrow,
  .global-command-header .title-block .topline {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    color: rgba(226, 248, 242, .58) !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .topbar h2 {
    max-width: 100% !important;
    margin: 3px 0 4px !important;
    overflow: hidden !important;
    font-size: clamp(28px, 2.05vw, 40px) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .top-actions {
    grid-column: 2 !important;
    grid-row: 1 / 3 !important;
    align-self: stretch !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 44px 44px !important;
    gap: 10px 10px !important;
    min-width: 0 !important;
    width: 100% !important;
    align-content: center !important;
  }

  .global-command-header .sync-status-strip {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-time-pill {
    height: 40px !important;
    min-height: 40px !important;
    border: 1px solid rgba(142, 244, 216, .22) !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, rgba(11, 35, 31, .92), rgba(3, 17, 16, .92)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04) !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex: 0 0 auto !important;
    max-width: 116px !important;
    padding: 0 14px !important;
    overflow: hidden !important;
    color: rgba(239, 255, 250, .82) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .sync-time-pill {
    flex: 0 0 116px !important;
    width: 116px !important;
    max-width: 116px !important;
    padding: 5px 11px !important;
  }

  .global-command-header .sync-time-pill small,
  .global-command-header .sync-time-pill strong {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
  }

  .global-command-header .sync-time-pill small {
    color: rgba(142, 244, 216, .82) !important;
    font-size: 10px !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
  }

  .global-command-header .sync-time-pill strong {
    margin-top: 2px !important;
    color: #f7fffc !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
  }

  .global-command-header .action-buttons {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .global-command-header .action-buttons .top-link {
    display: none !important;
  }

  .global-command-header .action-buttons #shareBtn,
  .global-command-header .action-buttons #topReloadBtn {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  .global-command-header .session-strip {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    max-width: 350px !important;
    height: 40px !important;
    padding: 4px 6px 4px 12px !important;
    border-radius: 999px !important;
  }

  .global-command-header .session-strip small {
    display: none !important;
  }

  .global-command-header .session-strip span,
  .global-command-header .session-strip strong {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .session-strip strong {
    max-width: 94px !important;
    font-size: 13px !important;
  }

  .global-command-header .session-strip span:nth-child(2) strong {
    max-width: 142px !important;
  }

  .global-command-header .session-strip button {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
  }

  .app-shell .side,
  .app-shell .main {
    height: calc(100vh - var(--yunshu-header-h)) !important;
    max-height: calc(100vh - var(--yunshu-header-h)) !important;
  }
}

@media (min-width: 1181px) and (max-width: 1440px) {
  :root {
    --yunshu-side-w: 232px;
  }

  .global-command-header .topbar {
    grid-template-columns: minmax(250px, .65fr) minmax(650px, 1.35fr) !important;
    gap: 8px 16px !important;
    padding-left: 24px !important;
    padding-right: 16px !important;
  }

  .global-command-header .topbar h2 {
    font-size: clamp(24px, 1.85vw, 30px) !important;
  }

  .global-command-header .title-block .topline {
    display: none !important;
  }

  .global-command-header .sync-time-pill {
    flex-basis: 100px !important;
    width: 100px !important;
    max-width: 100px !important;
    padding-left: 9px !important;
    padding-right: 9px !important;
  }

  .global-command-header .session-strip {
    max-width: 306px !important;
  }
}

@media (min-width: 761px) {
  body[data-hub-mode="ue"] .app-shell .main {
    padding: 14px 18px 26px !important;
  }

  body[data-hub-mode="ue"] .store-ue-panel {
    gap: 14px !important;
    max-width: 1660px !important;
  }

  body[data-hub-mode="ue"] .store-ue-hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .34fr) !important;
    gap: 14px !important;
    padding: 18px 20px !important;
  }

  body[data-hub-mode="ue"] .store-ue-kpis {
    grid-template-columns: repeat(5, minmax(138px, 1fr)) !important;
    gap: 12px !important;
  }

  body[data-hub-mode="ue"] .store-ue-command {
    grid-template-columns: minmax(300px, 370px) minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card,
  body[data-hub-mode="ue"] .store-ue-detail-card,
  body[data-hub-mode="ue"] .store-ue-bottom > article {
    border-color: rgba(142, 244, 216, .18) !important;
    background:
      linear-gradient(145deg, rgba(10, 35, 31, .92), rgba(4, 17, 15, .96)),
      radial-gradient(circle at 88% 10%, rgba(142, 244, 216, .10), transparent 36%) !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card {
    position: sticky !important;
    top: 14px !important;
    max-height: calc(100vh - 178px) !important;
    padding: 14px !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card #ueQueueSearch {
    height: 46px !important;
    margin: 12px 0 !important;
    box-sizing: border-box !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card .ue-store-rows {
    max-height: calc(100vh - 360px) !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card .ue-store-row {
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
    min-height: 82px !important;
    padding: 12px !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card .ue-store-row > small {
    grid-column: 3 !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card .ue-store-row p {
    grid-column: 2 / -1 !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card .ue-store-row.empty {
    grid-template-columns: 1fr !important;
    min-height: 118px !important;
    place-items: center !important;
    padding: 18px !important;
    text-align: center !important;
    cursor: default !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card {
    min-width: 0 !important;
    padding: 14px !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .ue-detail-head h4 {
    white-space: normal !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .ue-detail-summary {
    grid-template-columns: repeat(5, minmax(112px, 1fr)) !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-template-title {
    min-height: 106px !important;
    padding: 16px 18px !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-template-title strong {
    font-size: clamp(22px, 1.75vw, 30px) !important;
    line-height: 1.15 !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-template-months {
    grid-auto-columns: minmax(126px, 150px) !important;
    padding: 12px 14px !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame {
    padding: 0 !important;
    background: #f2f6f3 !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-head,
  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row {
    grid-template-columns: 128px minmax(300px, .92fr) minmax(260px, 1fr) !important;
    min-width: 760px !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-head b,
  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row span,
  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row strong,
  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row em {
    min-height: 42px !important;
    padding: 8px 12px !important;
    font-size: 16px !important;
    line-height: 1.18 !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row strong {
    justify-content: flex-start !important;
    text-align: left !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row em {
    justify-content: flex-end !important;
    text-align: right !important;
  }
}

@media (max-width: 760px) {
  body:has(.app-shell:not(.hidden)) {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .app-shell:not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100svh !important;
    overflow: visible !important;
  }

  .global-command-header {
    position: sticky !important;
    top: 0 !important;
    order: 0 !important;
    z-index: 80 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: max(10px, env(safe-area-inset-top)) 10px 9px !important;
    box-sizing: border-box !important;
    background: rgba(4, 15, 14, .96) !important;
  }

  .global-command-header .brand {
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    gap: 10px !important;
  }

  .global-command-header .brand .mark {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
  }

  .global-command-header .brand h1 {
    font-size: 18px !important;
  }

  .global-command-header .brand p,
  .global-command-header .title-block .topline,
  .global-command-header .title-block .eyebrow {
    display: none !important;
  }

  .global-command-header .topbar {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .global-command-header .title-block {
    min-width: 0 !important;
  }

  .global-command-header .topbar h2 {
    font-size: 20px !important;
    line-height: 1.12 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .global-command-header .top-actions {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
  }

  .global-command-header .sync-status-strip {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    height: 36px !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }

  .global-command-header .sync-status-strip::-webkit-scrollbar {
    display: none !important;
  }

  .global-command-header .top-actions .sync-status-strip > span,
  .global-command-header .top-actions .sync-status-strip > .sync-time-pill {
    display: grid !important;
    align-content: center !important;
  }

  .global-command-header .top-actions .sync-status-strip > .sync-legacy {
    display: none !important;
  }

  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-time-pill {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 5px 10px !important;
  }

  .global-command-header .sync-time-pill {
    min-width: 88px !important;
  }

  .global-command-header .sync-time-pill small {
    display: none !important;
  }

  .global-command-header .sync-time-pill strong {
    font-size: 11px !important;
  }

  .global-command-header .action-buttons {
    grid-column: 1 !important;
    display: flex !important;
    min-width: 0 !important;
    gap: 7px !important;
  }

  .global-command-header .action-buttons .top-link,
  .global-command-header .action-buttons #shareBtn {
    display: none !important;
  }

  .global-command-header .action-buttons #topReloadBtn {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
  }

  .global-command-header .session-strip {
    grid-column: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 120px !important;
    height: 34px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .global-command-header .session-strip span {
    display: none !important;
  }

  .global-command-header .session-strip button {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
  }

  .app-shell .side {
    position: relative !important;
    top: auto !important;
    order: 1 !important;
    z-index: 70 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 8px 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .app-shell .side > :not(.system-rail) {
    display: none !important;
  }

  .app-shell .side .system-rail {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 0 2px 2px !important;
    scrollbar-width: none !important;
  }

  .app-shell .side .system-rail::-webkit-scrollbar {
    display: none !important;
  }

  .app-shell .main {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 12px 10px 84px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .mobile-session-bar {
    display: none !important;
  }

  body[data-hub-mode="ue"] .store-ue-panel,
  body[data-hub-mode="ue"] .store-ue-panel > *,
  body[data-hub-mode="ue"] .store-ue-command,
  body[data-hub-mode="ue"] .store-ue-bottom,
  body[data-hub-mode="ue"] .store-ue-queue-card,
  body[data-hub-mode="ue"] .store-ue-detail-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body[data-hub-mode="ue"] .store-ue-hero,
  body[data-hub-mode="ue"] .store-ue-command,
  body[data-hub-mode="ue"] .store-ue-bottom {
    grid-template-columns: 1fr !important;
  }

  body[data-hub-mode="ue"] .store-ue-kpis {
    display: flex !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card #ueQueueSearch,
  body[data-hub-mode="ue"] .store-ue-queue-card .ue-queue-head select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body[data-hub-mode="ue"] .store-ue-queue-card .ue-store-row.empty {
    grid-template-columns: 1fr !important;
    min-height: 96px !important;
    text-align: center !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-template-title {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    padding: 14px !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-template-title strong {
    font-size: 20px !important;
    white-space: normal !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-template-title > b {
    min-width: 74px !important;
    padding: 9px 10px !important;
    font-size: 13px !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-template-months {
    grid-auto-columns: minmax(112px, 132px) !important;
    padding: 10px !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame {
    max-width: 100% !important;
    overflow-x: auto !important;
    padding: 0 !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-head,
  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row {
    grid-template-columns: 82px minmax(170px, .9fr) minmax(190px, 1fr) !important;
    min-width: 520px !important;
  }

  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-head b,
  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row span,
  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row strong,
  body[data-hub-mode="ue"] .store-ue-detail-card .pc-ue-reader-frame .owner-ue-reader-row em {
    min-height: 40px !important;
    padding: 7px 8px !important;
    font-size: 14px !important;
  }
}

/* V24: remove duplicate page title and turn the top-right area into a clean command strip. */
@media (min-width: 1181px) {
  :root {
    --yunshu-header-h: 118px;
  }

  .global-command-header {
    height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
  }

  .global-command-header .brand {
    height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
  }

  .global-command-header .topbar {
    height: var(--yunshu-header-h) !important;
    min-height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    justify-items: stretch !important;
    padding: 14px 22px 14px 28px !important;
    overflow: hidden !important;
  }

  .global-command-header .title-block {
    display: none !important;
  }

  .global-command-header .top-actions {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    align-self: center !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 40px 40px !important;
    gap: 8px 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    align-content: center !important;
  }

  .global-command-header .sync-status-strip {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  .global-command-header .sync-status-strip::before {
    content: "DATA SYNC";
    flex: 0 0 auto;
    height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 0 10px;
    border: 1px solid rgba(142, 244, 216, .16);
    border-radius: 999px;
    color: rgba(142, 244, 216, .72);
    background: rgba(4, 18, 16, .58);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0;
  }

  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-time-pill {
    height: 36px !important;
    min-height: 36px !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    max-width: 116px !important;
  }

  .global-command-header .sync-time-pill {
    flex: 0 0 116px !important;
    width: 116px !important;
    max-width: 116px !important;
    padding: 4px 11px !important;
  }

  .global-command-header .sync-time-pill small {
    font-size: 10px !important;
  }

  .global-command-header .sync-time-pill strong {
    font-size: 12px !important;
  }

  .global-command-header .action-buttons {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-content: flex-end !important;
    gap: 8px !important;
  }

  .global-command-header .action-buttons #topReloadBtn {
    order: 1 !important;
  }

  .global-command-header .action-buttons #shareBtn {
    order: 2 !important;
  }

  .global-command-header .action-buttons #topReloadBtn,
  .global-command-header .action-buttons #shareBtn {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 16px !important;
  }

  .global-command-header .session-strip {
    grid-column: 2 !important;
    grid-row: 2 !important;
    height: 36px !important;
    max-width: 360px !important;
  }

  .global-command-header .session-strip button {
    height: 30px !important;
    min-height: 30px !important;
  }

  .app-shell .side,
  .app-shell .main {
    height: calc(100vh - var(--yunshu-header-h)) !important;
    max-height: calc(100vh - var(--yunshu-header-h)) !important;
  }
}

@media (min-width: 1181px) and (max-width: 1440px) {
  .global-command-header .topbar {
    padding-left: 20px !important;
    padding-right: 14px !important;
  }

  .global-command-header .sync-status-strip {
    gap: 6px !important;
  }

  .global-command-header .sync-status-strip::before {
    display: inline-grid !important;
  }

  .global-command-header .sync-time-pill {
    flex-basis: 102px !important;
    width: 102px !important;
    max-width: 102px !important;
  }
}

@media (max-width: 760px) {
  .global-command-header .title-block {
    display: none !important;
  }

  .global-command-header {
    gap: 7px !important;
  }
}

/* V25: single-line command bar. Keep every control in one row, no duplicated page title. */
@media (min-width: 1181px) {
  :root {
    --yunshu-header-h: 88px;
  }

  .app-shell:not(.hidden) {
    grid-template-rows: var(--yunshu-header-h) minmax(0, 1fr) !important;
  }

  .global-command-header {
    height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    min-height: var(--yunshu-header-h) !important;
  }

  .global-command-header .brand {
    height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    min-height: var(--yunshu-header-h) !important;
  }

  .global-command-header .brand .mark {
    width: 50px !important;
    height: 50px !important;
    flex-basis: 50px !important;
  }

  .global-command-header .brand h1 {
    font-size: 25px !important;
  }

  .global-command-header .topbar {
    height: var(--yunshu-header-h) !important;
    min-height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: stretch !important;
    padding: 0 18px 0 24px !important;
    overflow: hidden !important;
  }

  .global-command-header .title-block {
    display: none !important;
  }

  .global-command-header .top-actions {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .global-command-header .sync-status-strip {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 42px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    overflow: hidden !important;
  }

  .global-command-header .sync-status-strip::before,
  .global-command-header .sync-legacy {
    display: none !important;
    content: none !important;
  }

  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-time-pill {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 999px !important;
    box-sizing: border-box !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex: 0 0 92px !important;
    width: 92px !important;
    max-width: 92px !important;
    padding: 0 12px !important;
    text-align: center !important;
  }

  .global-command-header .sync-time-pill {
    flex: 0 0 108px !important;
    width: 108px !important;
    max-width: 108px !important;
    padding: 4px 10px !important;
  }

  .global-command-header .sync-time-pill small,
  .global-command-header .sync-time-pill strong {
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .sync-time-pill small {
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .global-command-header .sync-time-pill strong {
    margin-top: 2px !important;
    font-size: 12px !important;
    line-height: 1.05 !important;
  }

  .global-command-header .action-buttons {
    flex: 0 0 auto !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  .global-command-header .action-buttons .top-link {
    display: none !important;
  }

  .global-command-header .action-buttons #topReloadBtn {
    order: 1 !important;
  }

  .global-command-header .action-buttons #shareBtn {
    order: 2 !important;
  }

  .global-command-header .action-buttons #topReloadBtn,
  .global-command-header .action-buttons #shareBtn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 15px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  .global-command-header .session-strip {
    flex: 0 0 auto !important;
    height: 42px !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .global-command-header .session-strip span {
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    padding: 0 13px !important;
    border: 1px solid rgba(142, 244, 216, .22) !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, rgba(10, 33, 30, .88), rgba(3, 17, 16, .88)) !important;
  }

  .global-command-header .session-strip small {
    display: none !important;
  }

  .global-command-header .session-strip strong {
    max-width: 132px !important;
    overflow: hidden !important;
    color: #f7fffc !important;
    font-size: 13px !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .session-strip span:first-child strong {
    max-width: 82px !important;
  }

  .global-command-header .session-strip span:nth-child(2) strong {
    max-width: 150px !important;
  }

  .global-command-header .session-strip button {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  .app-shell .side,
  .app-shell .main {
    height: calc(100vh - var(--yunshu-header-h)) !important;
    max-height: calc(100vh - var(--yunshu-header-h)) !important;
  }
}

@media (min-width: 1181px) and (max-width: 1440px) {
  .global-command-header .topbar {
    padding-left: 16px !important;
    padding-right: 12px !important;
  }

  .global-command-header .top-actions {
    gap: 7px !important;
  }

  .global-command-header .sync-status-strip {
    gap: 5px !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex-basis: 84px !important;
    width: 84px !important;
    max-width: 84px !important;
    padding: 0 9px !important;
  }

  .global-command-header .sync-time-pill {
    flex-basis: 96px !important;
    width: 96px !important;
    max-width: 96px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .global-command-header .action-buttons #topReloadBtn,
  .global-command-header .action-buttons #shareBtn {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .global-command-header .session-strip {
    gap: 6px !important;
  }

  .global-command-header .session-strip span {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* V26: tighter one-line command bar. Controls sit after the brand instead of floating at the far edge. */
@media (min-width: 1181px) {
  .global-command-header .topbar {
    padding-left: 12px !important;
    padding-right: 14px !important;
    justify-content: flex-start !important;
  }

  .global-command-header .top-actions {
    width: auto !important;
    max-width: 100% !important;
    flex: 0 1 auto !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .global-command-header .sync-status-strip {
    flex: 0 1 auto !important;
    width: auto !important;
    justify-content: flex-start !important;
    gap: 6px !important;
  }

  .global-command-header .action-buttons,
  .global-command-header .session-strip {
    flex: 0 0 auto !important;
  }
}

@media (min-width: 1181px) and (max-width: 1440px) {
  .global-command-header .topbar {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .global-command-header .top-actions {
    gap: 6px !important;
  }

  .global-command-header .sync-status-strip {
    gap: 4px !important;
  }
}

/* V27: readable inline status sentence: total stores, product update and three-platform order sync times. */
@media (min-width: 1181px) {
  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-time-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    height: 34px !important;
    min-height: 34px !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 12px !important;
    line-height: 1 !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex: 0 0 auto !important;
    min-width: 116px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .global-command-header .sync-time-pill {
    flex: 0 0 auto !important;
    min-width: 122px !important;
  }

  .global-command-header #productSyncPill {
    min-width: 164px !important;
  }

  .global-command-header .sync-time-pill small,
  .global-command-header .sync-time-pill strong {
    display: inline !important;
    margin: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .global-command-header .sync-time-pill small {
    flex: 0 0 auto !important;
    color: rgba(177, 211, 202, .92) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  .global-command-header .sync-time-pill strong {
    color: #f7fffc !important;
    font-size: 12px !important;
    font-weight: 900 !important;
  }

  .global-command-header .action-buttons #topReloadBtn,
  .global-command-header .action-buttons #shareBtn,
  .global-command-header .session-strip button {
    height: 34px !important;
    min-height: 34px !important;
  }

  .global-command-header .session-strip span {
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
  }

  .global-command-header .session-strip span:first-child small {
    display: none !important;
  }

  .global-command-header .session-strip span:nth-child(2) small {
    display: inline !important;
    color: rgba(142, 244, 216, .86) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .global-command-header .session-strip strong {
    font-size: 12px !important;
  }
}

@media (min-width: 1181px) and (max-width: 1440px) {
  .global-command-header .sync-status-strip .sync-store-count {
    min-width: 104px !important;
    padding-left: 9px !important;
    padding-right: 9px !important;
  }

  .global-command-header .sync-time-pill {
    min-width: 108px !important;
    padding-left: 9px !important;
    padding-right: 9px !important;
  }

  .global-command-header #productSyncPill {
    min-width: 144px !important;
  }

  .global-command-header .sync-time-pill small {
    font-size: 10px !important;
  }

  .global-command-header .sync-time-pill strong {
    font-size: 11px !important;
  }
}

/* V28: international-card detail list. Long SKU names must never collide with status columns. */
.app-shell .intl-detail-list {
  overflow-x: hidden !important;
}

.app-shell .intl-detail-list header {
  min-height: 58px !important;
}

.app-shell .intl-detail-row {
  grid-template-columns: minmax(0, 1fr) 56px 82px 74px 98px !important;
  gap: 8px !important;
  min-height: 74px !important;
  padding: 10px 12px !important;
  align-items: center !important;
}

.app-shell .intl-detail-row > * {
  min-width: 0 !important;
}

.app-shell .intl-detail-main {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.app-shell .intl-detail-main strong {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: #f7fffc !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  white-space: normal !important;
  text-overflow: clip !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

.app-shell .intl-detail-main small {
  display: block !important;
  max-width: 100% !important;
  margin-top: 5px !important;
  overflow: hidden !important;
  color: rgba(190, 221, 214, .72) !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.app-shell .intl-detail-status,
.app-shell .intl-detail-stock,
.app-shell .intl-detail-sale,
.app-shell .intl-detail-up {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 24px !important;
  padding: 4px 7px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.app-shell .intl-detail-status {
  color: #8ef4d8 !important;
  background: rgba(142, 244, 216, .12) !important;
}

.app-shell .intl-detail-row.offsale .intl-detail-status,
.app-shell .intl-detail-row.stock0 .intl-detail-status {
  color: #1c1405 !important;
  background: linear-gradient(135deg, #ffd66b, #f0bf5b) !important;
}

.app-shell .intl-detail-stock,
.app-shell .intl-detail-sale,
.app-shell .intl-detail-up {
  color: rgba(230, 255, 249, .78) !important;
  background: rgba(255, 255, 255, .045) !important;
}

@media (min-width: 1181px) and (max-width: 1500px) {
  .app-shell .international-split {
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr) !important;
  }

  .app-shell .intl-detail-row {
    grid-template-columns: minmax(0, 1fr) 50px 70px 62px 86px !important;
    gap: 6px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .app-shell .intl-detail-main strong {
    font-size: 13px !important;
  }

  .app-shell .intl-detail-status,
  .app-shell .intl-detail-stock,
  .app-shell .intl-detail-sale,
  .app-shell .intl-detail-up {
    padding-left: 5px !important;
    padding-right: 5px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 920px) {
  .app-shell .intl-detail-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .app-shell .intl-detail-status {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  .app-shell .intl-detail-stock,
  .app-shell .intl-detail-sale,
  .app-shell .intl-detail-up {
    justify-self: start !important;
  }
}

/* V26: action recovery is an operating workbench, not a locked viewport. */
body[data-hub-mode="actions"]:has(.app-shell:not(.hidden)) {
  overflow: hidden !important;
}

body[data-hub-mode="actions"] .app-shell:not(.hidden) {
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

body[data-hub-mode="actions"] .app-shell .main {
  height: calc(100vh - var(--yunshu-header-h, 88px)) !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  align-content: start !important;
  padding-bottom: 88px !important;
  scroll-behavior: smooth !important;
}

body[data-hub-mode="actions"] #roleActionsPanel,
body[data-hub-mode="actions"] .role-action-center {
  height: auto !important;
  max-height: none !important;
  min-height: calc(100vh - var(--yunshu-header-h, 88px) - 44px) !important;
  overflow: visible !important;
}

body[data-hub-mode="actions"] .role-action-head {
  min-height: auto !important;
}

body[data-hub-mode="actions"] .role-action-layout {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  align-items: start !important;
}

body[data-hub-mode="actions"] .role-action-score,
body[data-hub-mode="actions"] .role-action-workbench,
body[data-hub-mode="actions"] .role-action-rules {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body[data-hub-mode="actions"] #roleActionList,
body[data-hub-mode="actions"] #roleActionRules {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body[data-hub-mode="actions"] .action-matrix-table {
  min-width: 0 !important;
}

/* V27: action matrix needs full-width operating room for all roles. */
body[data-hub-mode="actions"] .role-action-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

body[data-hub-mode="actions"] .role-action-score {
  display: grid !important;
  grid-template-columns: minmax(220px, .9fr) minmax(360px, 1.1fr) !important;
  gap: 12px 18px !important;
  min-height: auto !important;
}

body[data-hub-mode="actions"] .role-action-score > span,
body[data-hub-mode="actions"] .role-action-score > strong,
body[data-hub-mode="actions"] .role-action-score > p {
  grid-column: 1 !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid,
body[data-hub-mode="actions"] .role-action-score .role-action-meter,
body[data-hub-mode="actions"] .role-action-score #roleActionProgressText {
  grid-column: 2 !important;
}

body[data-hub-mode="actions"] .role-action-score strong {
  margin-top: 8px !important;
  font-size: 34px !important;
}

body[data-hub-mode="actions"] .role-action-rules {
  grid-column: auto !important;
  min-height: auto !important;
}

@media (max-width: 980px) {
  body[data-hub-mode="actions"] .role-action-score {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body[data-hub-mode="actions"] .role-action-score > span,
  body[data-hub-mode="actions"] .role-action-score > strong,
  body[data-hub-mode="actions"] .role-action-score > p,
  body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid,
  body[data-hub-mode="actions"] .role-action-score .role-action-meter,
  body[data-hub-mode="actions"] .role-action-score #roleActionProgressText {
    grid-column: 1 !important;
  }
}

@media (max-width: 1180px) {
  body[data-hub-mode="actions"]:has(.app-shell:not(.hidden)),
  body[data-hub-mode="actions"] .app-shell:not(.hidden),
  body[data-hub-mode="actions"] .app-shell .main {
    height: auto !important;
    min-height: 100svh !important;
    overflow: visible !important;
  }
}

/* V28: global command header uses the whole content rail and right-aligns controls. */
@media (min-width: 1181px) {
  .global-command-header .topbar {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 0 18px 0 28px !important;
  }

  .global-command-header .title-block {
    display: none !important;
  }

  .global-command-header .top-actions {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 10px !important;
  }

  .global-command-header .sync-status-strip {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }

  .global-command-header .action-buttons,
  .global-command-header .session-strip {
    width: auto !important;
    min-width: max-content !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }
}

@media (min-width: 1181px) and (max-width: 1500px) {
  .global-command-header .topbar {
    padding-left: 18px !important;
    padding-right: 14px !important;
  }

  .global-command-header .top-actions {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  .global-command-header .sync-status-strip {
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    row-gap: 5px !important;
  }

  .global-command-header .action-buttons {
    justify-self: end !important;
  }

  .global-command-header .session-strip {
    grid-column: 2 !important;
    justify-self: end !important;
  }
}

/* V29: action recovery score becomes a compact locked command strip, not a half-screen card. */
body[data-hub-mode="actions"] .role-action-score {
  position: sticky !important;
  top: 0 !important;
  z-index: 14 !important;
  display: grid !important;
  grid-template-columns: minmax(260px, .9fr) minmax(420px, 1.2fr) minmax(260px, .7fr) !important;
  grid-template-rows: auto auto auto !important;
  gap: 5px 18px !important;
  align-items: center !important;
  min-height: 0 !important;
  padding: 12px 18px !important;
  border-color: rgba(142,244,216,.22) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(90deg, rgba(12,45,40,.96), rgba(5,18,16,.94)),
    radial-gradient(circle at 100% 0%, rgba(142,244,216,.14), transparent 34%) !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.05) !important;
  backdrop-filter: blur(14px) !important;
}

body[data-hub-mode="actions"] .role-action-score > span,
body[data-hub-mode="actions"] .role-action-score > strong,
body[data-hub-mode="actions"] .role-action-score > p {
  grid-column: 1 !important;
}

body[data-hub-mode="actions"] .role-action-score > span {
  grid-row: 1 !important;
  margin: 0 !important;
  color: rgba(142,244,216,.78) !important;
  font-size: 12px !important;
}

body[data-hub-mode="actions"] .role-action-score > strong {
  grid-row: 2 !important;
  margin: 0 !important;
  font-size: clamp(24px, 1.8vw, 32px) !important;
  line-height: 1.05 !important;
}

body[data-hub-mode="actions"] .role-action-score > p {
  grid-row: 3 !important;
  margin: 0 !important;
  color: rgba(226,248,242,.72) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid {
  grid-column: 2 !important;
  grid-row: 1 / 4 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid b {
  min-height: 58px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  background: rgba(2,13,12,.52) !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid small {
  font-size: 12px !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid em {
  font-size: 24px !important;
  line-height: 1.1 !important;
}

body[data-hub-mode="actions"] .role-action-score #roleActionLedgerState,
body[data-hub-mode="actions"] .role-action-score .role-action-meter,
body[data-hub-mode="actions"] .role-action-score #roleActionProgressText {
  grid-column: 3 !important;
}

body[data-hub-mode="actions"] .role-action-score #roleActionLedgerState {
  grid-row: 1 !important;
  align-self: end !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-meter {
  grid-row: 2 !important;
  width: 100% !important;
  margin: 0 !important;
}

body[data-hub-mode="actions"] .role-action-score #roleActionProgressText {
  grid-row: 3 !important;
  align-self: start !important;
  font-size: 13px !important;
}

body[data-role="operator"][data-hub-mode="actions"] .role-action-score {
  position: sticky !important;
  top: 0 !important;
}

body[data-role="operator"][data-hub-mode="actions"] .role-action-rules {
  position: static !important;
}

@media (max-width: 1320px) {
  body[data-hub-mode="actions"] .role-action-score {
    position: static !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-hub-mode="actions"] .role-action-score > span,
  body[data-hub-mode="actions"] .role-action-score > strong,
  body[data-hub-mode="actions"] .role-action-score > p,
  body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid,
  body[data-hub-mode="actions"] .role-action-score #roleActionLedgerState,
  body[data-hub-mode="actions"] .role-action-score .role-action-meter,
  body[data-hub-mode="actions"] .role-action-score #roleActionProgressText {
    grid-column: 1 !important;
  }
}

/* V29: account password modal and login helper. */
.login-link-button {
  width: 100%;
  border: 0;
  color: rgba(226,248,242,.78);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.login-link-button:hover {
  color: #8ef4d8;
}

.password-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 8, 7, .72);
  backdrop-filter: blur(14px);
}

.password-modal.hidden {
  display: none !important;
}

.password-modal-card {
  position: relative;
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
  padding: 28px;
  border: 1px solid rgba(142,244,216,.24);
  border-radius: 18px;
  color: #f3fffa;
  background:
    radial-gradient(circle at 10% 0%, rgba(142,244,216,.16), transparent 34%),
    linear-gradient(145deg, rgba(8,28,25,.98), rgba(2,10,9,.98));
  box-shadow: 0 28px 88px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06);
}

.password-modal-card h2,
.password-modal-card p {
  margin: 0;
}

.password-modal-card p:not(.eyebrow):not(.login-error) {
  color: rgba(226,248,242,.70);
  font-size: 13px;
  line-height: 1.55;
}

.password-modal-card label {
  color: rgba(226,248,242,.72);
  font-size: 12px;
  font-weight: 900;
}

.password-modal-card input {
  min-height: 42px;
  border: 1px solid rgba(142,244,216,.22);
  border-radius: 10px;
  padding: 0 12px;
  color: #f3fffa;
  background: rgba(2,12,11,.58);
  outline: none;
}

.password-modal-card input:focus {
  border-color: rgba(142,244,216,.62);
  box-shadow: 0 0 0 3px rgba(142,244,216,.12);
}

.password-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(142,244,216,.18);
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(226,248,242,.78);
  background: rgba(255,255,255,.05);
  cursor: pointer;
}

/* V24: final desktop command bar. One row, right aligned, no floating second line. */
@media (min-width: 1181px) {
  :root {
    --yunshu-side-w: 248px;
    --yunshu-header-h: 88px;
  }

  .app-shell:not(.hidden) {
    grid-template-columns: var(--yunshu-side-w) minmax(0, 1fr) !important;
    grid-template-rows: var(--yunshu-header-h) minmax(0, 1fr) !important;
  }

  .global-command-header {
    height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    grid-template-columns: var(--yunshu-side-w) minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .global-command-header .brand {
    width: var(--yunshu-side-w) !important;
    height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    padding: 0 14px !important;
  }

  .global-command-header .brand .mark {
    width: 50px !important;
    height: 50px !important;
    flex: 0 0 50px !important;
  }

  .global-command-header .brand h1 {
    font-size: 23px !important;
  }

  .global-command-header .brand p {
    display: none !important;
  }

  .global-command-header .topbar {
    height: var(--yunshu-header-h) !important;
    min-height: var(--yunshu-header-h) !important;
    max-height: var(--yunshu-header-h) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 18px 0 20px !important;
    gap: 0 !important;
    overflow: hidden !important;
  }

  .global-command-header .title-block {
    display: none !important;
  }

  .global-command-header .top-actions {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    max-height: 40px !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    overflow: hidden !important;
  }

  .global-command-header .sync-status-strip,
  .global-command-header .action-buttons,
  .global-command-header .session-strip {
    position: static !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: 40px !important;
    max-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: hidden !important;
    transform: none !important;
  }

  .global-command-header .sync-status-strip {
    flex: 0 1 auto !important;
    max-width: min(760px, 58vw) !important;
  }

  .global-command-header .action-buttons,
  .global-command-header .session-strip {
    flex: 0 0 auto !important;
  }

  .global-command-header .sync-status-strip .sync-store-count,
  .global-command-header .sync-status-strip .sync-time-pill,
  .global-command-header .action-buttons #shareBtn,
  .global-command-header .action-buttons #topReloadBtn,
  .global-command-header .session-strip span,
  .global-command-header .session-strip button {
    height: 38px !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(142, 244, 216, .22) !important;
    border-radius: 999px !important;
    background: rgba(5, 24, 22, .78) !important;
    box-shadow: none !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex: 0 0 116px !important;
    width: 116px !important;
    max-width: 116px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
    overflow: hidden !important;
    color: rgba(238, 255, 249, .88) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill {
    flex: 0 1 112px !important;
    width: 112px !important;
    max-width: 112px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 9px !important;
    overflow: hidden !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill small,
  .global-command-header .sync-status-strip .sync-time-pill strong {
    width: 100% !important;
    display: block !important;
    overflow: hidden !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.05 !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill small {
    color: rgba(142, 244, 216, .78) !important;
    font-size: 10px !important;
    font-weight: 900 !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill strong {
    margin-top: 2px !important;
    color: #f8fffc !important;
    font-size: 11px !important;
    font-weight: 950 !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill.stale {
    border-color: rgba(240, 191, 91, .48) !important;
    background: rgba(45, 34, 12, .76) !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill.stale strong {
    color: #f0bf5b !important;
  }

  .global-command-header .sync-legacy,
  .global-command-header .action-buttons .top-link,
  .global-command-header .action-buttons .admin-only,
  .global-command-header .session-strip #topChangePasswordBtn {
    display: none !important;
  }

  .global-command-header .action-buttons #shareBtn,
  .global-command-header .action-buttons #topReloadBtn {
    width: auto !important;
    max-width: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 14px !important;
    color: #effff9 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
  }

  .global-command-header .action-buttons #topReloadBtn {
    min-width: 92px !important;
    border-color: transparent !important;
    color: #061512 !important;
    background: linear-gradient(135deg, #8ef4d8, #c9fff1) !important;
  }

  .global-command-header .session-strip span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    max-width: 132px !important;
    padding: 0 11px !important;
    overflow: hidden !important;
  }

  .global-command-header .session-strip span:first-child {
    max-width: 76px !important;
  }

  .global-command-header .session-strip small {
    display: inline !important;
    color: rgba(142, 244, 216, .76) !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
  }

  .global-command-header .session-strip strong {
    min-width: 0 !important;
    max-width: 100% !important;
    display: block !important;
    overflow: hidden !important;
    color: #f6fffb !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .global-command-header .session-strip #topLogoutBtn {
    width: 52px !important;
    min-width: 52px !important;
    padding: 0 !important;
    border-color: transparent !important;
    color: #061512 !important;
    background: #c9fff1 !important;
    font-size: 12px !important;
    font-weight: 950 !important;
  }

  .app-shell .side,
  .app-shell .main {
    height: calc(100vh - var(--yunshu-header-h)) !important;
    max-height: calc(100vh - var(--yunshu-header-h)) !important;
  }
}

@media (min-width: 1181px) and (max-width: 1540px) {
  .global-command-header .topbar {
    padding-right: 12px !important;
  }

  .global-command-header .top-actions {
    gap: 5px !important;
  }

  .global-command-header .sync-status-strip {
    max-width: min(600px, 52vw) !important;
    gap: 4px !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex-basis: 92px !important;
    width: 92px !important;
    max-width: 92px !important;
    padding-inline: 8px !important;
    font-size: 11px !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill {
    flex-basis: 94px !important;
    width: 94px !important;
    max-width: 94px !important;
    padding-inline: 7px !important;
  }

  .global-command-header .action-buttons #shareBtn,
  .global-command-header .action-buttons #topReloadBtn {
    padding-inline: 11px !important;
  }

  .global-command-header .session-strip span:nth-child(2) {
    max-width: 112px !important;
  }
}

/* V25: keep the command strip fully visible; first sync chip must not crop text. */
@media (min-width: 1181px) {
  .global-command-header .topbar {
    display: flex !important;
    justify-content: flex-end !important;
    padding: 0 18px 0 12px !important;
  }

  .global-command-header .top-actions {
    width: 100% !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .global-command-header .sync-status-strip {
    flex: 0 1 auto !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    max-width: none !important;
    overflow: visible !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex: 0 0 142px !important;
    width: 142px !important;
    max-width: 142px !important;
    justify-content: center !important;
    padding: 0 12px !important;
    text-align: center !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill {
    flex: 0 0 112px !important;
    width: 112px !important;
    max-width: 112px !important;
  }
}

@media (min-width: 1181px) and (max-width: 1540px) {
  .global-command-header .top-actions {
    gap: 5px !important;
  }

  .global-command-header .sync-status-strip {
    gap: 4px !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex-basis: 128px !important;
    width: 128px !important;
    max-width: 128px !important;
    font-size: 10px !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill {
    flex-basis: 96px !important;
    width: 96px !important;
    max-width: 96px !important;
  }
}

/* V26: one-line command strip. Prevent the first data chip from sliding under the brand area. */
@media (min-width: 1181px) {
  .global-command-header {
    overflow: visible !important;
  }

  .global-command-header .topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 20px 0 270px !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .global-command-header .title-block {
    display: none !important;
  }

  .global-command-header .top-actions {
    width: auto !important;
    max-width: calc(100vw - 300px) !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .global-command-header .sync-status-strip {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex: 0 0 134px !important;
    width: 134px !important;
    max-width: 134px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill {
    flex: 0 0 112px !important;
    width: 112px !important;
    max-width: 112px !important;
    min-height: 34px !important;
    padding: 5px 8px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .global-command-header .sync-time-pill small {
    font-size: 9px !important;
  }

  .global-command-header .sync-time-pill strong {
    font-size: 11px !important;
  }
}

@media (min-width: 1181px) and (max-width: 1480px) {
  .global-command-header .topbar {
    padding-left: 255px !important;
    padding-right: 14px !important;
  }

  .global-command-header .top-actions {
    gap: 5px !important;
    max-width: calc(100vw - 275px) !important;
  }

  .global-command-header .sync-status-strip {
    gap: 4px !important;
  }

  .global-command-header .sync-status-strip .sync-store-count {
    flex-basis: 118px !important;
    width: 118px !important;
    max-width: 118px !important;
    font-size: 10px !important;
  }

  .global-command-header .sync-status-strip .sync-time-pill {
    flex-basis: 96px !important;
    width: 96px !important;
    max-width: 96px !important;
  }

  .global-command-header .sync-time-pill small {
    font-size: 8px !important;
  }

  .global-command-header .sync-time-pill strong {
    font-size: 10px !important;
  }
}

/* V29: international-card recovery package. Keep audit result and recovery action in one row without nested-button conflicts. */
.app-shell .international-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.app-shell .international-kpis article {
  min-width: 0 !important;
}

.app-shell .international-kpis .recovered strong {
  color: #8ef4d8 !important;
}

.app-shell .international-kpis .pending strong {
  color: #ffd66b !important;
}

.app-shell .intl-store-row {
  grid-template-columns: 36px minmax(0, 1fr) minmax(76px, auto) minmax(92px, auto) !important;
  cursor: pointer !important;
}

.app-shell .intl-store-row.pending {
  background: linear-gradient(90deg, rgba(255, 214, 107, .08), rgba(5, 15, 14, .16)) !important;
}

.app-shell .intl-store-row.recovered {
  background: linear-gradient(90deg, rgba(142, 244, 216, .08), rgba(5, 15, 14, .16)) !important;
}

.app-shell .intl-recovery-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 92px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(255, 214, 107, .42) !important;
  border-radius: 999px !important;
  color: #201804 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  background: linear-gradient(135deg, #ffd66b, #e9c965) !important;
  cursor: pointer !important;
}

.app-shell .intl-recovery-toggle.done {
  border-color: rgba(142, 244, 216, .52) !important;
  color: #031512 !important;
  background: linear-gradient(135deg, #8ef4d8, #bff4e9) !important;
}

.app-shell .intl-recovery-toggle:disabled {
  opacity: .72 !important;
  cursor: wait !important;
}

@media (max-width: 1500px) {
  .app-shell .international-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .app-shell .intl-store-row {
    grid-template-columns: 34px minmax(0, 1fr) minmax(64px, auto) !important;
  }

  .app-shell .intl-recovery-toggle {
    grid-column: 2 / -1 !important;
    justify-self: start !important;
    margin-top: 4px !important;
  }
}

/* V120: frontend-design self-evolution pass.
   Goal: one stable command header, readable action matrix, no clipped chips. */
@media (min-width: 1181px) {
  :root {
    --yunshu-side-width: 260px;
    --yunshu-header-height: 96px;
    --yunshu-main-gap: 18px;
  }

  body:has(.app-shell:not(.hidden)) {
    overflow: hidden !important;
  }

  .app-shell:not(.hidden) {
    display: grid !important;
    grid-template-columns: var(--yunshu-side-width) minmax(0, 1fr) !important;
    grid-template-rows: var(--yunshu-header-height) minmax(0, 1fr) !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
  }

  .global-command-header {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: var(--yunshu-side-width) minmax(0, 1fr) !important;
    width: 100% !important;
    height: var(--yunshu-header-height) !important;
    min-height: var(--yunshu-header-height) !important;
    max-height: var(--yunshu-header-height) !important;
    padding: 0 !important;
    overflow: visible !important;
    z-index: 80 !important;
    border-bottom: 1px solid rgba(135, 255, 225, .16) !important;
    background:
      linear-gradient(90deg, rgba(1, 12, 11, .98) 0%, rgba(1, 14, 13, .96) 48%, rgba(1, 12, 11, .98) 100%) !important;
  }

  .global-command-header .brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    height: var(--yunshu-header-height) !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border-right: 1px solid rgba(135, 255, 225, .15) !important;
  }

  .global-command-header .brand img {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 auto !important;
  }

  .global-command-header .brand h1 {
    font-size: 23px !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  .global-command-header .brand span {
    font-size: 11px !important;
    line-height: 1.1 !important;
    letter-spacing: .03em !important;
    white-space: nowrap !important;
  }

  .global-command-header .topbar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: var(--yunshu-header-height) !important;
    padding: 0 20px 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    overflow: visible !important;
  }

  .global-command-header .title-block {
    display: none !important;
  }

  .global-command-header .top-actions {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    padding-left: 12px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scrollbar-width: none !important;
  }

  .global-command-header .top-actions::-webkit-scrollbar {
    display: none !important;
  }

  .global-command-header .sync-status-strip,
  .global-command-header .action-buttons,
  .global-command-header .session-strip {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    flex: 0 0 auto !important;
    min-width: max-content !important;
    max-width: none !important;
  }

  .global-command-header .sync-status-strip {
    order: 1 !important;
  }

  .global-command-header .action-buttons {
    order: 2 !important;
  }

  .global-command-header .session-strip {
    order: 3 !important;
  }

  .global-command-header .sync-store-count,
  .global-command-header .sync-time-pill,
  .global-command-header .top-actions button,
  .global-command-header .session-strip span,
  .global-command-header .session-strip button {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
  }

  .global-command-header .sync-store-count {
    min-width: 132px !important;
    max-width: 146px !important;
    padding: 0 14px !important;
    justify-content: center !important;
  }

  .global-command-header .sync-time-pill {
    min-width: 118px !important;
    max-width: 132px !important;
    padding: 0 12px !important;
    justify-content: center !important;
  }

  .global-command-header .sync-time-pill span,
  .global-command-header .sync-store-count span {
    font-size: 10px !important;
    line-height: 1.05 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .global-command-header .sync-time-pill strong,
  .global-command-header .sync-store-count strong {
    font-size: 13px !important;
    line-height: 1.05 !important;
  }

  .global-command-header #topReloadBtn,
  .global-command-header #shareBtn,
  .global-command-header .top-actions button[data-page-target="international"] {
    min-width: 92px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  .global-command-header #topSessionUser {
    min-width: 76px !important;
    max-width: 96px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .global-command-header #topSessionRole {
    min-width: 128px !important;
    max-width: 172px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .global-command-header #topChangePasswordBtn {
    min-width: 70px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
  }

  .global-command-header #topLogoutBtn {
    min-width: 56px !important;
    width: 56px !important;
    padding: 0 !important;
    font-size: 14px !important;
  }

  .app-shell .side {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: var(--yunshu-side-width) !important;
    height: calc(100vh - var(--yunshu-header-height)) !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 14px 12px 22px !important;
  }

  .app-shell .main {
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    height: calc(100vh - var(--yunshu-header-height)) !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 18px 22px 34px !important;
    scroll-padding-top: 18px !important;
  }

  .side .rail-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .side .rail-stats article {
    min-width: 0 !important;
    padding: 10px 8px !important;
  }

  .side .rail-stats strong {
    font-size: 24px !important;
    line-height: 1 !important;
  }

  .side-supply-nav {
    display: none !important;
  }

  body[data-hub-mode="supply"] .side-supply-nav {
    display: grid !important;
    gap: 6px !important;
    margin-top: 10px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-hub-mode="supply"] .side-supply-nav .supply-side-heading {
    display: none !important;
  }

  body[data-hub-mode="supply"] .side-supply-nav button {
    min-height: 42px !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    justify-content: flex-start !important;
    background: rgba(3, 21, 18, .86) !important;
  }
}

@media (min-width: 1181px) and (max-width: 1540px) {
  :root {
    --yunshu-side-width: 238px;
  }

  .global-command-header .brand {
    padding: 0 12px !important;
  }

  .global-command-header .brand img {
    width: 50px !important;
    height: 50px !important;
  }

  .global-command-header .brand h1 {
    font-size: 20px !important;
  }

  .global-command-header .brand span {
    display: none !important;
  }

  .global-command-header .topbar {
    padding-right: 14px !important;
    padding-left: 12px !important;
  }

  .global-command-header .top-actions {
    gap: 6px !important;
  }

  .global-command-header .sync-store-count {
    min-width: 116px !important;
    max-width: 126px !important;
  }

  .global-command-header .sync-time-pill {
    min-width: 106px !important;
    max-width: 116px !important;
  }

  .global-command-header #topReloadBtn,
  .global-command-header #shareBtn,
  .global-command-header .top-actions button[data-page-target="international"] {
    min-width: 76px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .global-command-header #topSessionRole {
    min-width: 112px !important;
    max-width: 138px !important;
  }
}

/* V121: action recovery matrix. Keep the page scrollable and the matrix usable. */
body[data-hub-mode="actions"] .app-shell .main {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body[data-hub-mode="actions"] .role-action-center {
  width: 100% !important;
  max-width: 1740px !important;
  margin: 0 auto 34px !important;
  padding: 18px !important;
  display: grid !important;
  gap: 16px !important;
  overflow: visible !important;
}

body[data-hub-mode="actions"] .role-action-head {
  min-height: 112px !important;
  padding: 18px 20px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
}

body[data-hub-mode="actions"] .role-action-head p,
body[data-hub-mode="actions"] .role-action-head h2 {
  max-width: none !important;
}

body[data-hub-mode="actions"] .role-action-head > strong {
  position: static !important;
  justify-self: end !important;
  align-self: start !important;
  max-width: 360px !important;
  padding: 8px 14px !important;
  text-align: right !important;
}

body[data-hub-mode="actions"] .role-action-layout {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start !important;
  overflow: visible !important;
}

body[data-hub-mode="actions"] .role-action-score,
body[data-hub-mode="actions"] .role-action-workbench,
body[data-hub-mode="actions"] .role-action-rules {
  min-width: 0 !important;
  border-radius: 12px !important;
}

body[data-hub-mode="actions"] .role-action-score {
  position: sticky !important;
  top: 16px !important;
  min-height: auto !important;
  padding: 18px !important;
}

body[data-hub-mode="actions"] .role-action-rules {
  grid-column: 1 / -1 !important;
  min-height: auto !important;
  padding: 14px 16px !important;
}

body[data-hub-mode="actions"] .role-action-rules h3 {
  margin: 0 0 8px !important;
}

body[data-hub-mode="actions"] .role-action-rules .rule-card {
  padding: 10px 12px !important;
}

body[data-hub-mode="actions"] .role-action-rules .rule-card + .rule-card {
  margin-top: 8px !important;
}

body[data-hub-mode="actions"] .role-action-workbench {
  overflow: hidden !important;
  padding: 18px !important;
}

body[data-hub-mode="actions"] #roleActionFilter {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
}

body[data-hub-mode="actions"] #roleActionSearchInput {
  width: 100% !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  line-height: 42px !important;
  font-family: inherit !important;
  color: #f5fffb !important;
  ime-mode: auto !important;
}

body[data-hub-mode="actions"] #roleActionFilter .filter-pills {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: flex-end !important;
}

body[data-hub-mode="actions"] #roleActionList {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding-bottom: 8px !important;
}

body[data-hub-mode="actions"] .action-matrix-table {
  min-width: 1080px !important;
  width: 100% !important;
  display: grid !important;
  gap: 10px !important;
}

body[data-hub-mode="actions"] .action-matrix-head,
body[data-hub-mode="actions"] .action-matrix-row {
  display: grid !important;
  grid-template-columns: minmax(230px, .95fr) repeat(3, minmax(188px, 1fr)) 88px !important;
  gap: 10px !important;
  align-items: stretch !important;
}

body[data-hub-mode="actions"] .action-matrix-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  padding: 8px 10px !important;
  background: rgba(1, 15, 13, .94) !important;
  border: 1px solid rgba(135, 255, 225, .18) !important;
  border-radius: 10px !important;
}

body[data-hub-mode="actions"] .action-matrix-row {
  padding: 10px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(5, 24, 20, .86), rgba(3, 16, 14, .96)) !important;
  border: 1px solid rgba(135, 255, 225, .17) !important;
}

body[data-hub-mode="actions"] .matrix-store,
body[data-hub-mode="actions"] .matrix-cell,
body[data-hub-mode="actions"] .matrix-score {
  min-height: 116px !important;
  padding: 12px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

body[data-hub-mode="actions"] .matrix-store strong,
body[data-hub-mode="actions"] .matrix-cell strong {
  font-size: 15px !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

body[data-hub-mode="actions"] .matrix-store small,
body[data-hub-mode="actions"] .matrix-cell small,
body[data-hub-mode="actions"] .matrix-cell p {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

body[data-hub-mode="actions"] .matrix-toggle {
  width: 70px !important;
  min-width: 70px !important;
  height: 32px !important;
  padding: 0 7px !important;
}

body[data-hub-mode="actions"] .matrix-toggle::before {
  width: 24px !important;
  height: 24px !important;
}

body[data-hub-mode="actions"] .matrix-toggle.on::before {
  transform: translateX(34px) !important;
}

body[data-hub-mode="actions"] .matrix-evidence-box {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 8px !important;
}

body[data-hub-mode="actions"] .matrix-evidence-box button {
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
}

body[data-hub-mode="actions"] .matrix-evidence-preview {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  min-height: 34px !important;
  max-width: 100% !important;
}

body[data-hub-mode="actions"] .matrix-evidence-preview img {
  width: 44px !important;
  height: 34px !important;
  object-fit: cover !important;
  border-radius: 6px !important;
  cursor: zoom-in !important;
}

body[data-hub-mode="actions"] .matrix-score {
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
}

body[data-hub-mode="actions"] .matrix-score strong {
  font-size: 34px !important;
  line-height: 1 !important;
}

body[data-hub-mode="actions"] #roleActionResult {
  min-height: 22px !important;
  padding-top: 4px !important;
}

@media (max-width: 1500px) {
  body[data-hub-mode="actions"] .role-action-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-hub-mode="actions"] .role-action-score {
    position: static !important;
    display: grid !important;
    grid-template-columns: minmax(180px, 1fr) auto !important;
    gap: 14px !important;
  }

  body[data-hub-mode="actions"] .action-matrix-table {
    min-width: 1020px !important;
  }
}

@media (max-width: 1180px) {
  html,
  body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .app-shell:not(.hidden) {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  .global-command-header {
    position: sticky !important;
    top: 0 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding: 10px 12px !important;
    display: grid !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  .global-command-header .brand {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
  }

  .global-command-header .topbar {
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .global-command-header .title-block {
    display: none !important;
  }

  .global-command-header .top-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .global-command-header .sync-status-strip,
  .global-command-header .action-buttons,
  .global-command-header .session-strip {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .app-shell .side,
  .app-shell .main {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  body[data-hub-mode="actions"] .role-action-center {
    padding: 12px !important;
  }

  body[data-hub-mode="actions"] .role-action-head,
  body[data-hub-mode="actions"] .role-action-layout,
  body[data-hub-mode="actions"] #roleActionFilter {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-hub-mode="actions"] .role-action-head > strong,
  body[data-hub-mode="actions"] #roleActionFilter .filter-pills {
    justify-self: start !important;
    text-align: left !important;
  }
}

/* V122: action recovery becomes a full-width command table. */
body[data-hub-mode="actions"] .role-action-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

body[data-hub-mode="actions"] .role-action-score {
  position: static !important;
  top: auto !important;
  display: grid !important;
  grid-template-columns: minmax(220px, .75fr) minmax(520px, 1.35fr) minmax(300px, .9fr) !important;
  gap: 12px 18px !important;
  align-items: center !important;
  min-height: 112px !important;
  padding: 16px 18px !important;
}

body[data-hub-mode="actions"] .role-action-score > span,
body[data-hub-mode="actions"] .role-action-score > strong,
body[data-hub-mode="actions"] .role-action-score > p {
  grid-column: 1 !important;
}

body[data-hub-mode="actions"] .role-action-score > span {
  margin: 0 !important;
  color: rgba(142, 244, 216, .76) !important;
  font-size: 12px !important;
}

body[data-hub-mode="actions"] .role-action-score > strong {
  margin: 0 !important;
  font-size: clamp(28px, 2.1vw, 38px) !important;
  line-height: 1.05 !important;
}

body[data-hub-mode="actions"] .role-action-score > p {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: rgba(226, 248, 242, .75) !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid {
  grid-column: 2 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid b {
  min-height: 62px !important;
  padding: 10px 12px !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid em {
  font-size: 25px !important;
}

body[data-hub-mode="actions"] .role-action-score #roleActionLedgerState,
body[data-hub-mode="actions"] .role-action-score .role-action-meter,
body[data-hub-mode="actions"] .role-action-score #roleActionProgressText {
  grid-column: 3 !important;
}

body[data-hub-mode="actions"] .role-action-score #roleActionLedgerState {
  align-self: end !important;
}

body[data-hub-mode="actions"] .role-action-score .role-action-meter {
  width: 100% !important;
  margin: 0 !important;
}

body[data-hub-mode="actions"] .role-action-score #roleActionProgressText {
  align-self: start !important;
  font-size: 13px !important;
}

body[data-hub-mode="actions"] .role-action-workbench {
  width: 100% !important;
}

body[data-hub-mode="actions"] #roleActionFilter {
  grid-template-columns: minmax(320px, 1fr) minmax(0, auto) !important;
  align-items: center !important;
}

body[data-hub-mode="actions"] #roleActionFilter .matrix-search {
  min-width: 0 !important;
}

body[data-hub-mode="actions"] #roleActionFilter .filter-pills {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 8px !important;
}

body[data-hub-mode="actions"] #roleActionFilter .filter-pills button {
  min-width: 76px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
}

body[data-hub-mode="actions"] .action-matrix-table {
  min-width: 1120px !important;
}

body[data-hub-mode="actions"] .role-action-rules {
  opacity: .92 !important;
}

@media (max-width: 1420px) {
  body[data-hub-mode="actions"] .role-action-score {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-hub-mode="actions"] .role-action-score > span,
  body[data-hub-mode="actions"] .role-action-score > strong,
  body[data-hub-mode="actions"] .role-action-score > p,
  body[data-hub-mode="actions"] .role-action-score .role-action-stat-grid,
  body[data-hub-mode="actions"] .role-action-score #roleActionLedgerState,
  body[data-hub-mode="actions"] .role-action-score .role-action-meter,
  body[data-hub-mode="actions"] .role-action-score #roleActionProgressText {
    grid-column: 1 !important;
  }

  body[data-hub-mode="actions"] #roleActionFilter {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-hub-mode="actions"] #roleActionFilter .filter-pills {
    justify-content: flex-start !important;
  }
}

/* V123: supply sub-navigation is embedded under the left supply item. */
.system-rail .side-supply-nav {
  display: none !important;
  grid-column: 1 / -1 !important;
  gap: 6px !important;
  margin: -2px 0 2px 44px !important;
  padding: 0 0 2px !important;
}

body[data-hub-mode="supply"] .system-rail .side-supply-nav {
  display: grid !important;
}

.system-rail .side-supply-nav button {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-align: left !important;
  color: rgba(226, 248, 242, .72) !important;
  background: rgba(3, 21, 18, .64) !important;
  border: 1px solid rgba(135, 255, 225, .14) !important;
}

.system-rail .side-supply-nav button.active,
.system-rail .side-supply-nav button:hover {
  color: #031612 !important;
  border-color: rgba(142, 244, 216, .58) !important;
  background: linear-gradient(135deg, rgba(142, 244, 216, .96), rgba(232, 220, 105, .9)) !important;
}
