/*
 * Legacy mockup-fidelity layer (Issue #82). Integration rule: rules may only be moved to
 * their owner module or deleted; nothing new is added here. Storefront navigation, homepage,
 * catalog, product card, footer and shared controls now live in their owners (see
 * docs/agents/css-routing.md). What remains is legacy administration geometry.
 */

/* Unreferenced storefront pages inherit the completed homepage language. */
.storefront-surface:not(.moonarrow-site) .site-main {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: 30px var(--moonarrow-fidelity-page-gutter) 52px;
}

.storefront-surface .page-section {
  margin-bottom: 32px;
}

.storefront-surface :is(.account-panel, .legal-card, .member-panel, .order-panel) {
  background: #fff;
  border: 1px solid var(--moonarrow-fidelity-line);
  border-radius: 4px;
  box-shadow: none;
}

.storefront-surface .legal-card h2 {
  color: var(--moonarrow-color-brand-ink);
  font-weight: 710;
}

.storefront-surface .account-shell {
  gap: 0;
  max-width: 1080px;
  margin-inline: auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--moonarrow-fidelity-line);
  border-radius: 4px;
  box-shadow: none;
}

.storefront-surface .account-panel {
  padding: clamp(28px, 5vw, 56px);
  border: 0;
  border-radius: 0;
}

.storefront-surface :is(.data-table, .cart-table) {
  background: #fff;
  border-color: var(--moonarrow-fidelity-line);
  border-radius: 3px;
  box-shadow: none;
}

.storefront-surface :is(.data-table, .cart-table) thead {
  color: #26354a;
  background: var(--moonarrow-color-daylight-soft);
}

.storefront-surface :is(.data-table, .cart-table) th {
  border-color: var(--moonarrow-fidelity-line);
  font-size: 13px;
  font-weight: 650;
}

.storefront-surface :is(.data-table, .cart-table) td {
  border-color: #e2e7ed;
  font-size: 14px;
}

.storefront-surface .table-action-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #fff;
  background: var(--moonarrow-fidelity-blue);
  border: 1px solid var(--moonarrow-fidelity-blue);
  border-radius: 3px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.storefront-surface :is(.friendly-error-page, .newebpay-transfer-page .store-empty-state) {
  width: 100%;
  max-width: 920px;
  min-height: 320px;
  margin: 36px auto 72px;
  padding: 48px;
  color: #223047;
  background: linear-gradient(105deg, #fff, var(--moonarrow-color-daylight-soft));
  border: 1px solid var(--moonarrow-fidelity-line);
  border-radius: 4px;
  box-shadow: none;
  text-align: center;
}

.storefront-surface .friendly-error-page .action-row,
.storefront-surface .newebpay-transfer-page .store-empty-state form,
.storefront-surface .newebpay-transfer-page .store-map-return-actions {
  justify-content: center;
}

@media (max-width: 767.98px) {
  .storefront-surface:not(.moonarrow-site) .site-main {
    padding: 20px 16px 36px;
  }

  .storefront-surface .account-shell {
    grid-template-columns: 1fr;
  }

  .storefront-surface .account-panel {
    padding: 26px 20px;
  }

  .storefront-surface :is(.friendly-error-page, .newebpay-transfer-page .store-empty-state) {
    min-height: 0;
    margin: 0 auto 36px;
    padding: 36px 20px;
  }
}

/* Administration reference canvas --------------------------------------- */
.admin-surface {
  color: #172235;
  background: #fff;
}

.admin-surface .site-utility-bar {
  display: block;
  height: 49px;
  min-height: 49px;
  color: #26344a;
  background: #fbfcfe;
  border-bottom: 1px solid #dce3eb;
  font-size: 14px;
}

.admin-surface .site-utility-bar > .container-xl {
  width: 100%;
  max-width: none;
  height: 49px;
  padding-inline: 29px;
}

.admin-surface .site-utility-bar > .container-xl > span:first-child {
  color: #26344a;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.admin-surface .site-utility-bar a {
  color: var(--moonarrow-fidelity-blue);
  font-weight: 650;
}

.admin-surface .site-navigation {
  min-height: var(--moonarrow-navigation-height);
  height: var(--moonarrow-navigation-height);
  background: #fff;
  border-bottom: 1px solid #dce3eb;
  box-shadow: none;
}

.admin-surface .site-navigation > .container-xl {
  min-height: var(--moonarrow-navigation-height);
  height: var(--moonarrow-navigation-height);
  padding-inline: 29px;
}

.admin-surface .site-navigation .site-brand {
  min-width: 96px;
  min-height: 64px;
  margin-right: var(--moonarrow-navigation-brand-gap);
}

.admin-surface .site-navigation-links {
  height: var(--moonarrow-navigation-height);
  gap: var(--moonarrow-navigation-item-gap);
}

.admin-surface .site-navigation .nav-link,
.admin-surface .site-navigation .nav-button {
  min-height: var(--moonarrow-navigation-item-height);
  padding: 0 0.48rem !important;
  color: #223047;
  font-size: var(--moonarrow-navigation-link-size);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.admin-surface .site-navigation .nav-link::after,
.admin-surface .site-navigation .nav-button::after {
  right: 0.48rem;
  left: 0.48rem;
}

.admin-surface .site-navigation .site-nav-actions {
  height: var(--moonarrow-navigation-height);
  margin-left: clamp(0.75rem, 1.5vw, 1.5rem);
}

.admin-surface .site-navigation .site-nav-action {
  min-height: var(--moonarrow-navigation-item-height);
  color: #314056 !important;
}

.admin-surface .site-main {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.admin-surface .page-section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 29px 38px;
  overflow: visible;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-surface .page-heading {
  min-height: 44px;
  align-items: center;
  gap: 41px;
  margin: 0 0 31px;
  padding: 0;
  border: 0;
}

.admin-surface .page-heading::before,
.admin-surface .page-heading::after {
  display: none;
}

/* The h1 also renders the MOON ARROW ADMIN eyebrow as a block ::before, so a fixed 40px
   box cannot hold eyebrow + title: the title spilled onto the description below it. */
.admin-surface .page-heading h1 {
  margin: 0;
  color: #14233a;
  font-size: 32px;
  font-weight: 720;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
}

/* Chinese glyphs fill about 1.46em, more than the 1.25 line box, so the title needs
   a real step above the description at every width — not only on phones. */
.admin-surface .page-heading > div > p {
  margin-top: 8px;
}

.admin-surface .admin-order-page .page-heading {
  justify-content: flex-start;
}

.admin-surface .admin-order-page .page-heading .btn {
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0 15px;
  color: #29415f;
  background: #fff;
  border: 1px solid #ccd7e3;
  border-radius: 4px;
  box-shadow: none;
  font-size: 13px;
}

.admin-surface .admin-order-mail-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-surface .admin-order-mail-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--moonarrow-fidelity-blue);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-surface .admin-order-queues,
.admin-surface .admin-management-tabs {
  display: flex;
  min-height: 58px;
  align-items: end;
  gap: clamp(1.5rem, 5vw, 5rem);
  margin: 0 0 28px;
  padding: 0;
  overflow-x: auto;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #cfd8e3;
}

.admin-surface .admin-order-queues a,
.admin-surface .admin-management-tab {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  padding: 0 20px;
  color: #27354a;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.admin-surface .admin-order-queues a:first-child,
.admin-surface .admin-management-tab:first-child {
  padding-left: 20px;
}

.admin-surface .admin-order-queues a:hover,
.admin-surface .admin-order-queues a:focus-visible,
.admin-surface .admin-order-queues a.is-active,
.admin-surface .admin-management-tab:hover,
.admin-surface .admin-management-tab:focus-visible,
.admin-surface .admin-management-tab.is-active {
  color: var(--moonarrow-fidelity-blue);
  background: transparent;
  border-bottom-color: var(--moonarrow-fidelity-blue);
}

.admin-surface .admin-newebpay-callback-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 15px;
  min-height: 76px;
  align-items: center;
  margin: 0 0 24px;
  padding: 14px 18px;
  color: #5a4823;
  background: #fffbf1;
  border: 1px solid #e9c567;
  border-radius: 5px;
  box-shadow: none;
}

.admin-surface .admin-order-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 130px 110px;
  gap: 12px;
  min-height: 52px;
  align-items: stretch;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-surface .admin-order-keyword {
  position: relative;
  min-height: 52px;
}

.admin-surface .admin-order-search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #42536b;
  stroke-width: 1.7;
  stroke-linecap: round;
  transform: translateY(-50%);
  pointer-events: none;
}

.admin-surface .admin-order-keyword input {
  width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 0 16px 0 48px;
  color: #223047;
  background: #fff;
  border: 1px solid #cad5e1;
  border-radius: 4px;
  box-shadow: none;
  font-size: 14px;
}

.admin-surface .admin-order-search > .btn,
.admin-surface .admin-order-search > [data-auto-search-submit] {
  display: inline-flex !important;
  width: 110px !important;
  height: 52px !important;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: #fff;
  background: var(--moonarrow-fidelity-blue);
  border: 1px solid var(--moonarrow-fidelity-blue);
  border-radius: 4px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}

.admin-surface .admin-order-search-note {
  margin: 13px 0 20px;
  color: #5b6776;
  font-size: 12px;
  line-height: 1.5;
}

.admin-surface .data-table,
.admin-surface .admin-order-table {
  width: 100%;
  table-layout: fixed;
  overflow: hidden;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 3px;
  box-shadow: none;
}

.admin-surface .data-table.admin-card-table {
  border-radius: 3px !important;
}

.admin-surface .search-form {
  background: #fff;
  border: 1px solid var(--moonarrow-fidelity-line);
  border-radius: 4px !important;
  box-shadow: none;
}

.admin-surface :is(.stacked-form, .product-form, .home-setting-form) {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0 !important;
  box-shadow: none;
}

.admin-surface :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea) {
  min-height: 48px;
  color: #26354a;
  background: #fff;
  border: 1px solid #cdd7e2;
  border-radius: 3px !important;
  box-shadow: none;
  font-size: 14px;
}

.admin-surface :is(input, select, textarea):focus {
  border-color: #c9a06a;
  box-shadow: 0 0 0 3px rgba(189, 145, 87, 0.16);
}

.admin-surface .btn {
  min-height: 44px;
  border-radius: 3px !important;
  box-shadow: none;
  font-size: 14px;
  font-weight: 680;
}

.admin-surface .btn-primary {
  color: #fff;
  background: var(--moonarrow-fidelity-blue);
  border-color: var(--moonarrow-fidelity-blue);
}

.admin-surface :is(.btn-secondary, .btn-outline-primary) {
  color: var(--moonarrow-fidelity-blue);
  background: #fff;
  border-color: #a9bdd3;
}

.moonarrow-image-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #758397;
  background: #f3f6f9;
  border: 1px dashed #c8d3df;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.news-admin-cover-preview .moonarrow-image-fallback {
  width: 100%;
  min-height: 180px;
  padding: 20px;
}

.home-image-card > .moonarrow-image-fallback {
  width: 100%;
  min-height: 173px;
  padding: 16px;
}

.admin-surface.controller-shippingsetting .page-heading {
  max-width: 780px;
  justify-content: flex-start;
}

.admin-surface .data-table thead,
.admin-surface .admin-order-table thead {
  color: #223047;
  background: #f7f9fc;
}

.admin-surface .data-table th,
.admin-surface .admin-order-table th {
  height: 49px;
  padding: 0 20px;
  color: #223047;
  background: #f7f9fc;
  border: 0;
  border-bottom: 1px solid #cfd8e3;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  text-align: left;
}

.admin-surface .admin-order-table th:nth-child(1),
.admin-surface .admin-order-table td:nth-child(1) { width: 18%; }
.admin-surface .admin-order-table th:nth-child(2),
.admin-surface .admin-order-table td:nth-child(2) { width: 23%; }
.admin-surface .admin-order-table th:nth-child(3),
.admin-surface .admin-order-table td:nth-child(3) { width: 14%; }
.admin-surface .admin-order-table th:nth-child(4),
.admin-surface .admin-order-table td:nth-child(4) { width: 15%; }
.admin-surface .admin-order-table th:nth-child(5),
.admin-surface .admin-order-table td:nth-child(5) { width: 14%; }
.admin-surface .admin-order-table th:nth-child(6),
.admin-surface .admin-order-table td:nth-child(6) { width: 16%; }

.admin-surface .data-table td,
.admin-surface .admin-order-table td {
  height: 76px;
  padding: 8px 20px;
  color: #27364a;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #dce3ea;
  font-size: 14px;
  line-height: 1.45;
  vertical-align: middle;
}

.admin-surface .admin-order-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-surface .admin-order-table td > strong {
  color: #173c73;
  font-size: 14px;
  font-weight: 700;
}

.admin-surface .admin-order-table td > small {
  margin-top: 3px;
  color: #6d7b8e;
  font-size: 12px;
}

.admin-surface .admin-order-state-stack {
  gap: 5px;
}

.admin-surface .order-state {
  font-size: 12px;
}

.admin-surface .admin-order-work-tag,
.admin-surface .admin-shipment-attention-tag {
  border-radius: 3px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.admin-surface .table-action-link,
.admin-surface .table-action-button {
  display: inline-flex;
  min-width: 102px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: #0756b5;
  background: #fff;
  border: 1px solid #c7d3df;
  border-radius: 4px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

/* This generic colour is more specific than .table-action-danger in site.css and
   loads after it, so the delete action needs its red restated here. */
.admin-surface .table-action-danger,
.admin-surface .table-action-danger:hover,
.admin-surface .table-action-danger:focus-visible {
  color: var(--moonarrow-color-admin-danger);
  border-color: #d9b3b6;
}

.admin-surface .pagination {
  margin-top: 0;
  padding: 16px 20px;
  border: 1px solid #cfd8e3;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.admin-footer {
  color: #5b6776;
  background: #f7f9fc;
  border-top: 1px solid #dce3eb;
}

.admin-footer a {
  color: var(--moonarrow-fidelity-blue);
}

@media (min-width: 1200px) {
  .admin-surface .site-navigation > .container-xl {
    position: relative;
  }

  .admin-surface .site-navigation-links {
    position: absolute;
    left: clamp(380px, 32.55vw, 500px);
    gap: clamp(50px, 5.2vw, 80px);
    margin: 0 !important;
  }

  .admin-surface .site-navigation .site-nav-actions {
    position: absolute;
    right: 29px;
    margin: 0;
  }

  .admin-surface .admin-order-table td.admin-order-state-stack {
    display: table-cell;
  }

  .admin-surface .admin-order-table td.admin-order-state-stack > * {
    display: flex;
    width: fit-content;
    margin-bottom: 5px;
  }

  .admin-surface .admin-order-table td.admin-order-state-stack > *:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 1199.98px) {
  .admin-surface .site-utility-bar {
    display: none;
  }

  .admin-surface .site-navigation {
    height: auto;
    min-height: 64px;
  }

  .admin-surface .site-navigation > .container-xl {
    height: auto;
    min-height: 64px;
    padding-inline: 16px;
  }

  .admin-surface .site-navigation .site-brand {
    min-width: 0;
    min-height: 56px;
    margin-right: auto;
  }

  .admin-surface .site-navigation .navbar-collapse {
    width: 100%;
  }

  .admin-surface .page-section {
    padding: 22px 20px 32px;
  }

  .admin-surface .admin-order-table,
  .admin-surface .admin-order-table tbody {
    display: block;
  }

  .admin-surface .admin-order-table th,
  .admin-surface .admin-order-table td {
    width: 100% !important;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .admin-surface .site-navigation,
  .admin-surface .site-navigation > .container-xl {
    height: 82px;
    min-height: 82px;
  }

  .admin-surface .site-navigation > .container-xl {
    padding-inline: 16px;
  }

  .admin-surface .site-navigation .site-brand {
    min-width: 92px;
    min-height: 64px;
    margin-right: 18px;
  }

  .admin-surface .site-navigation .navbar-collapse {
    position: static;
    display: flex !important;
    width: auto;
    max-height: none;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .admin-surface .site-navigation-links {
    display: flex;
    width: auto !important;
    height: 82px;
    flex: 0 1 auto;
    gap: clamp(8px, 1vw, 14px);
    margin: 0 auto !important;
  }

  .admin-surface .site-navigation .nav-item,
  .admin-surface .site-navigation .nav-link,
  .admin-surface .site-navigation .nav-button {
    width: auto;
  }

  .admin-surface .site-navigation .nav-link,
  .admin-surface .site-navigation .nav-button {
    height: 81px;
    min-height: 81px;
    padding: 0 4px !important;
    font-size: 12.5px;
  }

  .admin-surface .site-navigation .site-nav-actions {
    position: static;
    display: flex;
    width: 82px !important;
    height: 82px;
    flex: 0 0 82px;
    gap: 6px;
    margin: 0 0 0 12px;
    padding: 0;
    border: 0;
  }

  .admin-surface .site-navigation .site-nav-actions > :last-child:nth-child(odd) {
    width: auto;
  }

  .admin-surface .site-navigation .site-nav-action {
    width: 38px !important;
    min-width: 38px;
    height: 81px;
    min-height: 81px;
    flex: 0 0 38px;
    padding-inline: 2px;
    background: transparent;
    border: 0;
  }

}

@media (max-width: 767.98px) {
  .admin-surface .page-section {
    padding: 20px 16px 28px;
  }

  .admin-surface .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
  }

  .admin-surface .admin-order-page .page-heading {
    flex-wrap: nowrap;
  }

  .admin-surface .admin-order-page .page-heading > div {
    width: auto;
    flex: 0 0 auto;
  }

  .admin-surface .admin-order-page .page-heading .btn {
    width: auto !important;
    flex: 0 0 auto;
  }

  .admin-surface .page-heading h1 {
    font-size: 26px;
  }

  .admin-surface .admin-order-queues,
  .admin-surface .admin-management-tabs {
    min-height: 50px;
    gap: 8px;
    margin-bottom: 18px;
  }

  .admin-surface .admin-order-queues a,
  .admin-surface .admin-management-tab {
    min-height: 50px;
    padding-inline: 13px;
    font-size: 13px;
  }

  .admin-surface .admin-order-search {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 9px;
  }

  .admin-surface .admin-order-keyword {
    grid-column: 1 / -1;
  }

  .admin-surface .admin-order-search > .btn,
  .admin-surface .admin-order-search > [data-auto-search-submit] {
    width: 100% !important;
  }

  .admin-surface .admin-card-table tbody {
    gap: 10px;
  }

  .admin-surface .admin-card-table tbody tr {
    padding: 12px;
    border-radius: 5px;
    box-shadow: none;
  }

  .admin-surface .admin-card-table td,
  .admin-surface .admin-order-table td {
    width: 100% !important;
    height: auto;
    min-height: 52px;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    font-size: 14px;
  }

  .admin-surface .admin-order-table td > strong {
    font-size: 15px;
  }

  .admin-surface .admin-order-table td > small,
  .admin-surface .admin-order-table :is(.order-state, .admin-order-work-tag, .admin-shipment-attention-tag) {
    font-size: 12px;
  }

  .admin-surface .table-action-link,
  .admin-surface .table-action-button {
    width: auto;
    min-width: 112px;
    min-height: 44px;
  }

  .admin-surface .admin-card-table .table-action-link,
  .admin-surface .admin-card-table .table-action-button {
    width: auto !important;
    justify-self: end;
  }
}

/* Issue #82: mobile acceptance remediation after physical-device review. */
.storefront-surface .product-spec-card {
  color: var(--moonarrow-fidelity-ink);
}

.storefront-surface .product-spec-heading {
  border-bottom-color: var(--moonarrow-fidelity-line);
}

.storefront-surface .product-specification-text {
  color: #4b596b;
}

@media (max-width: 991.98px) {
  .admin-surface .site-navigation,
  .admin-surface .site-navigation > .container-xl {
    height: auto;
    max-height: none;
  }

  .admin-surface .site-navigation-links {
    position: static;
    width: 100%;
    height: auto;
    gap: 2px;
    margin: 0 !important;
  }

  .admin-surface .site-navigation .nav-link,
  .admin-surface .site-navigation .nav-button {
    width: 100%;
    height: auto;
    min-height: 46px;
    padding: 0 13px !important;
    font-size: 14px;
  }

  .admin-surface .site-navigation .site-nav-actions {
    position: static;
    width: 100%;
    height: auto;
    margin: 8px 0 0;
  }

  .admin-surface .site-navigation .site-nav-action {
    width: 100%;
    height: auto;
    min-height: 48px;
  }

}

@media (max-width: 1199.98px) {

  .admin-surface .admin-card-table td {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .admin-surface .admin-card-table td::before {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    margin: 0;
  }

  .admin-surface .admin-card-table td > * {
    grid-column: 2;
    min-width: 0;
  }

  .admin-surface .admin-card-table td.table-action-cell {
    display: grid;
  }

  .admin-surface .admin-card-table td.table-action-cell .table-action-link,
  .admin-surface .admin-card-table td.table-action-cell .table-action-button {
    grid-column: 2;
    justify-self: start;
  }

  .admin-surface .admin-order-table :is(.admin-order-work-tag, .admin-shipment-attention-tag) {
    width: fit-content;
    max-width: 100%;
    justify-self: start;
    white-space: normal;
  }

  .admin-surface .admin-order-table .order-state {
    width: fit-content;
    max-width: 100%;
    justify-self: start;
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: keep-all;
  }

  .admin-surface .admin-order-table td > :is(strong, small) {
    overflow-wrap: anywhere;
  }

  .admin-surface .admin-order-mail-link {
    height: 44px;
    min-height: 44px;
  }

  .admin-surface .admin-order-page .page-heading .admin-order-mail-link {
    height: 44px;
    min-height: 44px;
  }

  .admin-surface .admin-card-table thead {
    display: block !important;
    width: 1px !important;
    max-width: 1px !important;
    height: 1px !important;
    contain: strict;
  }

  .admin-surface .admin-card-table thead tr,
  .admin-surface .admin-card-table thead th {
    display: block !important;
    width: 1px !important;
    max-width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
  }
}

@media (max-width: 767.98px) {
  .storefront-surface .audio-selected-variant {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 4px 10px;
    align-items: start;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
  }

  .storefront-surface .audio-selected-variant .audio-color-swatch {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 2px;
  }

  .storefront-surface .audio-selected-variant #SelectedColorText,
  .storefront-surface .audio-selected-variant #SelectedCableLengthText {
    grid-column: 2;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .storefront-surface .audio-selected-variant #SelectedCableLengthText:not(:empty)::before {
    content: none;
    margin: 0;
  }

  .storefront-surface .product-spec-card {
    align-self: start;
  }

  .storefront-surface .product-specification-text {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.75;
  }

  .storefront-surface .product-story-copy > p:not(.section-kicker) {
    color: #4b596b;
  }

  .admin-surface .admin-order-detail-page .admin-order-heading h1 {
    height: auto;
    font-size: clamp(22px, 6.8vw, 26px);
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-surface .admin-order-detail-page .admin-order-heading > div {
    min-width: 0;
  }

  .storefront-surface .order-detail-page .order-cancellation-area .btn,
  .storefront-surface .order-detail-page .order-detail-back-link {
    width: 100% !important;
    min-height: 48px;
    justify-self: stretch;
  }

  .storefront-surface .checkout-summary-products > summary,
  .storefront-surface .checkout-optional-section > summary,
  .storefront-surface .checkout-form-section details > summary,
  .storefront-surface .order-history-disclosure > summary {
    display: flex;
    min-height: 44px;
    align-items: center;
  }
}

@media (max-width: 991.98px) {
  .admin-surface .checkbox-line {
    min-height: 44px;
    align-items: center;
    padding-block: 8px;
  }

  .admin-surface .ql-toolbar.ql-snow {
    display: flex;
    height: auto;
    flex-wrap: wrap !important;
    gap: 4px;
    padding: 6px;
    overflow-x: visible;
  }

  .admin-surface .ql-toolbar.ql-snow .ql-formats {
    display: flex;
    max-width: 100%;
    flex-wrap: wrap !important;
    margin: 0;
  }

  .admin-surface .ql-toolbar.ql-snow button {
    width: 44px;
    height: 44px;
  }

  .admin-surface .ql-toolbar.ql-snow :is(.ql-picker-label, .ql-picker) {
    min-height: 44px;
  }
}

@media (max-width: 359.98px) {
  .admin-surface .admin-card-table td,
  .admin-surface .admin-order-items .admin-card-table td {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-surface .admin-card-table td::before {
    grid-column: 1;
    grid-row: auto;
  }

  .admin-surface .admin-card-table td > *,
  .admin-surface .admin-card-table td.table-action-cell .table-action-link,
  .admin-surface .admin-card-table td.table-action-cell .table-action-button {
    grid-column: 1;
  }

}

/* Keep the operational order queue dense on 992–1199px tablets. Other wide
   CRUD tables may remain cards because they carry more columns. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .admin-surface .admin-order-table {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
  }

  .admin-surface .admin-order-table thead {
    position: static !important;
    display: table-header-group !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    overflow: visible;
    clip: auto;
    clip-path: none;
    contain: none;
    white-space: normal;
  }

  .admin-surface .admin-order-table thead tr {
    display: table-row !important;
    width: auto !important;
    height: auto !important;
  }

  .admin-surface .admin-order-table tbody {
    display: table-row-group;
    width: auto;
  }

  .admin-surface .admin-order-table tbody tr {
    display: table-row;
    padding: 0;
    overflow: visible;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .admin-surface .admin-order-table th,
  .admin-surface .admin-order-table td {
    display: table-cell;
    height: 82px;
    min-height: 0;
    padding: 10px 12px;
    font-size: 13px;
    vertical-align: middle;
  }

  .admin-surface .admin-order-table th {
    height: 49px !important;
    min-height: 49px;
    overflow: visible;
  }

  .admin-surface .admin-order-table thead th {
    display: table-cell !important;
    max-width: none !important;
    height: 49px !important;
    min-height: 49px !important;
    padding: 0 12px !important;
    overflow: visible;
  }

  .admin-surface .admin-order-table th:nth-child(1),
  .admin-surface .admin-order-table td:nth-child(1) { width: 18% !important; }
  .admin-surface .admin-order-table th:nth-child(2),
  .admin-surface .admin-order-table td:nth-child(2) { width: 23% !important; }
  .admin-surface .admin-order-table th:nth-child(3),
  .admin-surface .admin-order-table td:nth-child(3) { width: 14% !important; }
  .admin-surface .admin-order-table th:nth-child(4),
  .admin-surface .admin-order-table td:nth-child(4) { width: 15% !important; }
  .admin-surface .admin-order-table th:nth-child(5),
  .admin-surface .admin-order-table td:nth-child(5) { width: 14% !important; }
  .admin-surface .admin-order-table th:nth-child(6),
  .admin-surface .admin-order-table td:nth-child(6) { width: 16% !important; }

  .admin-surface .admin-order-table td::before {
    display: none;
  }

  .admin-surface .admin-order-table td.admin-order-state-stack,
  .admin-surface .admin-order-table td.table-action-cell {
    display: table-cell;
  }

  .admin-surface .admin-order-table td.admin-order-state-stack > * {
    display: flex;
    width: fit-content;
    margin-bottom: 5px;
  }

  .admin-surface .admin-order-table td.admin-order-state-stack > *:last-child {
    margin-bottom: 0;
  }

  .admin-surface .admin-order-table .table-action-link {
    width: auto !important;
    min-width: 90px;
    justify-self: auto;
  }

  .admin-surface .table-scroll:has(.admin-order-table) {
    overflow-x: auto;
  }
}

/* Issue #86 / TIN-299 ----------------------------------------------------
 * Resolve the shared causes before page-specific defects: one centered shell,
 * one header separator, one Hero crop ratio, then local component fixes.
 */
:root {
  --moonarrow-fidelity-shell-max: 1440px;
  --moonarrow-fidelity-shell-gutter: clamp(1rem, 3vw, 2.5rem);
}

body.admin-surface {
  background: var(--moonarrow-fidelity-ice);
}

.admin-footer > .container-xl {
  width: 100%;
  max-width: var(--moonarrow-fidelity-shell-max);
  margin-inline: auto;
  padding-inline: var(--moonarrow-fidelity-shell-gutter);
}

.admin-surface .site-navigation .site-brand {
  order: 1;
}

.admin-surface .site-navigation .navbar-collapse {
  order: 2;
}

.admin-surface .site-navigation .admin-primary-actions {
  order: 3;
}

.admin-surface .site-navigation .navbar-toggler {
  order: 4;
}

/* Match admin navigation geometry to the storefront and constrain every work page. */
.admin-surface .site-navigation .site-brand {
  min-width: 96px;
  margin-right: var(--moonarrow-navigation-brand-gap);
}

.admin-surface .site-navigation :is(.nav-link, .nav-button).is-active {
  color: var(--moonarrow-fidelity-blue) !important;
  background: transparent !important;
}

.admin-surface .admin-order-table thead .table-sort-link {
  color: inherit;
  font-weight: 700;
  text-decoration-color: rgba(7, 95, 199, 0.38);
}

.admin-surface .admin-order-table thead .table-sort-link:hover,
.admin-surface .admin-order-table thead .table-sort-link:focus-visible {
  color: var(--moonarrow-fidelity-blue);
  text-decoration-color: currentColor;
}

.admin-surface .site-main {
  width: 100%;
  max-width: var(--moonarrow-fidelity-shell-max);
  margin-inline: auto;
  padding-inline: var(--moonarrow-fidelity-shell-gutter);
}

.admin-surface .page-section {
  width: 100%;
  max-width: none;
  padding: 28px clamp(1rem, 2.4vw, 2rem) 38px;
}

/* Local defects reported in TIN-299. */
.admin-surface .admin-order-keyword {
  min-width: 0;
}

.admin-surface .admin-order-keyword input {
  padding-inline: 52px 16px !important;
}

.admin-surface .admin-order-search-icon {
  left: 17px;
  width: 18px;
  height: 18px;
}

@media (min-width: 1200px) {
  .admin-surface .site-navigation > .container-xl {
    position: static;
  }

  .admin-surface .site-navigation .navbar-collapse {
    display: flex !important;
    min-width: 0;
  }

  .admin-surface .site-navigation-links {
    position: static;
    left: auto;
    height: var(--moonarrow-navigation-height);
    gap: var(--moonarrow-navigation-item-gap);
    margin: 0 auto !important;
  }

  .admin-surface .site-navigation .site-nav-actions {
    position: static;
    right: auto;
    margin-left: clamp(0.75rem, 1.5vw, 1.5rem);
  }
}

@media (max-width: 991.98px) {
  .admin-surface .site-navigation .site-brand {
    order: 1;
    margin-right: 0;
  }

  .admin-surface .site-navigation .admin-primary-actions {
    display: flex;
    width: auto;
    height: 64px;
    flex: 0 0 auto;
    align-self: center;
    order: 2;
    gap: 0;
    margin: 0 2px 0 auto;
    padding: 0;
    border: 0;
  }

  .admin-surface .site-navigation .admin-primary-actions > *,
  .admin-surface .site-navigation .admin-primary-actions .site-nav-action {
    width: 40px !important;
    min-width: 40px;
    height: 64px;
    min-height: 64px;
    flex: 0 0 40px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .admin-surface .site-navigation .admin-primary-actions .site-nav-action-label {
    display: none;
  }

  .admin-surface .site-navigation .admin-primary-actions :is(.site-nav-action-symbol, .site-nav-icon) {
    width: 20px;
    height: 20px;
  }

  .admin-surface .site-navigation .navbar-toggler {
    order: 3;
  }

  .admin-surface .site-navigation .navbar-collapse {
    flex-basis: 100%;
    order: 4;
  }

  .admin-surface .site-main {
    padding-inline: 16px;
  }

  .admin-surface .page-section {
    padding: 20px 16px 28px;
  }
}

/* Issue #86: one responsive contract across storefront and administration. */

@media (max-width: 767.98px) {
  .admin-surface .site-main,
  .admin-surface .site-main > *,
  .admin-surface :is(section, article, form, fieldset, table, details) {
    min-width: 0;
    max-width: 100%;
  }

  .storefront-surface:not(.moonarrow-site) .site-main {
    padding: 20px var(--moonarrow-page-gutter) 40px;
  }

  .admin-surface .site-main {
    padding-inline: var(--moonarrow-page-gutter);
  }

  :is(.storefront-surface, .admin-surface)
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
  :is(.storefront-surface, .admin-surface) :is(select, textarea, .form-control, .form-select) {
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }

  :is(.storefront-surface, .admin-surface)
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
  :is(.storefront-surface, .admin-surface) :is(select, .form-control:not(textarea), .form-select) {
    min-height: var(--moonarrow-field-height);
  }

  :is(.storefront-surface, .admin-surface) :is(.btn, .table-action-link, .table-action-button) {
    max-width: 100%;
    min-width: 0;
    min-height: var(--moonarrow-button-height);
    padding: 10px 14px;
    font-size: var(--moonarrow-type-label);
    line-height: 1.35;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  :is(.storefront-surface, .admin-surface)
    :is(

      .home-primary-brand-actions,
      .news-details-actions,
      .custom-service-details-actions,
      .page-heading-actions,
      .action-row,
      .admin-page-bottom-actions,
      .admin-inline-actions,
      .admin-empty-state-actions,
      .auth-verification-actions,
      .order-store-reselection-actions,
      .checkout-store-map-recovery-actions,
      .store-map-return-actions,
      .product-spec-actions,
      .table-actions
    ) {
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap !important;
    gap: 8px;
  }

  :is(.storefront-surface, .admin-surface)
    :is(

      .home-primary-brand-actions,
      .news-details-actions,
      .custom-service-details-actions,
      .page-heading-actions,
      .action-row,
      .admin-page-bottom-actions,
      .admin-inline-actions,
      .admin-empty-state-actions,
      .auth-verification-actions,
      .order-store-reselection-actions,
      .checkout-store-map-recovery-actions,
      .store-map-return-actions,
      .product-spec-actions,
      .table-actions
    ) > * {
    min-width: 0;
    max-width: 100%;
  }

  :is(.storefront-surface, .admin-surface)
    :is(
      .home-primary-brand-actions,
      .news-details-actions,
      .custom-service-details-actions,
      .page-heading-actions,
      .action-row,
      .admin-page-bottom-actions,
      .admin-inline-actions,
      .admin-empty-state-actions,
      .auth-verification-actions,
      .product-spec-actions,
      .table-actions
    ) :is(.btn, .table-action-link, .table-action-button) {
    width: auto !important;
    flex: 0 1 auto;
  }

  :is(.storefront-surface, .admin-surface)
    :is(
      .page-heading,
      .brand-content-hero,
      .storefront-page-header,
      .legal-page-header,
      .member-dashboard-header,
      .order-page-header,
      .managed-content-page-header,
      .account-panel-header
    ) h1 {
    height: auto;
    min-width: 0;
    font-size: var(--moonarrow-type-page-title);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-surface .page-heading h1 {
    font-size: var(--moonarrow-type-admin-page-title);
  }

  :is(.storefront-surface, .admin-surface) :is(.page-heading, .page-heading > div) {
    min-width: 0;
    max-width: 100%;
  }

  .storefront-surface .member-action-link {
    min-width: 0;
    max-width: 100%;
  }

  .storefront-surface .site-footer-intro .btn-light {
    width: auto;
    max-width: 100%;
    min-height: var(--moonarrow-button-height);
    white-space: normal;
  }

  .admin-surface .admin-order-page .page-heading {
    flex-wrap: wrap;
  }

  .admin-surface .admin-order-page .page-heading > div {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .admin-surface .admin-order-page .page-heading .btn {
    width: auto !important;
    min-width: 0;
    flex: 0 1 auto;
  }

  .admin-surface .admin-card-table td > *,
  .admin-surface .admin-order-table td > * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .admin-surface :is(.admin-order-work-tag, .admin-shipment-attention-tag) {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .admin-surface .order-state {
    width: fit-content;
    max-width: 100%;
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: keep-all;
  }
}

@media (max-width: 575.98px) {
  .admin-surface .admin-order-search {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-surface .admin-order-search > *,
  .admin-surface .admin-order-keyword,
  .admin-surface .admin-order-search > .btn,
  .admin-surface .admin-order-search > [data-auto-search-submit] {
    width: 100%;
    min-width: 0;
    grid-column: 1;
  }

  .admin-surface .admin-card-table td,
  .admin-surface .admin-order-table td,
  .admin-surface .admin-order-items .admin-card-table td {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .admin-surface .admin-card-table td::before,
  .admin-surface .admin-order-table td::before,
  .admin-surface .admin-card-table td > *,
  .admin-surface .admin-order-table td > *,
  .admin-surface .admin-card-table td.table-action-cell :is(.table-action-link, .table-action-button) {
    grid-column: 1;
  }

  .admin-surface .admin-card-table :is(.table-action-link, .table-action-button),
  .admin-surface .admin-order-table :is(.table-action-link, .table-action-button) {
    width: auto !important;
    min-width: 0;
    max-width: 100%;
    justify-self: start;
  }
}

/* Issue #86 / TIN-299: one product-grid component for the homepage and catalog. */
.catalog-result-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.catalog-result-actions > span {
  color: var(--moonarrow-fidelity-muted);
  font-size: 12px;
  white-space: nowrap;
}

.product-grid-view-toggle {
  --product-grid-view-control-size: 44px;
  --product-grid-view-icon-size: 16px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  color: #607086;
  background: #fff;
  border: 1px solid var(--moonarrow-fidelity-line);
  border-radius: 4px;
  overflow: hidden;
}

.catalog-result-actions .product-grid-view-toggle {
  margin-left: auto;
}

.product-grid-view-button {
  display: inline-flex;
  width: var(--product-grid-view-control-size);
  min-width: var(--product-grid-view-control-size);
  height: var(--product-grid-view-control-size);
  min-height: var(--product-grid-view-control-size);
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #607086;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--moonarrow-fidelity-line);
  border-radius: 0;
}

.product-grid-view-button:hover,
.product-grid-view-button:focus-visible {
  color: var(--moonarrow-fidelity-blue);
  background: var(--moonarrow-color-daylight-soft);
}

.product-grid-view-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--moonarrow-fidelity-blue);
  outline-offset: -3px;
}

.product-grid-view-button[aria-pressed="true"] {
  color: #fff;
  background: var(--moonarrow-fidelity-blue);
}

.product-grid-view-icon {
  display: grid;
  width: var(--product-grid-view-icon-size);
  height: var(--product-grid-view-icon-size);
}

.product-grid-view-icon--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px;
}

.product-grid-view-icon--one {
  grid-template-columns: minmax(0, 1fr);
}

.product-grid-view-icon > span {
  background: currentColor;
  border-radius: 1px;
}

.admin-surface .admin-status-chip {
  white-space: nowrap;
}

@media (min-width: 1200px) {
  /* Five equal fixed columns gave 排序 as much room as 標題 and left the action
     column too narrow for its buttons, so this table measures its content instead. */
  .controller-newsmanager.action-index .admin-card-table,
  .controller-productmanager.action-index .admin-card-table {
    table-layout: auto;
  }

  .controller-productmanager.action-index .admin-card-table :is(th, td) {
    padding-inline: 12px;
  }

  .controller-productmanager.action-index .admin-card-table td:is(
    [data-label="商品編號"],
    [data-label="價格"],
    [data-label="庫存"],
    [data-label="排序"]
  ) {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }
}

.storefront-surface .product-grid[data-product-grid] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 992px) {
  .product-grid-view-toggle {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .catalog-result-actions {
    width: 100%;
    justify-content: space-between;
  }

  .catalog-result-heading {
    flex-wrap: wrap;
    gap: 14px;
  }

  html:not([data-product-grid-view="one"]) .storefront-surface .product-grid[data-product-grid],
  html[data-product-grid-view="two"] .storefront-surface .product-grid[data-product-grid] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-product-grid-view="one"] .storefront-surface .product-grid[data-product-grid] {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Card-mode tables own one border per record. Their table wrapper must not
   draw a second frame around the complete card collection. */
@media (max-width: 1199.98px) {
  .admin-surface .data-table.admin-card-table:not(.admin-order-table) {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0 !important;
  }

  .admin-surface .admin-card-table:not(.admin-order-table) tbody {
    display: grid;
    width: 100%;
    gap: 12px;
  }

  .admin-surface .admin-card-table:not(.admin-order-table) tbody tr {
    border-radius: 5px;
    box-shadow: none;
  }
}

@media (max-width: 991.98px) {
  .admin-surface .data-table.admin-card-table.admin-order-table {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0 !important;
  }

  .admin-surface .admin-card-table.admin-order-table tbody {
    display: grid;
    width: 100%;
    gap: 12px;
  }

  .admin-surface .admin-card-table.admin-order-table tbody tr {
    border-radius: 5px;
    box-shadow: none;
  }

  .storefront-surface .data-table.member-order-table {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0 !important;
  }

  .storefront-surface .member-order-table tbody {
    display: grid;
    width: 100%;
    gap: 14px;
  }
}

@media (max-width: 359.98px) {
  .admin-surface .site-navigation .admin-primary-actions > *,
  .admin-surface .site-navigation .admin-primary-actions .site-nav-action {
    width: 36px !important;
    min-width: 36px;
    flex-basis: 36px;
  }
}

/* Issue #101: integrated admin hierarchy and unclipped table actions.
   The page heading owns hierarchy and actions; table wrappers own overflow. */
.admin-surface .page-heading {
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 12px;
  margin-bottom: 24px;
}

.admin-surface .table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

@media (min-width: 1200px) {
  .admin-surface .table-scroll > .data-table.admin-card-table {
    min-width: 720px;
    table-layout: auto;
    overflow: visible;
  }

  .admin-surface .admin-card-table .table-action-cell {
    width: 228px;
    min-width: 228px;
    padding-inline: 12px;
  }

  .admin-surface .admin-card-table .table-actions {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .admin-surface .admin-card-table .table-actions > * {
    min-width: 0;
    flex: 0 1 102px;
  }

  .admin-surface .admin-card-table .table-actions :is(.table-action-link, .table-action-button) {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 1199.98px) {
  .admin-surface .table-scroll:has(.admin-card-table:not(.admin-order-table)) {
    overflow: visible;
  }

  .admin-surface .admin-card-table .table-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: 8px;
  }

  .admin-surface .admin-card-table .table-actions > *,
  .admin-surface .admin-card-table .table-actions :is(.table-action-link, .table-action-button) {
    width: 100% !important;
    min-width: 0;
  }
}

@media (max-width: 991.98px) {
  .admin-surface .table-scroll:has(.admin-order-table) {
    overflow: visible;
  }
}

@media (max-width: 767.98px) {
  .admin-surface .page-heading .page-heading-actions,
  .admin-surface .page-heading .page-heading-actions > .btn {
    width: 100% !important;
  }
}
