.cj-shipment-action-inputs label {
  gap: 5px;
  font-size: 12px;
}

.cj-shipment-empty {
  padding: 34px 18px;
  color: var(--muted-foreground);
  text-align: center;
}

.cj-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.cj-status-success {
  background: var(--card);
  color: var(--foreground);
}

.cj-status-error {
  background: var(--card);
  color: var(--foreground);
}

.cj-status-pending {
  background: var(--card);
  color: var(--foreground);
}

.cj-status-held {
  background: var(--card);
  color: var(--foreground);
}

.cj-status-neutral {
  background: var(--card);
  color: var(--foreground);
}

.cj-shipment-dialog {
  width: min(1480px, calc(100vw - 32px));
  max-width: none;
  height: min(920px, calc(100vh - 32px));
  max-height: none;
  margin: auto;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0;
  box-shadow: var(--shadow-sm);
}

.cj-shipment-dialog::backdrop {
  background: var(--card);
}

.cj-shipment-dialog-panel {
  display: grid;
  min-height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.cj-shipment-dialog-head,
.cj-shipment-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.cj-shipment-dialog-head {
  border-bottom: 1px solid var(--line);
}

.cj-shipment-dialog-head > div {
  min-width: 0;
}

.cj-shipment-dialog-head .eyebrow {
  margin-bottom: 5px;
}

.cj-shipment-dialog-head h2 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cj-shipment-dialog-foot {
  border-top: 1px solid var(--line);
}

.cj-shipment-dialog-foot p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.cj-shipment-dialog-content {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 16px;
  overflow-y: auto;
  padding: 20px 22px 28px;
}

.cj-shipment-summary,
.cj-shipment-actions,
.cj-shipment-detail-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.cj-shipment-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.cj-shipment-summary-grid > div {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.cj-shipment-summary-grid > div:nth-child(4n) {
  border-right: 0;
}

.cj-shipment-summary-grid > div:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.cj-shipment-summary-grid dt {
  margin-bottom: 6px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.cj-shipment-summary-grid dd {
  margin: 0;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.cj-shipment-section-head {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
}

.cj-shipment-section-head h3,
.cj-shipment-section-head p {
  margin: 0;
}

.cj-shipment-section-head h3 {
  font-size: 15px;
}

.cj-shipment-section-head p {
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.cj-shipment-action-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
}

.cj-shipment-action-inputs textarea {
  min-height: 68px;
  resize: vertical;
}

.cj-shipment-unknown-fields {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr) minmax(190px, 0.8fr);
  align-items: end;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 14px 16px;
}

.cj-shipment-unknown-fields[hidden],
[data-cj-unknown-invoice-field][hidden] {
  display: none;
}

.cj-shipment-unknown-copy {
  align-self: center;
}

.cj-shipment-unknown-copy strong,
.cj-shipment-unknown-copy span {
  display: block;
}

.cj-shipment-unknown-copy strong {
  color: var(--foreground);
  font-size: 13px;
}

.cj-shipment-unknown-copy span {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.cj-shipment-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 14px 16px;
}

.cj-shipment-action-buttons .button:disabled {
  cursor: not-allowed;
  filter: none;
  opacity: 0.42;
}

.cj-shipment-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.cj-shipment-detail-section .table-wrap {
  max-height: 280px;
}

.cj-shipment-detail-section table {
  min-width: 760px;
}

.cj-shipment-detail-section td {
  max-width: 420px;
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 1180px) {
  .cj-shipment-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cj-shipment-summary-grid > div:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  .cj-shipment-summary-grid > div:nth-child(2n) {
    border-right: 0;
  }

  .cj-shipment-summary-grid > div:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .cj-shipment-summary-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .cj-shipment-action-inputs,
  .cj-shipment-unknown-fields {
    grid-template-columns: 1fr;
  }

  .cj-shipment-action-buttons .button {
    width: 100%;
  }

  .cj-shipment-dialog {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .cj-shipment-dialog-head,
  .cj-shipment-dialog-foot,
  .cj-shipment-dialog-content {
    padding-inline: 14px;
  }

  .cj-shipment-summary-grid {
    grid-template-columns: 1fr;
  }

  .cj-shipment-summary-grid > div,
  .cj-shipment-summary-grid > div:nth-child(2n),
  .cj-shipment-summary-grid > div:nth-child(4n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cj-shipment-summary-grid > div:last-child {
    border-bottom: 0;
  }

  .cj-shipment-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font-sans);
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  min-width: 0;
  font: inherit;
}

.login-screen {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
}

.login-brand {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  background: var(--primary);
  color: var(--primary-foreground);
}

.brand-mark {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--dark);
  font-weight: var(--weight-bold);
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  font-size: 13px;
}

.brand-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-brand .eyebrow {
  color: var(--foreground);
}

.brand-copy h1 {
  margin: 0;
  max-width: 620px;
  font-size: 48px;
  line-height: 1.14;
}

.brand-copy p:last-child {
  max-width: 420px;
  color: var(--foreground);
}

.brand-foot {
  color: var(--foreground);
  font-size: 12px;
}

.login-panel {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  display: grid;
  width: 100%;
  max-width: 420px;
  gap: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.error-screen {
  display: grid;
  width: min(100% - (var(--page-gutter) * 2), 720px);
  min-height: 100vh;
  min-height: 100dvh;
  align-content: center;
  gap: 12px;
  margin: 0 auto;
  padding-block: clamp(32px, 8vh, 80px);
}

.error-screen h1,
.error-screen h2 {
  margin: 0;
  font-weight: var(--weight-bold);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.error-screen h1 {
  font-size: clamp(24px, 6vw, 38px);
}

.error-screen h2 {
  color: var(--muted-foreground);
  font-size: clamp(18px, 4vw, 24px);
}

.error-screen pre {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: clamp(14px, 3vw, 22px);
  color: var(--foreground);
  font: 12px/1.6 var(--font-sans);
}

.login-card h2,
.page-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.form-error {
  min-height: 20px;
  margin: -6px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

label {
  display: grid;
  gap: 8px;
  color: var(--foreground);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--control-height);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  outline: 0;
  padding: 10px 12px;
}

select {
  appearance: auto;
  cursor: pointer;
  font-weight: var(--weight-medium);
  padding-right: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  background: var(--background);
  color: var(--foreground);
}

select:hover:not(:disabled) {
  border-color: var(--foreground);
  background-color: var(--card);
}

select:focus {
  border-color: var(--dark);
  box-shadow: var(--shadow-sm);
}

select:disabled {
  cursor: not-allowed;
  background-color: var(--card);
  color: var(--foreground);
  opacity: 1;
}

select::-ms-expand {
  display: none;
}

textarea {
  resize: vertical;
}

.description-editor {
  display: grid;
  gap: 10px;
}

.description-editor .ck-editor__editable_inline {
  min-height: 360px;
}

.editor-file-row {
  display: grid;
  gap: 6px;
}

.ck-content img,
.ck-content video {
  max-width: 100%;
  height: auto;
}

.ck-content,
.notice-view-content {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ck-content iframe,
.ck-content embed,
.ck-content object {
  display: block;
  max-width: 100%;
}

.ck-content pre,
.notice-view-content pre,
.error-screen pre {
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ck-content table,
.notice-view-content table {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.ck-content figure.table,
.notice-view-content figure.table {
  max-width: 100%;
  overflow-x: auto;
}

#noticeBuilder .ck-editor__editable_inline {
  min-height: 360px;
}

.notice-view-body {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.notice-view-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.notice-view-meta div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--card);
}

.notice-view-meta dt {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.notice-view-meta dd {
  margin: 0;
  font-weight: var(--weight-bold);
}

.notice-view-content {
  min-height: 320px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  line-height: 1.75;
}

#archiveBuilder .ck-editor__editable_inline {
  min-height: 520px;
}

.description-mode-tabs {
  display: inline-flex;
  width: max-content;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.description-mode-tab {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  font-weight: var(--weight-medium);
  padding: 0 14px;
}

.description-mode-tab:last-child {
  border-right: 0;
}

.description-mode-tab.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.html-source-panel {
  display: grid;
  gap: 8px;
}

.html-source-panel[hidden] {
  display: none;
}

.html-source-panel textarea {
  min-height: 360px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
}

.list-filter {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 150px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.list-filter.member-filter {
  grid-template-columns: 150px minmax(240px, 340px) 150px 150px;
}

.list-filter.board-filter {
  grid-template-columns: minmax(240px, 420px);
}

.order-list-tools {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.order-list-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto 150px auto auto;
  align-items: end;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.shipping-list-filter {
  grid-template-columns: minmax(170px, 0.8fr) minmax(230px, 1.2fr) 145px auto 145px 150px auto;
}

.order-date-separator {
  align-self: end;
  padding-bottom: 11px;
  color: var(--muted-foreground);
}

.order-date-field {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.order-date-field input {
  box-sizing: border-box;
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--card);
  color: var(--ink);
}

@media (max-width: 980px) {
  .order-list-filter {
    grid-template-columns: 1fr;
  }

  .order-date-separator {
    display: none;
  }
}

#productListFilter {
  grid-template-columns: minmax(280px, 1fr) 150px minmax(190px, 240px) auto;
  gap: 10px 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

#productListFilter .filter-search {
  grid-column: 1;
  grid-row: 1;
}

#productListFilter .product-status-filter {
  grid-column: 2;
  grid-row: 1;
}

#productListFilter .product-category-filter {
  grid-column: 3;
  grid-row: 1;
}

#productListFilter .product-bulk-delete {
  grid-column: 4;
  grid-row: 1;
  min-width: 150px;
  min-height: 40px;
}

#productListFilter .product-order-help {
  grid-column: 1 / -1;
  grid-row: 2;
  padding: 0 2px;
}

.product-trash-filter {
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 10px 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.product-trash-filter .product-order-help {
  grid-column: 1;
  grid-row: 2;
  padding: 0 2px;
}

.product-trash-table th:nth-child(3),
.product-trash-table td:nth-child(3),
.product-trash-table th:nth-child(4),
.product-trash-table td:nth-child(4),
.product-trash-table th:nth-child(5),
.product-trash-table td:nth-child(5) {
  white-space: nowrap;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 18px;
}

.pagination-row span {
  color: var(--muted-foreground);
  font-size: 13px;
}

.filter-search,
.filter-select {
  position: relative;
  margin: 0;
}

.filter-search input {
  width: 100%;
  height: 40px;
  padding-right: 42px;
}

.filter-search-button {
  position: absolute;
  top: 50%;
  right: 5px;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
}

.filter-search-button:hover {
  background: var(--card);
}

.filter-search-button span {
  position: relative;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.filter-search-button span::after {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  transform: rotate(45deg);
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.filter-select select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}

.member-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.member-detail-grid div {
  display: grid;
  gap: 6px;
  background: var(--card);
  padding: 16px 18px;
}

.member-detail-grid span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.member-detail-grid strong {
  color: var(--ink);
  font-size: 15px;
  word-break: break-word;
}

.member-login-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.panel-head .panel-description {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-regular);
  line-height: 1.45;
}

.member-benefit-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.member-benefit-summary > div {
  display: grid;
  gap: 8px;
  background: var(--card);
  padding: 20px;
}

.member-benefit-summary span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.member-benefit-summary strong {
  color: var(--ink);
  font-size: 23px;
  letter-spacing: -0.03em;
}

.member-benefit-table {
  min-width: 1032px;
}

.member-benefit-table td {
  vertical-align: top;
}

.member-benefit-select-column {
  width: 52px;
  min-width: 52px;
  text-align: center;
}

.member-benefit-select-column .table-checkbox-label {
  width: 100%;
}

.member-benefit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.member-point-total {
  display: grid;
  gap: 2px;
  border-right: 1px solid var(--line);
  padding-right: 12px;
  text-align: right;
}

.member-point-total span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.member-point-total strong {
  color: var(--ink);
  font-size: 17px;
  white-space: nowrap;
}

.member-benefit-table a {
  color: var(--foreground);
  font-weight: var(--weight-medium);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.member-benefit-status.status-scheduled {
  background: var(--card);
  color: var(--foreground);
}

.member-benefit-status.status-used,
.member-benefit-status.status-expired {
  background: var(--card);
  color: var(--foreground);
}

.member-benefit-status.status-voided {
  background: var(--card);
  color: var(--foreground);
}

.member-point-amount {
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.member-point-amount.is-positive {
  color: var(--foreground);
}

.member-point-amount.is-negative {
  color: var(--foreground);
}

.member-management-form {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(320px, 1fr) auto;
  align-items: end;
  gap: 16px;
  padding: 18px;
}

.member-management-form label {
  display: grid;
  gap: 7px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.member-management-form select,
.member-management-form textarea {
  width: 100%;
}

.member-management-form textarea {
  min-height: 108px;
  resize: vertical;
}

.member-benefit-dialog {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow-sm);
}

.member-benefit-dialog::backdrop {
  background: var(--card);
}

.member-benefit-dialog-panel {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 22px;
}

.member-benefit-dialog-panel > header,
.member-benefit-dialog-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.member-benefit-dialog-panel > header > div {
  display: grid;
  gap: 6px;
}

.member-benefit-dialog-panel h2,
.member-benefit-dialog-panel .eyebrow,
.member-benefit-dialog-panel header p,
.member-benefit-dialog-help {
  margin: 0;
}

.member-benefit-dialog-panel h2 {
  font-size: 21px;
}

.member-benefit-dialog-panel header p:last-child,
.member-benefit-dialog-help {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.55;
}

.member-benefit-dialog-panel > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.member-coupon-picker {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.member-coupon-picker-list {
  max-height: min(430px, 52vh);
  overflow-y: auto;
}

.member-coupon-picker-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
  cursor: pointer;
}

.member-coupon-picker-item:last-child {
  border-bottom: 0;
}

.member-coupon-picker-item:hover {
  background: var(--card);
}

.member-coupon-picker-item:has(input:checked) {
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.member-coupon-picker-item:has(input:disabled) {
  background: var(--card);
  cursor: not-allowed;
  opacity: 0.62;
}

.member-coupon-picker-item input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--foreground);
}

.member-coupon-picker-item > span {
  display: grid;
  gap: 5px;
}

.member-coupon-picker-item strong {
  font-size: 14px;
}

.member-coupon-picker-item small {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-regular);
  line-height: 1.5;
}

.member-point-dialog-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px 18px;
}

.member-point-dialog-balance span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.member-point-dialog-balance strong {
  font-size: 24px;
}

.member-point-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.member-point-edit-grid label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.member-point-edit-grid label small {
  color: var(--muted-foreground);
  font-weight: var(--weight-regular);
}

.member-point-reason-field {
  grid-column: 1 / -1;
}

.member-purchase-products {
  min-width: 240px;
  white-space: pre-line;
}

.member-purchase-panel td {
  vertical-align: top;
}

.review-clickable-row:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

body[data-mode="review-detail"] {
  min-width: 320px;
  background: var(--bg);
}

.review-detail-popup-shell {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px;
}

.review-detail-popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.review-detail-popup-head h1 {
  margin: 3px 0 8px;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
}

.review-detail-popup-head > div > p:not(.eyebrow) {
  margin: 0 0 10px;
  color: var(--muted-foreground);
}

.review-detail-popup-content {
  display: grid;
  gap: 18px;
}

.review-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
}

.review-detail-grid > div {
  min-width: 0;
  padding: 17px 18px;
  background: var(--card);
}

.review-detail-grid-wide {
  grid-column: 1 / -1;
}

.review-detail-grid dt {
  margin-bottom: 7px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.review-detail-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.review-detail-preserve-text,
.review-detail-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-detail-content {
  min-height: 140px;
  padding: 18px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.75;
}

.review-detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  padding: 18px;
}

.review-detail-photo {
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.review-detail-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.review-detail-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  color: var(--muted-foreground);
  text-align: center;
}

.button-row.compact {
  gap: 6px;
}

.button-row.compact .button {
  min-height: 32px;
  padding: 0 10px;
}

@media (max-width: 760px) {
  .list-filter {
    grid-template-columns: 1fr;
  }

  .list-filter.member-filter,
  .member-detail-grid,
  .member-management-form,
  .review-detail-grid {
    grid-template-columns: 1fr;
  }

  .member-benefit-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-benefit-panel .panel-head,
  .member-benefit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .member-benefit-actions .button {
    width: 100%;
  }

  .member-point-total {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 10px;
    text-align: left;
  }

  .member-point-edit-grid {
    grid-template-columns: 1fr;
  }

  .member-point-reason-field {
    grid-column: auto;
  }

  .review-detail-popup-shell {
    padding: 20px 14px;
  }

  .review-detail-popup-head {
    display: grid;
  }
}

@media (max-width: 1100px) {
  #productListFilter {
    grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px);
  }

  #productListFilter .filter-search,
  #productListFilter .product-status-filter,
  #productListFilter .product-category-filter,
  #productListFilter .product-bulk-delete,
  #productListFilter .product-order-help {
    grid-column: auto;
    grid-row: auto;
  }

  #productListFilter .product-order-help {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  #productListFilter {
    grid-template-columns: 1fr;
  }

  #productListFilter .product-order-help {
    grid-column: 1;
  }
}

input:focus,
textarea:focus {
  border-color: var(--dark);
  box-shadow: var(--shadow-sm);
}

.button {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0 14px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.button.primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.button.secondary {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink);
}

.button.ghost {
  border-color: transparent;
  background: var(--card);
  color: var(--muted-foreground);
}

.button:hover,
.icon-button:hover,
.text-button:hover {
  filter: brightness(0.97);
}

.product-name-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.product-name-link:hover,
.product-name-link:focus-visible {
  color: var(--foreground);
  text-decoration-color: currentColor;
}

.product-name-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.product-list-table {
  min-width: 780px;
  table-layout: auto;
}

.product-list-table .product-name-column {
  min-width: 240px;
}

.product-list-table .product-price-column,
.product-list-table .product-price-cell,
.product-list-table .product-stock-column,
.product-list-table .product-stock-cell {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.product-list-table .product-price-column,
.product-list-table .product-price-cell {
  min-width: 86px;
}

.product-list-table .product-stock-column,
.product-list-table .product-stock-cell {
  min-width: 62px;
}

.product-list-table .product-display-status-column,
.product-list-table .product-display-status-cell {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
}

.product-list-table .product-stock-cell input {
  text-align: right;
}

.product-list-table .product-display-status-select {
  width: auto;
  min-width: 0;
  height: auto;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: var(--weight-bold);
  cursor: pointer;
}

.product-list-table .product-display-status-select.is-visible {
  color: var(--success-foreground);
}

.product-list-table .product-display-status-select.is-hidden {
  color: var(--muted-foreground);
}

.product-list-table .product-display-status-select:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.product-list-table .product-name-cell {
  min-width: 0;
}

.product-list-table .product-name-cell .product-name-link {
  min-width: 0;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-list-thumbnail {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 7px;
  line-height: 1;
  text-align: center;
}

.product-list-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-list-thumbnail.is-load-error {
  color: var(--foreground);
  font-weight: var(--weight-bold);
}

.product-name-actions.has-thumbnail-error {
  border: 1px solid color-mix(in oklab, var(--destructive) 18%, transparent);
  border-radius: var(--radius);
  background: var(--destructive-soft);
  color: var(--destructive-soft-foreground);
  margin: -5px -7px;
  padding: 4px 6px;
}

.product-option-lines {
  display: grid;
  gap: 2px;
}

.product-option-lines > span {
  display: block;
  white-space: nowrap;
}

.product-order-help {
  color: var(--muted-foreground);
  font-size: 12px;
}

.product-order-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: grab;
  user-select: none;
}

.product-order-handle:hover {
  background: var(--card);
  color: var(--ink);
}

.product-order-row.is-dragging {
  opacity: 0.45;
}

.editable-cell.low-stock {
  color: var(--foreground);
  font-weight: 800;
}

.product-select-column {
  width: 52px;
  text-align: center;
}

.table-checkbox-label {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: inherit;
  cursor: pointer;
}

.table-checkbox-label input,
.product-select-column input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.button.danger,
.product-bulk-delete {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.button.danger:hover,
.product-bulk-delete:hover {
  border-color: var(--border);
  background: var(--card);
}

.product-duplicate-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--card);
  color: var(--muted-foreground);
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
}

.product-duplicate-button:hover,
.product-duplicate-button:focus-visible {
  border-color: var(--border);
  color: var(--foreground);
}

.admin-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 288px;
  flex-direction: column;
  background: var(--primary);
  color: var(--primary-foreground);
}

.sidebar-head {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-link strong,
.logo-link small {
  display: block;
}

.logo-link strong {
  font-size: 13px;
  letter-spacing: 0.14em;
}

.logo-link small {
  color: var(--foreground);
  font-size: 11px;
}

.nav-list {
  flex: 1;
  overflow-y: auto;
  background: var(--dark);
  padding: 14px 12px 20px;
  scrollbar-color: var(--foreground) var(--foreground);
  scrollbar-width: thin;
}

.nav-list::-webkit-scrollbar {
  width: 10px;
}

.nav-list::-webkit-scrollbar-track,
.nav-list::-webkit-scrollbar-corner {
  background: var(--card);
}

.nav-list::-webkit-scrollbar-thumb {
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}

.sidebar-footer {
  margin-top: 22px;
  border-top: 1px solid var(--border);
  background: transparent;
  padding: 14px 0 0;
}

.sidebar-logout-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--dark);
  cursor: pointer;
  font: inherit;
  font-weight: var(--weight-medium);
  padding: 0 10px;
  text-align: left;
}

.sidebar-logout-button:hover,
.sidebar-logout-button:focus-visible {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
  filter: brightness(0.94);
}

.admin-mobile-menu-button {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 22;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.admin-layout > .admin-sidebar-toggle {
  display: none;
}

.nav-group {
  margin-top: 18px;
}

.nav-group p {
  margin: 0 0 8px;
  padding: 0 10px;
  color: var(--foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  font-weight: var(--weight-medium);
  padding: 0 10px;
  text-align: left;
}

.nav-item.active {
  background: var(--card);
  color: var(--dark);
}

.nav-item:hover:not(.active) {
  background: var(--card);
  color: var(--foreground);
}

.nav-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.nav-caret {
  width: 7px;
  height: 7px;
  margin-left: auto;
  transform: rotate(-45deg);
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.75;
  transition: transform 0.15s ease;
}

.nav-parent.active .nav-caret,
.nav-parent.expanded .nav-caret {
  transform: rotate(45deg);
}

.nav-submenu {
  display: none;
  gap: 3px;
  margin: 4px 0 8px 32px;
}

.nav-submenu.open {
  display: grid;
}

.nav-subitem {
  display: block;
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 13px;
  font-weight: var(--weight-medium);
  padding: 7px 10px;
}

.nav-subitem:hover,
.nav-subitem.active {
  background: var(--card);
  color: var(--foreground);
}

.nav-subitem.disabled {
  color: var(--foreground);
  cursor: default;
  pointer-events: none;
}

.workspace {
  min-height: 100vh;
  padding-left: 288px;
}

@media (min-width: 1025px) {
  .sidebar {
    width: 260px;
    transition: transform 180ms ease;
  }

  .workspace {
    padding-left: 260px;
    transition: padding-left 180ms ease;
  }

  .sidebar .logo-link,
  .sidebar .nav-item,
  .sidebar .nav-subitem,
  .sidebar .nav-group p {
    white-space: nowrap;
  }

  .admin-layout > .admin-sidebar-toggle {
    position: fixed;
    top: 16px;
    left: 216px;
    z-index: 35;
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-color: var(--border);
    background: var(--card);
    color: var(--foreground);
    font-size: 22px;
    line-height: 1;
    transition: left 180ms ease, background-color 180ms ease, color 180ms ease;
  }

  body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }

  body.sidebar-collapsed .workspace {
    padding-left: 0;
  }

  body.sidebar-collapsed .admin-sidebar-toggle {
    left: 12px;
    border-color: var(--line);
    background: var(--card);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  padding: 0 24px;
}

.topbar-title {
  min-width: 0;
  flex: 1;
}

.topbar-title span {
  display: block;
  color: var(--muted-foreground);
  font-size: 12px;
}

.topbar-title h1 {
  margin: 0;
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-box {
  display: flex;
  width: min(420px, 42vw);
  min-width: 280px;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 10px;
}

.search-box span {
  flex: 0 0 auto;
  color: var(--muted-foreground);
  font-size: 12px;
  white-space: nowrap;
}

.search-box input {
  min-width: 0;
  min-height: 0;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.content {
  width: 100%;
  max-width: calc(var(--content-max) + (var(--page-gutter) * 2));
  margin-inline: auto;
  padding: var(--space-section) var(--page-gutter) 48px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-head > div,
.page-head h2,
.page-head p,
.button-row {
  min-width: 0;
}

.page-head h2,
.topbar-title h1,
.panel-head h3 {
  font-weight: var(--weight-bold);
  line-height: 1.25;
  word-break: keep-all;
}

.page-head p,
.panel-head,
.builder-form label,
.form-help,
.policy-note {
  overflow-wrap: anywhere;
}

.content > .page-head .eyebrow {
  display: none;
}

.page-head p:last-child {
  margin: 10px 0 0;
  color: var(--muted-foreground);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  margin-bottom: 0;
}

.metric-grid.compact.coupon-issue-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding-block: 12px;
}

.coupon-issue-metrics .metric-card {
  min-height: 76px;
  align-content: center;
  gap: 4px;
  padding: 12px 14px;
}

.coupon-issue-metrics .metric-card strong {
  font-size: 24px;
}

.coupon-issue-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.coupon-issue-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.coupon-issue-search-grid {
  grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 1.4fr) auto auto;
}

.coupon-issue-file-grid {
  grid-template-columns: minmax(280px, 1fr) auto;
}

.coupon-issue-form .policy-note {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.metric-card span,
.metric-card small {
  color: var(--muted-foreground);
}

.metric-card strong {
  font-size: 28px;
}

.metric-card.blue {
  border-top: 1px solid var(--border);
}

.metric-card.green {
  border-top: 1px solid var(--border);
}

.metric-card.amber {
  border-top: 1px solid var(--border);
}

.metric-card.red {
  border-top: 1px solid var(--border);
}

.dashboard-grid,
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.section-grid.single {
  grid-template-columns: 1fr;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.panel-head a,
.text-button {
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  font-weight: var(--weight-medium);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.reward-adjustment-form {
  display: grid;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  padding: 20px;
}

.reward-adjustment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.reward-adjustment-heading > div,
.reward-adjustment-form label {
  display: grid;
  gap: 6px;
}

.reward-adjustment-heading strong {
  color: var(--ink);
  font-size: 15px;
}

.reward-adjustment-heading span,
.reward-adjustment-help,
.reward-adjustment-form label small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.reward-adjustment-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(120px, 0.7fr) minmax(150px, 0.8fr) minmax(190px, 1fr);
  align-items: end;
  gap: 12px;
}

.reward-adjustment-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.reward-adjustment-form input,
.reward-adjustment-form select {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.reward-reason-field {
  grid-column: 1 / span 3;
}

.reward-adjustment-help {
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .metric-grid.compact.coupon-issue-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .coupon-issue-search-grid,
  .coupon-issue-file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coupon-issue-search-grid > .button,
  .coupon-issue-file-grid > .button {
    width: 100%;
  }

  .reward-adjustment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reward-reason-field,
  .reward-adjustment-grid > .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .metric-grid.compact.coupon-issue-metrics,
  .coupon-issue-search-grid,
  .coupon-issue-file-grid {
    grid-template-columns: 1fr;
  }

  .reward-adjustment-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .reward-adjustment-grid {
    grid-template-columns: 1fr;
  }

  .reward-reason-field,
  .reward-adjustment-grid > .button {
    grid-column: auto;
  }
}

.delivery-settings-editor {
  display: grid;
  gap: 0;
}

.delivery-settings-section {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.delivery-settings-heading {
  display: grid;
  gap: 5px;
}

.delivery-settings-heading strong {
  font-size: 16px;
}

.delivery-settings-heading span,
.delivery-settings-actions p,
.delivery-settings-editor label small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.delivery-fee-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.delivery-settings-editor label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.delivery-settings-editor input,
.delivery-settings-editor textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 11px 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  line-height: 1.65;
  resize: vertical;
}

.delivery-settings-editor textarea:focus,
.delivery-settings-editor input:focus {
  border-color: var(--foreground);
  outline: 3px solid var(--ring);
}

.won-input {
  position: relative;
}

.won-input input {
  padding-right: 38px;
}

.won-input em {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-style: normal;
  transform: translateY(-50%);
}

.percent-input {
  position: relative;
}

.percent-input input {
  padding-right: 34px;
}

.percent-input em {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-style: normal;
  transform: translateY(-50%);
}

[data-point-earning-rate-field].is-disabled > span {
  color: var(--muted-foreground);
}

[data-point-earning-rate-field].is-disabled .percent-input input {
  border-color: var(--line);
  background: var(--card);
  color: var(--foreground);
  cursor: not-allowed;
}

[data-point-earning-rate-field].is-disabled .percent-input em {
  color: var(--foreground);
}

.point-earning-rate-help {
  margin-top: 5px;
  color: var(--muted-foreground);
  font-size: 10px;
  line-height: 1.45;
}

.delivery-settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  background: var(--card);
}

@media (max-width: 800px) {
  .delivery-fee-grid {
    grid-template-columns: 1fr;
  }

  .delivery-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.member-list-table {
  min-width: 980px;
  table-layout: fixed;
}

.member-list-table th:nth-child(1) { width: 18%; }
.member-list-table th:nth-child(2) { width: 14%; }
.member-list-table th:nth-child(3) { width: 15%; }
.member-list-table th:nth-child(4) { width: 19%; }
.member-list-table th:nth-child(5) { width: 13%; }
.member-list-table th:nth-child(6) { width: 11%; }
.member-list-table th:nth-child(7) { width: 10%; }

.member-list-table th,
.member-list-table td {
  padding: 12px 10px;
}

.member-list-summary,
.member-list-login-summary,
.member-list-contact-summary,
.member-list-benefit-summary {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.member-list-summary strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-list-summary span,
.member-list-login-summary small,
.member-list-benefit-summary span {
  color: var(--muted-foreground);
  font-size: 11px;
}

.member-list-status-summary,
.member-list-login-summary .member-login-methods {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.member-list-status-summary .table-select {
  min-width: 82px;
  max-width: 100%;
}

.member-list-contact-summary > span:first-child,
.member-list-memo {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-list-memo {
  max-width: 100%;
  color: var(--muted-foreground);
  font-size: 12px;
}

@media (max-width: 760px) {
  .member-list-table-wrap {
    overflow: visible;
  }

  .member-list-table,
  .member-list-table tbody,
  .member-list-table tr,
  .member-list-table td {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .member-list-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .member-list-table tr {
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
  }

  .member-list-table td {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    border-bottom: 0;
    padding: 6px 0;
  }

  .member-list-table td::before {
    color: var(--muted-foreground);
    content: attr(data-label);
    font-size: 11px;
    font-weight: var(--weight-bold);
  }

  .member-list-table tr.clickable-row:hover td {
    background: transparent;
  }
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 13px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

td {
  color: var(--foreground);
}

tr.clickable-row {
  cursor: pointer;
}

tr.clickable-row:hover td {
  background: var(--card);
}

.archive-draggable-row {
  cursor: grab;
}

.archive-draggable-row:active {
  cursor: grabbing;
}

.archive-draggable-row.is-dragging {
  opacity: 0.42;
}

.archive-order-cell {
  white-space: nowrap;
}

.archive-order-content {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.archive-drag-handle {
  display: inline-block;
  width: 14px;
  height: 20px;
  flex: 0 0 14px;
  border-radius: var(--radius);
  background-image: none;
  background-position: 0 0;
  background-size: 7px 7px;
  cursor: grab;
  opacity: 0.8;
}

.archive-draggable-row:active .archive-drag-handle {
  cursor: grabbing;
}

.archive-public-select {
  width: auto;
  min-width: 92px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 28px 0 10px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.inquiry-answer-history {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--card);
}

.inquiry-answer-history[hidden] {
  display: none;
}

.inquiry-answer-history h4,
.inquiry-answer-history p {
  margin: 0;
}

.inquiry-answer-history article {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.inquiry-answer-history time {
  color: var(--muted-foreground);
  font-size: 12px;
}

/* Q&A detail: question-first workspace with a focused reply flow. */
.inquiry-workspace,
.inquiry-workspace > form {
  display: grid;
  gap: 18px;
}

.inquiry-workspace {
  width: min(100%, 1180px);
  margin: 0 auto;
}

@media (min-width: 1025px) {
  .inquiry-workspace > form {
    grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
    align-items: start;
  }

  .inquiry-question-card {
    position: sticky;
    top: 84px;
  }
}

.inquiry-response-column {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.inquiry-question-card {
  padding: 24px;
}

.inquiry-question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.inquiry-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inquiry-status-badge,
.inquiry-type-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.inquiry-status-badge {
  background: var(--card);
  color: var(--foreground);
}

.inquiry-status-badge.is-answered {
  background: var(--card);
  color: var(--foreground);
}

.inquiry-type-badge {
  background: var(--card);
  color: var(--ink);
}

.inquiry-meta-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.inquiry-meta-list > span {
  display: grid;
  gap: 5px;
  padding: 0 16px;
  border-left: 1px solid var(--line);
}

.inquiry-meta-list > span:first-child {
  padding-left: 0;
  border-left: 0;
}

.inquiry-meta-list small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.inquiry-meta-list strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.inquiry-member-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}

.inquiry-member-link:hover {
  color: var(--foreground);
}

.inquiry-question-body {
  padding: 28px 4px 20px;
}

.inquiry-question-body h3 {
  margin: 0 0 20px;
  font-size: 21px;
  line-height: 1.45;
}

.inquiry-question-body div {
  min-height: 150px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.inquiry-workspace .inquiry-answer-history {
  gap: 14px;
  border-radius: var(--radius);
  background: var(--card);
  padding: 22px 24px;
}

.inquiry-workspace .inquiry-answer-history h4 {
  color: var(--foreground);
  font-size: 14px;
}

.inquiry-workspace .inquiry-answer-history article {
  padding-top: 14px;
}

.inquiry-workspace .inquiry-answer-history textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 118px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 12px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}

.inquiry-workspace .inquiry-answer-history textarea:focus {
  border-color: var(--border);
  outline: 3px solid var(--ring);
}

.inquiry-workspace .inquiry-answer-history article footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inquiry-workspace .inquiry-answer-history article footer .button {
  min-height: 36px;
  padding-inline: 12px;
}

.inquiry-answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inquiry-reply-card {
  padding-bottom: 20px;
}

.inquiry-reply-card .panel-head {
  min-height: 72px;
}

.inquiry-reply-card .panel-head p {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.inquiry-reply-field {
  display: block;
  padding: 20px 20px 12px;
}

.inquiry-reply-field textarea,
.inquiry-admin-settings textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}

.inquiry-reply-field textarea {
  min-height: 210px;
}

.inquiry-reply-field textarea:focus,
.inquiry-admin-settings textarea:focus {
  border-color: var(--foreground);
  outline: 3px solid var(--ring);
}

.inquiry-reply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
}

.inquiry-reply-actions > span {
  color: var(--muted-foreground);
  font-size: 12px;
}

.inquiry-reply-actions .button {
  min-width: 178px;
}

.inquiry-admin-settings {
  overflow: visible;
}

.inquiry-admin-settings summary {
  padding: 18px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: var(--weight-bold);
}

.inquiry-admin-settings-body {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 20px;
}

.inquiry-admin-settings-body > label:first-child {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: var(--weight-bold);
}

@media (max-width: 760px) {
  .inquiry-question-card {
    padding: 18px;
  }

  .inquiry-question-head,
  .inquiry-reply-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .inquiry-meta-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }

  .inquiry-meta-list > span:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .inquiry-question-body h3 {
    font-size: 18px;
  }

  .inquiry-reply-actions .button {
    width: 100%;
  }

  .inquiry-workspace .inquiry-answer-history article footer {
    align-items: stretch;
    flex-direction: column;
  }

  .inquiry-answer-actions .button {
    flex: 1 1 120px;
  }
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: var(--card);
  color: var(--foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
  padding: 0 9px;
}

.badge.button-badge {
  border: 0;
  cursor: pointer;
}

.badge.button-badge:disabled {
  cursor: default;
  opacity: 1;
}

.badge.status-select {
  width: auto;
  min-width: 108px;
  height: 34px;
  border: 0;
  padding: 0 30px 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

.badge.status-select:disabled {
  cursor: default;
  opacity: 1;
}

.badge.status-visible,
.badge.status-available { background: var(--card); color: var(--foreground); }
.badge.status-hidden { background: var(--card); color: var(--foreground); }
.badge.status-pending { background: var(--card); color: var(--foreground); }
.badge.status-withdrawn { background: var(--card); color: var(--foreground); }
.badge.status-sold-out { background: var(--card); color: var(--foreground); }
.badge.status-coming-soon { background: var(--card); color: var(--foreground); }

.order-status-tone {
  border-color: transparent;
  font-weight: var(--weight-bold);
}

.order-status-tone--received {
  background-color: var(--card);
  color: var(--foreground);
}

.order-status-tone--shipping {
  background-color: var(--card);
  color: var(--foreground);
}

.order-status-tone--cancel-requested {
  background-color: var(--card);
  color: var(--foreground);
}

.order-status-tone--canceled {
  background-color: var(--card);
  color: var(--foreground);
}

.order-status-tone--confirmed {
  background-color: var(--card);
  color: var(--foreground);
}

.menu-active-select {
  min-width: 92px;
}

.admin-notice {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 10000;
  min-width: 280px;
  max-width: calc(100vw - 32px);
  padding: 14px 20px;
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-notice.is-success {
  background: var(--card);
}

.admin-notice.is-error {
  background: var(--card);
}

.editor-file-field {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.editor-file-field strong {
  flex: 0 0 auto;
  font-size: 13px;
}

.editor-file-field input[type="file"] {
  min-width: 0;
  max-width: 100%;
  flex: 1 1 220px;
  min-height: auto;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
}

.archive-media-field {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
}

.archive-media-preview,
.archive-content-media-item {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(96px, 160px) minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 10px;
}

.archive-media-preview[hidden],
.archive-content-media-list[hidden] {
  display: none;
}

.archive-media-preview img,
.archive-media-preview video,
.archive-content-media-item img,
.archive-content-media-item video {
  display: block;
  width: 100%;
  height: 90px;
  border-radius: var(--radius);
  background: var(--card);
  object-fit: cover;
}

.archive-media-preview-name,
.archive-content-media-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-media-remove {
  display: inline-grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  justify-self: end;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--foreground);
  padding: 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.archive-media-remove:hover,
.archive-media-remove:focus-visible {
  border-color: var(--border);
  background: var(--card);
  outline: 0;
}

.archive-content-media-list {
  display: grid;
  gap: 8px;
}

.archive-content-media-item {
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) 34px;
}

@media (max-width: 560px) {
  .archive-media-preview,
  .archive-content-media-item {
    grid-template-columns: 96px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .archive-media-preview img,
  .archive-media-preview video,
  .archive-content-media-item img,
  .archive-content-media-item video {
    height: 72px;
  }
}

.table-select {
  min-width: 120px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 34px;
  padding: 0 34px 0 10px;
  background-position: calc(100% - 17px) 13px,
    calc(100% - 12px) 13px,
    calc(100% - 36px) 50%,
    0 0;
  background-size: 5px 5px, 5px 5px, 1px 18px, 100% 100%;
}

.table-select:disabled {
  cursor: wait;
  opacity: 0.65;
}

.editable-cell {
  cursor: text;
  min-width: 110px;
  padding: 7px 12px;
}

.editable-cell.changed {
  background: var(--card);
  font-weight: var(--weight-bold);
}

.editable-cell input {
  width: 100%;
  max-width: 112px;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 4px 8px;
}

.api-status {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.api-status.error {
  color: var(--red);
}

.product-load-error {
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.product-load-error[hidden] {
  display: none;
}

.product-load-error span {
  flex: 1;
}

.product-load-error .button {
  flex: 0 0 auto;
}

.task-list {
  display: grid;
  padding: 8px 0;
}

.task-list a {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
}

.task-list a:last-child {
  border-bottom: 0;
}

.task-list strong {
  font-size: 20px;
}

body[data-mode="dashboard"] {
  background: var(--card);
}

body[data-mode="dashboard"] .content {
  background: var(--card);
}

body[data-mode="product-create"],
body[data-mode="product-create"] .workspace,
body[data-mode="product-create"] .content {
  background: var(--card);
}

.main-content-manager {
  display: grid;
  gap: 32px;
  padding: 8px 0;
}

.main-manager-section > h3 {
  margin: 0 0 6px;
}

.main-manager-section > p {
  margin: 0 0 12px;
  color: var(--muted-foreground);
}

.main-manager-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.main-manager-section-heading h3 {
  margin: 0 0 6px;
}

.main-manager-section-heading p {
  margin: 0;
  color: var(--muted-foreground);
}

.main-banner-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.main-banner-add,
.main-banner-save-all {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
}

.main-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.main-banner-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.main-banner-table {
  min-width: 780px;
}

.main-banner-table-head,
.main-banner-row {
  display: grid;
  grid-template-columns: 64px minmax(180px, 1fr) 174px minmax(160px, 1.1fr) 128px 70px 70px;
  align-items: center;
}

.main-banner-table-head {
  height: 34px;
  min-height: 34px;
  border-bottom: 1px solid var(--line);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
}

.main-banner-table-head > span,
.main-banner-row > * {
  box-sizing: border-box;
  min-width: 0;
  padding: 6px 10px;
}

.main-banner-row {
  height: 60px;
  min-height: 60px;
  max-height: 60px;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 120ms ease, opacity 120ms ease;
}

[data-main-banner-list] > .main-banner-row:last-child {
  border-bottom: 0;
}

.main-banner-row.is-dragging {
  background: var(--muted);
  opacity: 0.58;
}

.main-banner-file-size-cell {
  display: grid;
  gap: 3px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.main-banner-order-cell,
.main-banner-media-cell,
.main-banner-public-cell,
.main-banner-actions {
  display: flex;
  align-items: center;
}

.main-banner-order-cell {
  gap: 8px;
}

.main-banner-drag-handle {
  display: inline-grid;
  width: 22px;
  height: 32px;
  flex: 0 0 22px;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: grab;
  font: inherit;
  letter-spacing: -4px;
}

.main-banner-drag-handle:active {
  cursor: grabbing;
}

.main-banner-drag-handle:disabled {
  cursor: default;
  opacity: 0.35;
}

.main-banner-order-number {
  color: var(--muted-foreground);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.main-banner-media-cell {
  gap: 10px;
}

.main-banner-size-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-banner-size-cell label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.main-banner-size-cell input {
  width: 58px;
  height: 34px;
  padding: 0 6px;
  font-size: 11px;
}

.main-banner-thumbnail {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
}

.main-banner-thumbnail img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.main-banner-thumbnail span {
  font-size: 7px;
  line-height: 1.2;
  text-align: center;
}

.main-banner-media-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.main-banner-media-copy h4 {
  overflow: hidden;
  margin: 0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-banner-upload {
  position: relative;
  display: inline-flex;
  width: fit-content;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.main-banner-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.main-banner-link-cell input {
  width: 100%;
  height: 34px;
}

.main-banner-public-cell {
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.main-banner-public-cell input {
  width: 1em;
  height: 1em;
  margin: 0;
}

.main-banner-actions {
  justify-content: flex-end;
  gap: 6px;
}

.main-banner-actions .button {
  min-height: 34px;
  padding: 0 12px;
}

.main-cutout-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.main-cutout-add-row .button {
  min-width: 120px;
}

.main-cutout-preview-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.main-cutout-preview-panel > p {
  margin: 0;
  color: var(--muted-foreground);
}

.main-cutout-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.main-cutout-preview-toolbar [role="group"] {
  display: flex;
  gap: 6px;
}

.main-cutout-preview-toolbar button {
  min-width: 72px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.main-cutout-preview-toolbar button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--foreground);
}

.main-cutout-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.main-cutout-stage[data-mode="mobile"] {
  width: min(390px, 100%);
  aspect-ratio: 390 / 844;
  margin-inline: auto;
}

.main-cutout-preview-frame {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: 1440px;
  height: 900px;
  border: 0;
  background: var(--card);
  transform: scale(var(--main-preview-scale));
  transform-origin: left top;
  pointer-events: none;
}

.main-cutout-stage[data-mode="mobile"] .main-cutout-preview-frame {
  width: 390px;
  height: 844px;
}

.main-cutout-preview-item {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: auto;
  min-width: 32px;
  min-height: 24px;
  border: 1px dashed transparent;
  padding: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.main-cutout-preview-item:hover,
.main-cutout-preview-item:focus-visible {
  border-color: var(--border);
  outline: 0;
}

.main-cutout-preview-item.is-dragging {
  z-index: 3;
  border-color: var(--border);
  cursor: grabbing;
}

.main-cutout-preview-item:not(.main-click-me-preview-item) {
  border-color: var(--border);
}

.main-cutout-preview-item img {
  width: auto;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.main-cutout-resize-handle {
  position: absolute;
  z-index: 2;
  width: 7px;
  height: 7px;
  border: 1px solid var(--border);
  background: var(--card);
  pointer-events: auto;
}

.main-cutout-resize-handle.is-nw {
  top: -4px;
  left: -4px;
  cursor: nwse-resize;
}

.main-cutout-resize-handle.is-ne {
  top: -4px;
  right: -4px;
  cursor: nesw-resize;
}

.main-cutout-resize-handle.is-sw {
  bottom: -4px;
  left: -4px;
  cursor: nesw-resize;
}

.main-cutout-resize-handle.is-se {
  right: -4px;
  bottom: -4px;
  cursor: nwse-resize;
}

.main-cutout-preview-save {
  justify-self: end;
}

.main-cutout-preview-save[hidden] {
  display: none;
}

.main-cutout-preview-item span {
  padding: 6px 8px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
}

.main-click-me-preview-item {
  min-width: calc(32px * var(--main-preview-scale));
  min-height: calc(24px * var(--main-preview-scale));
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: calc(14.5px * var(--main-preview-scale));
  font-weight: 400;
  line-height: calc(18px * var(--main-preview-scale));
  transform: translate(-50%, -50%);
  text-align: left;
}

.main-click-me-preview-item span {
  padding: calc(2px * var(--main-preview-scale));
  background: var(--card);
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: inherit;
}

.main-cutout-stage[data-mode="mobile"] .main-click-me-preview-item {
  font-size: calc(17px * var(--main-preview-scale));
  line-height: calc(22px * var(--main-preview-scale));
  transform: translate(0, -50%);
}

.main-visual-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.main-visual-card.is-hidden {
  background: var(--card);
}

.main-visual-card.is-hidden .main-visual-preview {
  opacity: 0.45;
}

.main-visual-card.is-partially-hidden .main-visual-preview {
  opacity: 0.72;
}

.main-cutout-link-setting {
  display: grid;
  gap: 8px;
}

.main-cutout-link-toggle {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  font: inherit;
  font-weight: 600;
}

.main-cutout-link-toggle span {
  order: 0;
}

.main-cutout-link-toggle input {
  order: 1;
}

.main-cutout-link-toggle input {
  width: 1em;
  height: 1em;
  margin: 0;
}

.main-visual-fields .main-cutout-link-toggle {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  grid-template-columns: none;
  white-space: nowrap;
}

.main-cutout-link-setting > input {
  width: 100%;
}

.main-visual-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  font: inherit;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.main-visual-close:hover,
.main-visual-close:focus-visible {
  background: var(--card);
}

.main-visual-preview {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted-foreground);
}

.main-visual-preview img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: contain;
}

/* Banner rows stay compact and expose the complete list without an inner scroller. */
.main-banner-table-wrap {
  overflow: visible;
}

.main-banner-table {
  width: 100%;
  min-width: 0;
}

@media (max-width: 1140px) {
  .main-banner-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .main-banner-table {
    min-width: 846px;
  }
}

.main-visual-preview.main-banner-thumbnail {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  flex: 0 0 44px;
}

.main-visual-preview.main-banner-thumbnail img {
  width: 44px;
  height: 44px;
  max-height: 44px;
  object-fit: contain;
}

.main-logo-card {
  grid-template-columns: minmax(180px, 236px) minmax(280px, 1fr);
}

.main-logo-preview-grid,
.main-logo-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.main-logo-preview {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.main-logo-preview > span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
}

.main-logo-preview > div {
  display: grid;
  height: 88px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.main-logo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-logo-preview em {
  color: var(--muted-foreground);
  font-size: 11px;
  font-style: normal;
}

.main-visual-fields,
.main-visual-fields label {
  display: grid;
  gap: 7px;
}

.main-visual-fields h4 {
  margin: 0 0 4px;
}

.main-visual-fields input[type="text"],
.main-visual-fields input[type="number"],
.main-visual-fields input[type="file"],
.main-visual-fields input[type="datetime-local"],
.main-visual-fields textarea {
  width: 100%;
}

.main-visual-fields textarea {
  min-height: 88px;
  resize: vertical;
}

.main-popup-admin-card {
  display: grid;
  grid-template-columns: 356px minmax(280px, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.main-popup-admin-preview {
  position: relative;
  isolation: isolate;
  display: flex;
  width: min(100%, 356px);
  height: var(--main-popup-preview-height, 500px);
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  padding: 24px 20px 16px;
  background-color: var(--card);
  background-image: none;
  box-shadow: var(--shadow-sm);
  color: var(--main-popup-font-color, var(--foreground));
  font-size: 15px;
  font-weight: var(--main-popup-font-weight, 400);
  user-select: none;
}

.main-popup-admin-preview::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--muted);
  content: "";
  opacity: 0.9;
  pointer-events: none;
}

.main-popup-admin-preview::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  box-shadow: var(--shadow-sm);
  content: "";
  pointer-events: none;
}

.main-popup-admin-close {
  position: absolute;
  z-index: 3;
  top: 7px;
  right: 12px;
  width: 28px;
  height: 28px;
  color: inherit;
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: inherit;
  line-height: 28px;
  text-align: center;
}

.main-popup-admin-header strong {
  display: block;
  max-width: calc(100% - 28px);
  color: inherit;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: inherit;
  line-height: 1.35;
  word-break: keep-all;
}

.main-popup-admin-copy {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  color: inherit;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: inherit;
  line-height: 1.55;
  word-break: keep-all;
}

.main-popup-admin-copy p {
  margin: 0;
  white-space: pre-line;
}

.main-popup-admin-preview .main-popup-admin-note {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

.main-popup-admin-preview [hidden] {
  display: none;
}

.main-popup-admin-actions {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: auto;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  transform: translateY(3px);
}

.main-popup-admin-actions span {
  padding: 4px 0;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: inherit;
  line-height: 20px;
  text-align: left;
}

.main-position-fields,
.main-visual-actions {
  display: flex;
  gap: 12px;
  align-items: end;
}

.main-position-fields > label {
  flex: 1;
}

.main-position-group {
  display: grid;
  gap: 8px;
}

.main-position-group > strong {
  font-size: 13px;
  font-weight: 700;
}

.main-visual-fields .check-field {
  display: flex;
  align-items: center;
  padding-bottom: 12px;
}

.main-position-fields > .main-popup-public-field {
  width: max-content;
  flex: 0 0 auto;
  gap: 7px;
  white-space: nowrap;
}

.main-cutout-visibility-setting input[type="checkbox"],
.main-banner-display-settings input[type="checkbox"],
.main-popup-public-field input[type="checkbox"] {
  width: 1em;
  height: 1em;
  min-height: 1em;
  margin: 0;
  padding: 0;
}

.main-popup-bold-field input[type="checkbox"] {
  width: 1em;
  height: 1em;
  min-height: 1em;
  margin: 0;
  padding: 0;
}

.main-popup-style-fields {
  align-items: center;
}

.main-popup-style-fields .main-popup-bold-field {
  align-items: center;
  padding-bottom: 0;
}

.main-popup-color-field input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 4px;
}

.main-popup-public-field span {
  white-space: nowrap;
}

.main-visual-hidden-field {
  width: max-content;
}

.main-visual-hidden-field span {
  white-space: nowrap;
}

.main-cutout-visibility-setting {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  border: 0;
  padding: 0;
}

.main-cutout-visibility-setting legend {
  width: 100%;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 700;
}

.main-cutout-visibility-setting .main-visual-hidden-field {
  padding-bottom: 0;
}

.main-cutout-position-summary {
  color: var(--muted-foreground);
  font-size: 12px;
}

.main-banner-display-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 16px 0;
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: var(--surface-soft);
}

.main-banner-display-settings .check-field {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.main-banner-display-settings .button {
  margin-left: auto;
}

@media (max-width: 640px) {
  .main-banner-display-settings .button {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 1100px) {
  .main-visual-grid,
  .main-visual-card,
  .main-popup-admin-card {
    grid-template-columns: 1fr;
  }

  .main-cutout-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .main-logo-preview-grid,
  .main-logo-upload-grid {
    grid-template-columns: 1fr;
  }
}

.admin-main-flow {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-main-flow li {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
  padding: 0 14px;
}

.admin-main-flow li:last-child {
  border-bottom: 0;
}

.admin-main-flow span {
  color: var(--foreground);
  font-weight: var(--weight-bold);
}

.admin-main-metrics {
  gap: 12px;
}

.admin-main-metric {
  position: relative;
  min-height: 154px;
  align-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-left-width: 1px;
  background: var(--card);
  box-shadow: none;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body[data-mode="dashboard"] .content {
  padding-top: 22px;
}

body[data-mode="dashboard"] .admin-main-metric {
  min-height: 118px;
  gap: 7px;
  padding: 14px 16px;
}

body[data-mode="dashboard"] .admin-main-metric strong {
  font-size: 32px;
}

body[data-mode="dashboard"] .admin-main-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

body[data-mode="dashboard"] .admin-main-panel .panel-head {
  min-height: 58px;
}

body[data-mode="dashboard"] .admin-main-tasks .task-list a {
  min-height: 56px;
}

body[data-mode="dashboard"] .admin-main-tasks .task-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-mode="dashboard"] .admin-main-tasks .task-list a {
  border-right: 1px solid var(--border);
  border-bottom: 0;
}

body[data-mode="dashboard"] .admin-main-tasks .task-list a:last-child {
  border-right: 0;
}

.admin-main-metric:hover {
  transform: translateY(-2px);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.admin-main-metric:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.admin-main-metric.blue {
  border-top: 1px solid var(--border);
  border-left-color: var(--border);
}

.admin-main-metric.green {
  border-top: 1px solid var(--border);
  border-left-color: var(--border);
}

.admin-main-metric.amber {
  border-top: 1px solid var(--border);
  border-left-color: var(--border);
}

.admin-main-metric.red {
  border-top: 1px solid var(--border);
  border-left-color: var(--border);
}

.admin-main-metric em {
  color: var(--foreground);
  font-style: normal;
  font-weight: var(--weight-bold);
}

.admin-main-metric span {
  color: var(--foreground);
  font-weight: var(--weight-bold);
}

.admin-main-metric strong {
  font-size: 40px;
  line-height: 1;
}

.admin-main-metric small {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: var(--card);
  color: var(--foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
  padding: 0 9px;
}

.admin-main-grid {
  align-items: start;
}

.admin-main-panel {
  border-color: var(--border);
  background: var(--card);
  box-shadow: none;
}

.admin-main-panel .panel-head {
  min-height: 72px;
  background: var(--card);
}

.admin-main-panel-label {
  margin: 0 0 3px;
  color: var(--foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.admin-main-orders thead th {
  border-bottom: 0;
  background: var(--card);
  color: var(--foreground);
}

.admin-main-orders tbody tr:last-child td {
  border-bottom: 0;
}

.admin-main-orders td {
  background: var(--card);
}

.admin-main-orders .table-wrap {
  overflow-x: visible;
}

.admin-main-orders .dashboard-recent-orders-table {
  min-width: 0;
  table-layout: fixed;
}

.dashboard-recent-orders-table th:nth-child(1) { width: 21%; }
.dashboard-recent-orders-table th:nth-child(2) { width: 16%; }
.dashboard-recent-orders-table th:nth-child(3) { width: 15%; }
.dashboard-recent-orders-table th:nth-child(4) { width: 18%; }
.dashboard-recent-orders-table th:nth-child(5) { width: 20%; }
.dashboard-recent-orders-table th:nth-child(6) { width: 10%; }

.dashboard-recent-orders-table th,
.dashboard-recent-orders-table td {
  overflow: hidden;
  padding-inline: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  body[data-mode="dashboard"] .admin-main-tasks .task-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-mode="dashboard"] .admin-main-tasks .task-list a:nth-child(2n) {
    border-right: 0;
  }

  body[data-mode="dashboard"] .admin-main-tasks .task-list a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 700px) {
  .admin-main-orders .dashboard-recent-orders-table,
  .dashboard-recent-orders-table tbody,
  .dashboard-recent-orders-table tr,
  .dashboard-recent-orders-table td {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .dashboard-recent-orders-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .dashboard-recent-orders-table tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .dashboard-recent-orders-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    padding: 10px 12px;
  }

  .dashboard-recent-orders-table td {
    display: grid;
    gap: 3px;
    border-bottom: 0;
    padding: 7px 5px;
    white-space: normal;
  }

  .dashboard-recent-orders-table td::before {
    color: var(--muted-foreground);
    content: attr(data-label);
    font-size: 10px;
    font-weight: var(--weight-bold);
  }

  .dashboard-recent-orders-table td:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  body[data-mode="dashboard"] .admin-main-tasks .task-list {
    grid-template-columns: 1fr;
  }

  body[data-mode="dashboard"] .admin-main-tasks .task-list a,
  body[data-mode="dashboard"] .admin-main-tasks .task-list a:nth-child(2n),
  body[data-mode="dashboard"] .admin-main-tasks .task-list a:nth-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  body[data-mode="dashboard"] .admin-main-tasks .task-list a:last-child {
    border-bottom: 0;
  }
}

.admin-main-tasks .task-list {
  padding: 0;
}

.admin-main-tasks .task-list a {
  min-height: 72px;
  border-bottom-color: var(--border);
  padding: 0 20px;
}

.admin-main-tasks .task-list a:hover {
  background: var(--card);
}

.admin-main-tasks .task-list span {
  min-width: 0;
  color: var(--foreground);
  font-weight: var(--weight-bold);
}

.admin-main-tasks .task-list strong {
  display: inline-flex;
  min-width: 44px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--card);
  color: var(--foreground);
  font-size: 18px;
  padding: 0 10px;
}

.product-builder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.product-action-bar,
.save-action-bar {
  position: sticky;
  top: 64px;
  z-index: 15;
  align-items: center;
  margin: -12px -8px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);

}

.product-action-bar h2,
.save-action-bar h2 { font-size: 22px; }
.product-action-bar p:last-child,
.save-action-bar p:last-child { margin-top: 5px; font-size: 12px; }
.product-action-bar .button,
.save-action-bar .button { min-height: 42px; }
.product-action-bar [data-product-save-fixed] { min-width: 124px; }

body[data-mode="product-create"] .product-action-bar {
  position: sticky;
  top: 0;
  z-index: 24;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto 22px;
  background: var(--card);
  box-shadow: none;


}

.coupon-builder {
  display: grid;
  gap: 18px;
}

/* The global label grid declaration otherwise overrides the native hidden rule. */
.coupon-builder [data-coupon-validity-panel][hidden],
.coupon-builder [data-coupon-discount-value-field][hidden],
.coupon-builder [data-percent-only][hidden] {
  display: none !important;
}

.coupon-value-input em {
  min-width: 20px;
  text-align: center;
}

.coupon-identity-field {
  align-self: start;
  align-content: start;
}

.coupon-signup-benefit-setting {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.coupon-signup-benefit-setting .form-help {
  margin: 0 0 0 24px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 400;
}

.coupon-builder label > .form-help {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
}

.coupon-valid-days-preview {
  color: var(--foreground);
  font-weight: 700;
}

.product-builder .wide {
  grid-column: 1 / -1;
}

.product-step-guide {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-step-guide li {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  border-right: 1px solid var(--line);
  padding: 9px 12px;
}

.product-step-guide li:last-child {
  border-right: 0;
}

.product-step-guide li > span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.product-step-guide li > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.product-step-guide strong,
.product-step-guide small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-step-guide strong {
  font-size: 13px;
}

.product-step-guide small {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
}

.product-base-panel,
.product-sales-panel,
.product-content-panel,
.product-image-panel,
.product-preview-panel {
  grid-column: 1 / -1;
}

.product-base-panel { order: 1; }
.product-sales-panel { order: 2; }
.product-image-panel { order: 3; }
.product-content-panel { order: 4; }

body[data-mode="product-create"] .panel {
  border-radius: var(--radius);
  box-shadow: none;
}

.product-panel-head {
  min-height: 44px;
  border-bottom-color: var(--line);
  background: var(--card);
  padding: 0 14px;
}

body[data-mode="product-create"] .product-preview-panel .panel-head {
  border-bottom-color: var(--border);
  background: var(--card);
}

.product-panel-head > div {
  min-width: 0;
}

.product-panel-head p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.product-editor-sections {
  display: contents;
}

/* Keep authoring compact while matching the storefront's 390px mobile content canvas. */
body[data-mode="product-create"] {
  --product-mobile-canvas-width: 390px;
}

body[data-mode="product-create"] .product-content-panel {
  width: 100%;
  grid-column: 2;
  grid-row: 3;
  order: 3;
  justify-self: stretch;
}

body[data-mode="product-create"] .product-content-panel .product-section-body,
body[data-mode="product-create"] .product-content-panel .description-editor,
body[data-mode="product-create"] .product-content-panel .ck.ck-editor,
body[data-mode="product-create"] .product-content-panel .ck-editor__main,
body[data-mode="product-create"] .product-content-panel .ck-editor__editable,
body[data-mode="product-create"] .product-content-panel .ck.ck-toolbar {
  min-width: 0;
  max-width: 100%;
}

body[data-mode="product-create"] .product-content-panel .ck.ck-toolbar,
body[data-mode="product-create"] .product-content-panel .ck-toolbar__items {
  flex-wrap: wrap !important;
}

body[data-mode="product-create"] .product-content-panel .ck-toolbar__items {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

body[data-mode="product-create"] .product-content-panel .ck-editor__top {
  display: none;
}

body[data-mode="product-create"] .product-image-panel {
  width: 100%;
  grid-column: 1;
  grid-row: 3;
  order: 3;
  justify-self: stretch;
}

.product-section-body {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: 14px;
}

.product-main-fields {
  align-items: start;
}

.product-category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.product-sales-primary {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(320px, 440px);
  align-items: start;
  gap: 22px;
}

.product-status-stack,
.product-sales-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.product-published-field {
  width: min(220px, 100%);
}

.product-simple-stock-row {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: flex-end;
  gap: 18px;
  border: 0;
  background: transparent;
  padding: 0;
}

.product-simple-stock-row > label {
  width: 130px;
}

.product-current-stock-status {
  display: grid;
  min-height: 38px;
  align-content: center;
  gap: 4px;
}

.product-current-stock-status span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
}

.product-current-stock-status strong {
  font-size: 15px;
}

.product-option-stock-table {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
}

.product-option-stock-table[hidden],
.product-simple-stock-row[hidden] {
  display: none;
}

.product-sales-secondary {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.product-option-mode-row {
  display: flex;
  max-width: 720px;
  align-items: center;
  gap: 12px;
}

.product-setting-label {
  flex: 0 0 auto;
  font-size: 12px;
}

.product-check-stack.horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-check-stack.horizontal .check-row {
  flex: 0 1 auto;
  min-width: 190px;
  padding: 9px 12px;
}

.product-preorder-notice {
  max-width: 720px;
}

.product-form-heading {
  display: grid;
  gap: 3px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  padding: 0 0 8px;
}

.product-form-heading strong {
  font-size: 13px;
}

.product-form-heading span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
}

.product-description-heading {
  margin-top: 2px;
}

body[data-mode="product-create"] #productBaseForm label {
  gap: 5px;
  font-size: 12px;
}

body[data-mode="product-create"] #productBaseForm input,
body[data-mode="product-create"] #productBaseForm select {
  min-height: 38px;
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

body[data-mode="product-create"] #productBaseForm textarea[name="adminMemo"] {
  min-height: 88px;
  height: 88px;
  resize: vertical;
}

body[data-mode="product-create"] .product-reference-fields {
  align-items: start;
  gap: 12px 14px;
}

body[data-mode="product-create"] .product-reference-fields textarea {
  height: 132px;
  min-height: 132px;
  max-height: 220px;
  border-color: var(--border);
  background: var(--card);
  padding: 10px 12px;
  overflow-y: auto;
  resize: vertical;
}

body[data-mode="product-create"] .product-reference-fields label {
  display: grid;
  grid-template-rows: 30px auto;
  align-content: start;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
}

body[data-mode="product-create"] .product-reference-fields label > .product-reference-field-heading {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.03em;
}

body[data-mode="product-create"] .product-reference-fields .product-visibility-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  cursor: pointer;
}

body[data-mode="product-create"] #productBaseForm .product-visibility-checkbox input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}

body[data-mode="product-create"] .product-reference-fields label > span select {
  width: auto;
  min-width: 92px;
  height: 30px;
  min-height: 30px;
  padding: 0 28px 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

body[data-mode="product-create"] .product-stock-quantity-input {
  width: 120px;
  min-width: 90px;
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
}

body[data-mode="product-create"] .product-stock-save {
  min-height: 34px;
  padding: 0 14px;
}

body[data-mode="product-create"] .description-editor {
  border: 0;
  background: transparent;
  padding: 0;
}

body[data-mode="product-create"] .product-description-editor-shell {
  width: 100%;
}

body[data-mode="product-create"] .product-image-panel .file-drop {
  width: min(360px, 100%);
  min-height: 58px;
  justify-content: flex-start;
  gap: 9px;
  margin: 0;
  padding: 8px 10px;
}

body[data-mode="product-create"] .product-description-upload {
  width: 100%;
  min-height: 68px;
  justify-content: flex-start;
  gap: 9px;
  margin: 0;
  padding: 10px 12px;
}

body[data-mode="product-create"] #productBaseForm .product-description-upload {
  gap: 9px;
}

body[data-mode="product-create"] .product-description-upload .file-drop-mark,
body[data-mode="product-create"] .product-image-panel .file-drop .file-drop-mark {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  font-size: 17px;
}

body[data-mode="product-create"] .product-description-upload .file-drop-copy,
body[data-mode="product-create"] .product-image-panel .file-drop .file-drop-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

body[data-mode="product-create"] .product-description-image-sort-list {
  display: grid;
  grid-auto-columns: minmax(130px, 150px);
  grid-auto-flow: column;
  gap: 10px;
  max-width: 560px;
  overflow-x: auto;
  margin: 10px 0;
  padding: 2px 2px 8px;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

body[data-mode="product-create"] .product-description-image-sort-list[hidden] {
  display: none;
}

body[data-mode="product-create"] .product-description-image-card {
  width: 150px;
  min-width: 0;
}

body[data-mode="product-create"] .product-description-image-card img {
  width: 100%;
  height: 150px;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--card);
}

body[data-mode="product-create"] .product-description-image-order {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 700px) {
  body[data-mode="product-create"] .product-description-upload,
  body[data-mode="product-create"] .product-image-panel .file-drop {
    width: 100%;
  }

  body[data-mode="product-create"] .product-description-image-sort-list {
    grid-auto-columns: auto;
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    max-height: 430px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 5px;
  }

  body[data-mode="product-create"] .product-description-image-card {
    width: 100%;
  }

  body[data-mode="product-create"] .product-description-image-card img {
    width: 100%;
    height: 150px;
  }
}

body[data-mode="product-create"] .product-main-fields {
  gap: 12px 14px;
}

body[data-mode="product-create"] .description-mode-tabs {
  margin-bottom: -2px;
}

body[data-mode="product-create"] .description-editor .ck-editor__editable_inline,
body[data-mode="product-create"] #productDescriptionEditor,
body[data-mode="product-create"] .html-source-panel textarea {
  height: clamp(520px, 68vh, 820px);
  min-height: 520px;
  max-height: none;
  overflow-y: auto;
  resize: vertical;
}

.product-check-stack {
  display: grid;
  gap: 8px;
}

[data-preorder-notice][hidden] {
  display: none !important;
}

.product-operating-choice-field {
  display: grid;
  gap: 6px;
  margin: 0;
  border: 0;
  padding: 0;
}

.product-operating-choice-field legend {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.product-operating-choices {
  display: grid;
  gap: 6px;
}

.product-operating-choices.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-operating-choices.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-mode="product-create"] .product-operating-choices label {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  padding: 0 8px;
  text-align: center;
}

body[data-mode="product-create"] .product-operating-choices label:has(input:checked) {
  border-color: var(--dark);
  background: var(--primary);
  color: var(--primary-foreground);
}

body[data-mode="product-create"] .product-operating-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.product-operating-choices span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-check-stack .check-row {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 12px;
}

body[data-mode="product-create"] .product-check-stack.horizontal .check-row {
  width: auto;
  min-width: 0;
  min-height: 32px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0 4px;
}

.product-save-area {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding-top: 10px;
}

.product-save-area p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.product-category-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: stretch;
}

.product-category-picker,
.product-category-selection {
  display: flex;
  height: 232px;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border: 0;
  margin: 0;
  padding: 10px 12px;
}

.product-category-picker {
  border-right: 1px solid var(--line);
}

.product-category-picker:disabled {
  color: inherit;
}

.product-category-selection { background: transparent; }

.product-category-section-head {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.product-category-section-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.product-category-section-head strong {
  font-size: 14px;
}

.product-category-section-head span,
.product-category-save-area p {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.product-category-section-head .product-category-count {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--card);
  padding: 5px 9px;
  color: var(--ink);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.product-category-list {
  display: block;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 4px;
}

.product-category-list > .empty-note,
.product-category-selected-list > .empty-note {
  align-self: center;
  margin: 0;
  padding: 18px 10px;
  text-align: center;
}

.product-category-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.product-category-group h4 {
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  padding: 9px 12px;
  font-size: 12px;
}

.product-category-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 0;
}

.product-category-option {
  display: flex;
  height: 34px;
  min-height: 34px;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  padding: 0 8px;
}

.product-category-option:hover {
  background: var(--card);
}

.product-category-option input {
  width: 16px;
  min-height: 16px;
  flex: 0 0 16px;
}

.product-category-picker:disabled .product-category-option {
  cursor: not-allowed;
  opacity: 0.55;
}

.product-category-selected-list {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 4px;
}

.product-category-selected-item {
  display: flex;
  height: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  padding: 0 8px;
}

.product-category-selected-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-category-remove {
  display: inline-flex;
  width: 24px;
  height: 24px;
  min-height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  padding: 0 0 2px;
  font-size: 18px;
  line-height: 1;
}

.product-category-remove:hover {
  border-color: var(--dark);
  background: var(--primary);
  color: var(--primary-foreground);
}

.product-category-remove:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.product-category-save-area {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding-top: 16px;
}

.product-category-save-area p {
  margin: 0;
}

.product-category-save-area .button {
  width: 100%;
  min-height: 46px;
}

.product-preview-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 18px;
  color: var(--muted-foreground);
}

.product-preview-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.product-image-panel .image-manager {
  padding: 20px;
}

.product-image-managers {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, 422px));
  align-items: stretch;
  justify-content: center;
  gap: 18px;
  padding: 20px;
}

.product-image-managers .image-manager {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-self: stretch;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px;
}

.product-image-managers h4 {
  margin: 0;
  font-size: 15px;
}

.product-image-manager-head {
  display: grid;
  align-content: start;
  gap: 4px;
}

.product-image-manager-head p {
  min-height: 34px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.5;
}

.hover-image-manager .image-sort-list {
  grid-template-columns: minmax(220px, 1fr);
}

@media (max-width: 1000px) {
  .product-image-managers {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .product-builder {
    grid-template-columns: 1fr;
  }

  body[data-mode="product-create"] .product-image-panel,
  body[data-mode="product-create"] .product-content-panel {
    width: 100%;
    grid-column: 1;
  }

  body[data-mode="product-create"] .product-image-panel {
    grid-row: 3;
    order: 3;
  }

  body[data-mode="product-create"] .product-content-panel {
    grid-row: 4;
    order: 4;
  }
}

.product-image-panel .file-drop {
  min-height: 96px;
  gap: 12px;
}

body[data-mode="product-create"] .product-image-panel .image-manager > .file-drop {
  width: 100%;
  min-height: 82px;
}

.product-image-panel .image-sort-list {
  grid-template-columns: repeat(auto-fill, minmax(130px, 160px));
  align-content: start;
  align-items: start;
  gap: 12px;
  margin: 0 0 12px;
}

.product-image-panel .image-sort-list .image-card {
  align-self: start;
}

.product-image-panel .image-card img {
  width: 100%;
  height: 150px;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--card);
}

.product-image-panel .hover-image-manager .image-sort-list {
  grid-template-columns: minmax(130px, 160px);
}

body[data-mode="product-create"] .product-image-managers .hover-image-manager {
  grid-template-rows: auto auto auto;
  align-self: start;
  align-content: start;
}

.product-unsaved-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow-sm);
}

.product-unsaved-dialog::backdrop {
  background: var(--card);

}

.product-unsaved-dialog-copy {
  display: grid;
  gap: 8px;
  padding: 26px 26px 20px;
}

.product-unsaved-dialog-copy strong {
  font-size: 18px;
}

.product-unsaved-dialog-copy p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.product-unsaved-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 16px 20px;
}

.file-drop-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
}

.file-drop-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.file-drop-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.file-drop-copy small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.product-option-panel {
  grid-column: 1;
}

.product-detail-panel {
  grid-column: 2;
}

.product-option-mode-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  border: 0;
  padding: 22px;
}

.product-option-mode-choice {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  padding: 16px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.product-option-mode-choice:hover {
  border-color: var(--border);
}

.product-option-mode-choice.is-selected {
  border-color: var(--dark);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.product-option-mode-choice input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 2px 0 0;
  accent-color: var(--dark);
}

.product-option-mode-choice > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.product-option-mode-choice strong {
  font-size: 14px;
}

.product-option-mode-choice small {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.55;
}

.product-option-mode-choices.compact {
  width: min(430px, 100%);
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
  padding: 0;
}

.product-option-mode-choices.compact .product-option-mode-choice {
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 8px 10px;
}

.product-option-mode-choices.compact .product-option-mode-choice > span {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.product-option-mode-choices.compact .product-option-mode-choice strong {
  font-size: 12px;
}

.product-option-mode-choices.compact .product-option-mode-choice small {
  font-size: 10px;
  line-height: 1.3;
}

.product-sales-secondary .option-mode-warning {
  max-width: 720px;
  margin: 0;
}

.product-option-inline {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 12px;
  margin-top: 2px;
}

.product-option-inline[hidden] {
  display: none;
}

[data-option-detail-cancel][hidden] {
  display: none !important;
}

[data-option-cancel][hidden] {
  display: none !important;
}

.product-option-inline-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.product-option-inline-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
}

.product-option-inline-head > strong {
  font-size: 13px;
}

.product-option-relationship {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 12px 14px;
}

.product-option-relationship-summary {
  display: grid;
  gap: 3px;
}

.product-option-relationship-summary span,
.product-option-step-heading small,
.product-detail-actions p,
.product-option-stock-guide p {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.5;
}

.product-option-relationship-summary strong {
  font-size: 13px;
}

.product-option-relationship ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-option-relationship li {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.product-option-relationship li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -15px;
  color: var(--foreground);
  content: '→';
  transform: translateY(-50%);
}

.product-option-relationship li > span,
.product-option-step-heading > span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 700;
}

.product-option-relationship li > div,
.product-option-step-heading > div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.product-option-relationship li strong,
.product-option-step-heading strong {
  font-size: 12px;
}

.product-option-relationship li small {
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-option-step-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.product-option-value-section {
  min-width: 0;
}

.product-option-inline .builder-list-item {
  min-height: 48px;
  gap: 10px;
  padding: 6px 10px;
}

.builder-list-copy {
  display: grid;
  gap: 2px;
}

.builder-list-actions,
.option-detail-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.danger-text-button {
  color: var(--foreground);
}

.product-option-stock-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card);
  padding: 10px 12px;
}

.product-option-stock-guide strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.product-option-stock-guide p,
.product-detail-actions p {
  margin: 0;
}

.product-option-stock-guide .is-error,
.api-status.is-error {
  color: var(--foreground);
}

.product-option-inline .builder-form {
  margin: 0;
  border: 0;
  padding: 12px;
}

.product-option-form .button-row .button {
  width: auto;
  min-width: 0;
  flex: 1 1 0;
}

.product-option-inline .builder-list {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
}

.product-option-inline .table-wrap {
  border-top: 1px solid var(--line);
}

.product-sales-body {
  gap: 12px;
}

.product-settings-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.product-settings-card {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto auto;
  align-self: start;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 12px;
}

.product-settings-card-head,
.product-settings-section-head {
  display: grid;
  gap: 2px;
}

.product-settings-card-head h4,
.product-settings-section-head h4 {
  margin: 0;
}

.product-settings-card-head p,
.product-settings-section-head p {
  margin: 0;
  color: var(--muted-foreground);
}

.product-settings-card-body {
  display: flex;
  min-width: 0;
  align-self: start;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}

.product-settings-card .product-published-field {
  width: 100%;
}

.product-published-datetime {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(92px, 0.65fr);
  gap: 6px;
}

.product-published-datetime label,
.product-published-datetime input,
.product-published-datetime select {
  width: 100%;
  min-width: 0;
}

.product-published-schedule {
  display: grid;
  gap: 8px;
}

.product-published-toggle {
  color: var(--ink);
  cursor: pointer;
}

body[data-mode="product-create"] #productBaseForm .product-published-toggle input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--dark);
}

.product-settings-card .product-simple-stock-row {
  display: flex;
  width: 100%;
  max-width: 320px;
  align-items: flex-end;
  gap: 10px;
}

.product-settings-card .product-simple-stock-row > label {
  width: min(150px, 100%);
}

body[data-mode="product-create"] .product-settings-card .product-stock-quantity-input {
  width: 100%;
}

body[data-mode="product-create"] .product-option-mode-choice > span {
  display: flex;
  align-items: center;
}

body[data-mode="product-create"] .table-wrap.compact .product-option-value-table {
  width: 100%;
  min-width: 500px;
  table-layout: fixed;
}

body[data-mode="product-create"] .product-option-value-table th,
body[data-mode="product-create"] .product-option-value-table td {
  width: auto;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
}

body[data-mode="product-create"] .product-option-value-table th:nth-child(1),
body[data-mode="product-create"] .product-option-value-table td:nth-child(1) {
  width: 18%;
}

body[data-mode="product-create"] .product-option-value-table th:nth-child(2),
body[data-mode="product-create"] .product-option-value-table td:nth-child(2) {
  width: 22%;
}

body[data-mode="product-create"] .product-option-value-table th:nth-child(3),
body[data-mode="product-create"] .product-option-value-table td:nth-child(3) {
  width: 16%;
}

body[data-mode="product-create"] .product-option-value-table th:nth-child(4),
body[data-mode="product-create"] .product-option-value-table td:nth-child(4) {
  width: 20%;
}

body[data-mode="product-create"] .product-option-value-table th:nth-child(5),
body[data-mode="product-create"] .product-option-value-table td:nth-child(5) {
  width: 24%;
}

body[data-mode="product-create"] .product-option-value-table-wrap {
  overflow-x: auto;
}

body[data-mode="product-create"] .product-stock-order-column,
body[data-mode="product-create"] .product-stock-order-cell {
  width: 42px;
  min-width: 42px;
  padding-left: 8px;
  padding-right: 4px;
  text-align: center;
}

.product-stock-drag-handle {
  display: inline-flex;
  width: 28px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: grab;
  font-size: 16px;
  line-height: 1;
  touch-action: none;
}

.product-stock-drag-handle:active {
  cursor: grabbing;
}

#productStockList tr.is-dragging {
  opacity: 0.45;
}

#productStockList tr.is-drag-over {
  box-shadow: var(--shadow-sm);
}

.product-stock-status-badge {
  display: inline-flex;
  min-width: 74px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--card);
  color: var(--foreground);
  padding: 0 11px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.product-stock-status-badge.is-sold-out {
  background: var(--card);
  color: var(--foreground);
}

.product-published-schedule[hidden],
.product-published-field[hidden],
.product-preview-overlay[hidden] {
  display: none !important;
}

.product-published-field small {
  color: var(--muted-foreground);
  font-size: 10px;
  line-height: 1.45;
}

body.product-preview-open {
  overflow: hidden;
}

.product-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--card);
}

.product-preview-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  padding: 12px 20px;
  box-shadow: var(--shadow-sm);

}

.product-preview-toolbar-title {
  display: grid;
  gap: 2px;
}

.product-preview-toolbar-title strong {
  font-size: 16px;
}

.product-preview-toolbar-title span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
}

.product-preview-toolbar-title span.is-error {
  color: var(--foreground);
}

.product-preview-toolbar-actions,
.product-preview-device-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-preview-device-switch {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 3px;
}

.product-preview-device-switch button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 700;
}

.product-preview-device-switch button.is-active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.product-preview-stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px 24px 28px;
}

.product-preview-device {
  width: 1440px;
  height: calc(100vh - 120px);
  min-height: 680px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
  transition: width 180ms ease, border-radius 180ms ease;
}

.product-preview-overlay[data-device="mobile"] .product-preview-device {
  width: 390px;
  min-height: 720px;
  border-radius: var(--radius);
}

.product-preview-device iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--card);
}

@media (max-width: 760px) {
  .product-preview-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 12px;
  }

  .product-preview-toolbar-actions {
    flex-wrap: wrap;
  }

  .product-preview-device-switch {
    flex: 1 1 100%;
  }

  .product-preview-device-switch button {
    flex: 1 1 0;
  }

  .product-preview-stage {
    padding: 12px;
  }
}

.product-settings-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 12px;
}

.product-options-settings .product-option-mode-choices.compact {
  width: min(560px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-options-settings .product-option-mode-choice {
  min-height: 62px;
  align-items: center;
  padding: 10px 12px;
}

.product-options-settings .product-option-mode-choice > span {
  display: grid;
  align-items: initial;
  gap: 2px;
}

.product-operation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
}

.product-operation-item {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.product-operation-card {
  display: flex;
  min-height: 68px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  padding: 11px 12px;
}

.product-operation-card:has(input:checked) {
  border-color: var(--dark);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.product-operation-card input {
  width: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 2px 0 0;
  accent-color: var(--dark);
}

.product-operation-card > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.product-operation-card small {
  line-height: 1.4;
}

.product-operation-item .product-preorder-notice {
  width: 100%;
  max-width: none;
  border-radius: var(--radius);
  background: var(--card);
  padding: 10px;
}

.product-operation-item .product-preorder-notice textarea {
  min-height: 82px;
  resize: vertical;
}

.option-mode-warning {
  margin: -4px 22px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  padding: 11px 13px;
  font-size: 12px;
  font-weight: 600;
}

.product-option-form .button {
  width: 100%;
  min-height: 42px;
}

.product-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.product-detail-actions .button {
  min-width: 128px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.builder-form {
  display: grid;
  min-width: 0;
  gap: 16px;
  padding: 18px;
}

.form-grid {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.builder-form > *,
.form-grid > *,
.product-base-main > *,
.product-base-settings > *,
.product-category-picker > *,
.product-category-selection > * {
  min-width: 0;
  max-width: 100%;
}

.builder-form input,
.builder-form select,
.builder-form textarea,
.editor-file-field input[type="file"],
.archive-media-field input[type="file"] {
  max-width: 100%;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.check-row {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.check-row input {
  width: 16px;
  min-height: 16px;
}

.inline-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.segmented-field {
  display: inline-flex;
  width: fit-content;
  flex-wrap: wrap;
  gap: 6px;
  border: 0;
  margin: 0;
  padding: 0;
}

.segmented-field legend {
  width: 100%;
  margin-bottom: 2px;
  color: var(--foreground);
  font-weight: 700;
}

.segmented-field label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 12px;
}

.segmented-field input {
  width: 15px;
  min-height: 15px;
}

.archive-visibility-field label {
  min-width: 96px;
  justify-content: center;
  cursor: pointer;
}

.archive-visibility-field label:has(input:checked) {
  border-color: var(--dark);
  background: var(--primary);
  color: var(--primary-foreground);
}

.archive-visibility-field label:has(input:focus-visible) {
  box-shadow: var(--shadow-sm);
}

.builder-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 14px 18px 18px;
}

.menu-builder {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.menu-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0 14px 14px;
}

.standalone-form {
  border: 0;
  border-radius: 0;
}

.menu-parent-row {
  cursor: pointer;
}

.menu-parent-row:hover td {
  background: var(--card);
}

.menu-child-row td:first-child {
  padding-left: 28px;
}

.menu-drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: grab;
  user-select: none;
}

.menu-drag-handle:hover {
  background: var(--card);
  color: var(--ink);
}

.menu-drag-handle:active {
  cursor: grabbing;
}

.menu-child-row.is-dragging {
  opacity: 0.42;
}

.menu-child-form-row td {
  background: var(--card);
  padding: 12px 18px;
}

.inline-menu-form {
  margin: 0;
  border-style: dashed;
  background: var(--card);
}

.menu-product-button {
  margin-left: 10px;
}

.menu-name-edit-button {
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}

.menu-name-edit-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.menu-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.menu-name-cell[hidden] {
  display: none;
}

.menu-name-pencil-button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  background: transparent;
  cursor: pointer;
}

.menu-name-pencil-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.menu-name-pencil-button:hover,
.menu-name-pencil-button:focus-visible {
  color: var(--ink);
  border-color: var(--line);
  background: var(--card);
}

.menu-name-inline-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  width: min(100%, 430px);
}

.menu-name-inline-form input {
  min-width: 0;
  height: 38px;
  padding: 8px 11px;
}

.menu-name-inline-form .button {
  min-height: 38px;
  padding: 8px 13px;
}

.menu-product-manager-row td {
  background: var(--card);
  padding: 12px 18px;
}

.menu-product-manager {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.menu-product-manager .panel-head.flat {
  align-items: center;
  justify-content: flex-end;
}

.menu-product-manager-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-product-manager-actions .button {
  min-height: 34px;
  padding: 0 12px;
}

.menu-product-list-section {
  padding: 14px;
}

.menu-product-list-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
}

.menu-product-list-head,
.menu-product-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 12px;
}

.menu-product-list-head {
  min-height: 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
}

.menu-product-list {
  gap: 0;
}

.menu-product-list .menu-product-item {
  display: grid;
  min-height: 68px;
  justify-content: stretch;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.menu-product-list .menu-product-item > .menu-product-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.menu-product-identity .product-name-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-product-stock-status {
  width: max-content;
  min-width: 72px;
  justify-self: start;
  text-align: center;
}

.menu-product-drag-handle {
  display: inline-flex;
  width: 30px;
  min-width: 30px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: grab;
  font-size: 15px;
}

.menu-product-drag-handle:active {
  cursor: grabbing;
}

.menu-product-item.is-dragging {
  opacity: 0.45;
}

@media (max-width: 800px) {
  .menu-product-manager .panel-head.flat,
  .menu-product-manager-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .menu-product-list-head,
  .menu-product-item {
    grid-template-columns: 32px minmax(0, 1fr) 84px;
    gap: 8px;
  }
}

.inline-sort {
  display: inline-flex;
  width: 112px;
  min-width: 112px;
  gap: 6px;
  align-items: center;
}

.inline-sort span {
  color: var(--muted-foreground);
  font-size: 11px;
}

.inline-sort input {
  width: 64px;
  min-height: 30px;
  padding: 4px 7px;
}

.product-check-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-head.flat {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.product-check-list {
  display: grid;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
}

.policy-note {
  margin: 0;
  color: var(--muted-foreground);
  padding: 14px 18px;
  font-weight: 700;
}

.product-check-item {
  display: flex;
  min-height: 38px;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 0 8px;
}

.product-check-item:hover {
  background: var(--card);
}

.product-check-item input {
  width: 16px;
  min-height: 16px;
}

.builder-list-item {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
}

.builder-list-item > div {
  min-width: 0;
}

.builder-list-item span,
.empty-note {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
}

.empty-note {
  margin: 0;
}

.option-value-grid {
  display: grid;
  gap: 12px;
}

.option-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.table-wrap.compact table {
  min-width: 640px;
}

.image-manager,
.detail-image-groups {
  display: grid;
  gap: 14px;
}

.file-drop {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  font-weight: var(--weight-medium);
}

.file-drop input,
.detail-image-group .panel-head input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

.image-sort-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 210px));
  gap: 16px;
  margin-top: 18px;
}

.image-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: default;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.image-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }

.image-card.is-representative {
  border-color: var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.image-card.is-representative:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.image-card-representative-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--card);
  color: var(--foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
}

.image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--card);
}

.image-card-foot {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
}

.image-card-foot.has-order-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.image-card-order-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.image-order-button {
  display: inline-grid;
  min-width: 0;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.image-order-button:hover:not(:disabled) {
  border-color: var(--border);
  background: var(--card);
}

.image-order-button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.image-order-button:disabled {
  cursor: default;
  opacity: 0.34;
}

.image-card-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.image-card.is-representative .image-card-foot {
  background: var(--card);
}

.image-card.is-representative [data-representative] {
  color: var(--foreground);
  font-weight: 700;
}

.image-card-foot .text-button {
  font-size: 12px;
}

.image-card-foot .danger { color: var(--foreground); }

.detail-image-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.detail-image-group .image-sort-list {
  padding: 14px;
}

.icon-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-weight: var(--weight-bold);
}

.table-input {
  width: 100%;
  min-width: 120px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

.table-input:focus {
  border-color: var(--border);
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.text-button.danger {
  color: var(--foreground);
}

.mobile-only,
.backdrop {
  display: none;
}

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coupon-issue-tools {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .admin-main-hero {
    grid-template-columns: 1fr;
  }

  .admin-main-hero-side {
    align-content: start;
  }

  .admin-main-actions {
    justify-content: flex-start;
  }

  .admin-main-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-main-flow li {
    min-height: 56px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  .admin-main-flow li:last-child {
    border-right: 0;
  }

  .notice-view-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-box {
    display: none;
  }
}

@media (max-width: 1024px) {
  body[data-mode="product-create"] .product-action-bar {
    top: 60px;
  }

  body.menu-open {
    overflow: hidden;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  body.menu-open .backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    border: 0;
    background: var(--card);
    touch-action: none;
  }

  .workspace {
    padding-left: 0;
  }

  .workspace > .content {
    padding-top: 72px;
  }

  .mobile-only {
    display: inline-flex;
  }

  .logo-link {
    min-height: var(--control-height-touch);
  }

  .panel-head a,
  .product-name-link {
    display: inline-flex;
    min-height: var(--control-height-touch);
    align-items: center;
  }

  .product-name-link {
    min-width: var(--control-height-touch);
  }

  .nav-item,
  .nav-subitem,
  .button-row.compact .button,
  .check-row,
  .product-check-item,
  .product-category-option,
  .segmented-field label,
  .menu-drag-handle {
    min-height: var(--control-height-touch);
  }

  .nav-subitem,
  .text-button {
    display: inline-flex;
    align-items: center;
  }

  .text-button,
  .product-duplicate-button,
  .badge.button-badge {
    min-height: var(--control-height-touch);
  }

  .text-button,
  .product-duplicate-button {
    min-width: var(--control-height-touch);
    justify-content: center;
  }

  .ck.ck-toolbar .ck-button {
    min-width: 40px;
    min-height: 40px;
  }

  body[data-mode="product-create"] .product-base-form select {
    height: var(--control-height-touch);
    min-height: var(--control-height-touch);
  }

  .table-select,
  .archive-public-select,
  .badge.status-select,
  .editable-cell input,
  .inline-sort input {
    height: var(--control-height-touch);
    min-height: var(--control-height-touch);
  }

  .table-select {
    background-position: calc(100% - 17px) 17px,
      calc(100% - 12px) 17px,
      calc(100% - 36px) 50%,
      0 0;
  }
}

@media (max-width: 820px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-brand {
    display: none;
  }

  .notice-view-meta {
    grid-template-columns: 1fr;
  }

  .topbar {
    gap: 8px;
    padding: 0 var(--page-gutter);
  }

  .content {
    padding: 22px var(--page-gutter) 36px;
  }

  .page-head {
    display: grid;
  }

  .button-row {
    justify-content: flex-start;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-main-hero {
    min-height: 0;
    gap: 22px;
    padding: 20px;
  }

  .admin-main-hero h2 {
    font-size: clamp(32px, 11vw, 42px);
    line-height: 1.05;
    word-break: keep-all;
  }

  .admin-main-hero-copy > p:last-child {
    font-size: 14px;
  }

  .admin-main-actions .button {
    flex: 1 1 132px;
  }

  .admin-main-flow {
    grid-template-columns: 1fr;
  }

  .admin-main-flow li {
    min-height: 44px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .admin-main-flow li:last-child {
    border-bottom: 0;
  }

  .admin-main-metric {
    min-height: 132px;
  }

  .admin-main-metric strong {
    font-size: 34px;
  }

  .form-grid.two,
  .form-grid.three,
  .form-grid.four,
  .option-value-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .button,
  .icon-button,
  .description-mode-tab,
  .archive-media-remove {
    min-height: var(--control-height-touch);
  }

  .icon-button,
  .filter-search-button {
    width: var(--control-height-touch);
    height: var(--control-height-touch);
  }

  input: not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea {
    min-height: var(--control-height-touch);
  }

  .topbar .button {
    flex: 0 0 auto;
    padding-inline: 10px;
  }

  .topbar-title h1 {
    font-size: clamp(16px, 5vw, 19px);
  }

  .product-action-bar,
  .save-action-bar {
    position: static;
    top: auto;
    z-index: auto;
    margin: 0 0 22px;
    padding: 12px;
    box-shadow: none;

  }

  .builder-form,
  .form-grid,
  .product-base-main,
  .product-base-settings,
  .product-category-picker,
  .product-category-selection,
  .description-editor,
  .ck.ck-editor,
  .ck-editor__main,
  .ck-editor__editable,
  .ck.ck-toolbar {
    min-width: 0;
    max-width: 100%;
  }

  .ck.ck-toolbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 1180px) {
  .product-builder {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-option-panel,
  .product-detail-panel {
    grid-column: 1;
  }

  .product-sales-primary {
    grid-template-columns: minmax(340px, 1fr) minmax(300px, 0.8fr);
  }

  .product-category-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-published-field {
    grid-column: 1 / -1;
  }

  .product-category-picker {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-settings-card-grid,
  .product-operation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .product-sales-panel .product-section-body {
    gap: 16px;
    padding: 14px;
  }

  .product-sales-primary {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-status-stack {
    width: 100%;
    gap: 12px;
  }

  .product-sales-side {
    width: 100%;
    grid-template-columns: minmax(0, 220px) minmax(280px, 1fr);
    align-items: end;
    gap: 16px;
  }

  .product-published-field {
    width: 100%;
    grid-column: auto;
  }

  .product-simple-stock-row {
    display: grid;
    width: min(340px, 100%);
    grid-template-columns: 130px minmax(120px, 1fr);
    align-items: end;
    gap: 16px;
  }

  .product-simple-stock-row > label {
    width: 100%;
  }

  body[data-mode="product-create"] .product-simple-stock-row .product-stock-quantity-input {
    width: 100%;
  }

  .product-sales-secondary {
    gap: 12px;
    padding-top: 14px;
  }

  .product-option-mode-row {
    width: 100%;
    max-width: none;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .product-option-mode-choices.compact {
    width: min(430px, 100%);
  }

  .product-check-stack.horizontal {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .product-option-inline {
    grid-template-columns: 1fr;
  }

  .product-option-relationship {
    grid-template-columns: 1fr;
  }

  body[data-mode="product-create"] .product-check-stack.horizontal .check-row {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .product-sales-primary {
    grid-template-columns: 1fr;
  }

  .product-option-mode-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-step-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-step-guide li {
    border-bottom: 1px solid var(--line);
  }

  .product-step-guide li:nth-child(2n) {
    border-right: 0;
  }

  .product-step-guide li:last-child {
    grid-column: auto;
    border-right: 0;
    border-bottom: 0;
  }

  .product-step-guide li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .product-option-mode-choices {
    padding: 18px;
  }

  .product-base-main,
  .product-base-settings,
  .product-section-body,
  .product-image-managers,
  .product-category-picker,
  .product-category-selection {
    padding: 18px;
  }

  .product-category-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-panel-head {
    align-items: flex-start;
  }

  body[data-mode="product-create"] .description-editor .ck-editor__editable_inline,
  body[data-mode="product-create"] #productDescriptionEditor,
  body[data-mode="product-create"] .html-source-panel textarea {
    height: auto;
    min-height: clamp(220px, 42vh, 300px);
    max-height: none;
  }

  body[data-mode="product-create"] #productDescriptionEditor,
  body[data-mode="product-create"] .html-source-panel textarea {
    resize: vertical;
  }
}

@media (max-width: 700px) {
  .product-settings-card-grid,
  .product-operation-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-settings-card {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .login-panel {
    padding: 12px;
  }

  .login-card {
    gap: 18px;
    padding: 20px;
  }

  .page-head,
  .product-panel-head,
  .product-detail-actions,
  .delivery-settings-actions {
    align-items: stretch;
  }

  .page-head .button-row,
  .product-action-bar .button-row,
  .save-action-bar .button-row {
    width: 100%;
    justify-content: stretch;
  }

  .page-head .button-row .button,
  .product-action-bar .button-row .button,
  .save-action-bar .button-row .button {
    flex: 1 1 120px;
  }

  .product-action-bar p:last-child,
  .save-action-bar p:last-child {
    display: none;
  }

  .editor-file-field,
  .main-position-fields,
  .main-visual-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .description-mode-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .description-mode-tab {
    width: 100%;
  }

  .product-base-main,
  .product-base-settings,
  .product-section-body,
  .product-image-managers,
  .product-category-picker,
  .product-category-selection,
  .builder-form {
    padding-right: 14px;
    padding-left: 14px;
  }

  .product-step-guide {
    grid-template-columns: 1fr;
  }

  .product-step-guide li,
  .product-step-guide li:nth-child(2n),
  .product-step-guide li:nth-last-child(-n + 2) {
    grid-column: auto;
    min-height: 62px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-step-guide li:last-child {
    border-bottom: 0;
  }

  .product-panel-head,
  .product-detail-actions {
    display: grid;
  }

  .product-option-relationship ol {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .product-option-relationship li:not(:last-child)::after {
    display: none;
  }

  .product-option-stock-guide,
  .builder-list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .builder-list-actions,
  .option-detail-row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .product-option-mode-choices {
    grid-template-columns: 1fr;
    padding-right: 14px;
    padding-left: 14px;
  }

  .product-detail-actions .button {
    width: 100%;
  }

  .product-sales-primary,
  .product-main-fields {
    grid-template-columns: 1fr;
  }

  .product-sales-side {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-simple-stock-row {
    grid-template-columns: minmax(110px, 0.7fr) minmax(120px, 1fr);
  }

  .product-check-stack.horizontal {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .product-option-mode-choices.compact {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-published-field {
    grid-column: auto;
  }

  .product-simple-stock-row {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .product-simple-stock-row > label {
    width: 100%;
  }
}

/* Product editor typography: section / item / value */
body[data-mode="product-create"] {
  --product-type-section-size: 16px;
  --product-type-item-size: 12px;
  --product-type-value-size: 11px;
  --product-type-section-weight: 700;
  --product-type-item-weight: 700;
  --product-type-value-weight: 500;
  --product-type-muted: var(--foreground);
}

body[data-mode="product-create"] .product-action-bar h2,
body[data-mode="product-create"] .product-panel-head h3 {
  font-size: var(--product-type-section-size);
  font-weight: var(--product-type-section-weight);
}

body[data-mode="product-create"] #productBuilder label > span:first-child,
body[data-mode="product-create"] #productBuilder fieldset > legend:not(.sr-only),
body[data-mode="product-create"] #productBuilder .product-form-heading > strong,
body[data-mode="product-create"] #productBuilder .product-category-section-head strong,
body[data-mode="product-create"] #productBuilder .product-image-managers h4,
body[data-mode="product-create"] #productBuilder .product-setting-label,
body[data-mode="product-create"] #productBuilder .product-option-inline-head > strong,
body[data-mode="product-create"] #productBuilder .product-current-stock-status > span,
body[data-mode="product-create"] #productBuilder .product-settings-card-head h4,
body[data-mode="product-create"] #productBuilder .product-settings-section-head h4,
body[data-mode="product-create"] #productBuilder .product-operation-card strong,
body[data-mode="product-create"] #productBuilder th {
  font-size: var(--product-type-item-size);
  font-weight: var(--product-type-item-weight);
  letter-spacing: 0;
}

body[data-mode="product-create"] #productBuilder input,
body[data-mode="product-create"] #productBuilder select,
body[data-mode="product-create"] #productBuilder textarea,
body[data-mode="product-create"] #productBuilder td,
body[data-mode="product-create"] #productBuilder small,
body[data-mode="product-create"] #productBuilder .api-status,
body[data-mode="product-create"] #productBuilder .empty-note,
body[data-mode="product-create"] #productBuilder .product-category-count,
body[data-mode="product-create"] #productBuilder .product-category-option span,
body[data-mode="product-create"] #productBuilder .product-category-selected-item strong,
body[data-mode="product-create"] #productBuilder .product-current-stock-status strong,
body[data-mode="product-create"] #productBuilder .product-stock-status-badge,
body[data-mode="product-create"] #productBuilder .product-settings-card-head p,
body[data-mode="product-create"] #productBuilder .product-settings-section-head p,
body[data-mode="product-create"] #productBuilder .product-option-mode-choice strong,
body[data-mode="product-create"] #productBuilder .product-operating-choices span,
body[data-mode="product-create"] #productBuilder .check-row span,
body[data-mode="product-create"] #productBuilder .file-drop-copy strong,
body[data-mode="product-create"] #productBuilder .image-card-representative-badge,
body[data-mode="product-create"] #productBuilder .image-card-foot,
body[data-mode="product-create"] #productBuilder button:not(.ck-button):not(.product-category-remove),
body[data-mode="product-create"] .product-action-bar .button {
  font-size: var(--product-type-value-size);
  font-weight: var(--product-type-value-weight);
  letter-spacing: 0;
}

body[data-mode="product-create"] #productBuilder small,
body[data-mode="product-create"] #productBuilder .api-status,
body[data-mode="product-create"] #productBuilder .empty-note,
body[data-mode="product-create"] #productBuilder .product-form-heading > span {
  color: var(--product-type-muted);
}

body[data-mode="product-create"] #productBuilder .product-settings-card-head p,
body[data-mode="product-create"] #productBuilder .product-settings-section-head p,
body[data-mode="product-create"] #productBuilder .product-operation-card small {
  color: var(--product-type-muted);
}

body[data-mode="product-create"] .product-category-picker .product-category-section-head {
  justify-content: space-between;
}

body[data-mode="product-create"] #productBuilder .product-category-selected-item {
  height: 34px;
  min-height: 34px;
}

/* Order management */
.order-status-section {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.order-status-section > div:first-child {
  display: grid;
  gap: 3px;
}

.order-status-section > div:first-child strong {
  font-size: 15px;
}

.order-status-section > div:first-child span,
.order-bulk-status-note,
.order-item-status-editor small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.order-status-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 7px;
  overflow-x: auto;
}

.order-status-tabs button {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  padding: 8px 10px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.order-status-tabs button:hover {
  border-color: var(--border);
  background: var(--card);
}

.order-status-tabs button.is-active {
  border-color: var(--dark);
  background: var(--primary);
  color: var(--primary-foreground);
}

.order-status-tabs button strong {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  padding: 0 7px;
  font-size: 11px;
}

.order-status-tabs button.is-active strong {
  background: var(--card);
  color: var(--foreground);
}

.order-bulk-status-note {
  margin: 12px 0 0;
}

body[data-mode="section"] .order-list-tools + .table-wrap table {
  min-width: 1500px;
}

.order-product-summary {
  width: 230px;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-tracking-cell {
  min-width: 390px;
}

.order-tracking-editor {
  display: grid;
  grid-template-columns: minmax(116px, 0.8fr) minmax(150px, 1.2fr) auto;
  align-items: center;
  gap: 6px;
}

.order-tracking-editor.compact {
  min-width: 360px;
}

.order-tracking-editor select,
.order-tracking-editor input,
.order-tracking-editor .button {
  min-height: 36px;
  height: 36px;
}

.order-tracking-editor select,
.order-tracking-editor input {
  padding-top: 5px;
  padding-bottom: 5px;
}

.order-tracking-editor select {
  background-position: calc(100% - 17px) 14px,
    calc(100% - 12px) 14px,
    calc(100% - 36px) 50%,
    0 0;
  background-size: 5px 5px, 5px 5px, 1px 18px, 100% 100%;
}

.order-tracking-confirm {
  padding: 0 11px;
}

.shipping-courier-select {
  min-width: 130px;
}

.shipping-tracking-cell {
  min-width: 250px;
}

.shipping-tracking-editor {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.shipping-tracking-editor input,
.shipping-tracking-editor .button {
  min-height: 34px;
  height: 34px;
}

.order-item-status-cell {
  min-width: 184px;
}

.order-item-status-editor {
  display: grid;
  gap: 4px;
}

.order-item-status-editor .table-select {
  width: 100%;
  min-width: 170px;
}

.order-item-status-editor--mixed .table-select:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.order-item-status-editor small {
  padding-left: 2px;
}

.order-detail-dialog {
  width: min(1480px, calc(100vw - 24px));
  max-width: none;
  max-height: min(920px, calc(100vh - 24px));
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.order-detail-dialog::backdrop {
  background: var(--card);

}

.order-detail-dialog-panel {
  display: grid;
  max-height: min(920px, calc(100vh - 24px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.order-detail-dialog-head,
.order-detail-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--card);
  padding: 18px 22px;
}

.order-detail-dialog-head {
  border-bottom: 1px solid var(--line);
}

.order-detail-dialog-head > div {
  display: grid;
  gap: 3px;
}

.order-detail-dialog-head .eyebrow {
  margin: 0;
}

.order-detail-dialog-head h2 {
  margin: 0;
  font-size: 22px;
}

.order-detail-dialog-foot {
  border-top: 1px solid var(--line);
}

.order-detail-dialog-foot p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.order-detail-dialog-content {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 14px;
  min-height: 220px;
  overflow-y: auto;
  padding: 18px;
}

.order-detail-card {
  flex: 1 1 calc(50% - 7px);
  width: calc(50% - 7px);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.order-detail-card--wide,
.order-detail-dialog-content > .order-detail-empty {
  flex-basis: 100%;
  width: 100%;
}

.order-detail-card-heading {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--border);
  padding: 15px 18px;
}

.order-detail-card-heading h3,
.order-detail-card-heading p {
  margin: 0;
}

.order-detail-card-heading h3 {
  font-size: 15px;
}

.order-detail-card-heading p {
  color: var(--muted-foreground);
  font-size: 12px;
}

.order-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.order-detail-info-grid > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 13px 16px;
}

.order-detail-info-grid > div:nth-child(4n) {
  border-right: 0;
}

.order-detail-info-grid dt {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.order-detail-info-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.order-detail-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  background: var(--card);
}

.order-detail-refund-account-fields {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1fr) minmax(140px, 0.6fr);
  gap: 10px;
  padding: 14px 18px 18px;
}

.order-detail-refund-account-fields label {
  display: grid;
  gap: 6px;
  color: var(--foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.order-detail-refund-account-fields .table-input {
  width: 100%;
  min-width: 0;
}

.order-detail-items-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.order-detail-items-table th,
.order-detail-items-table td {
  min-width: 0;
  padding: 11px 10px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.order-detail-items-table th:nth-child(1),
.order-detail-items-table td:nth-child(1) {
  width: 15%;
  font-weight: var(--weight-bold);
}

.order-detail-items-table th:nth-child(2),
.order-detail-items-table td:nth-child(2) {
  width: 12%;
}

.order-detail-items-table th:nth-child(3),
.order-detail-items-table td:nth-child(3) {
  width: 6%;
}

.order-detail-items-table th:nth-child(4),
.order-detail-items-table td:nth-child(4) {
  width: 9%;
}

.order-detail-items-table th:nth-child(5),
.order-detail-items-table td:nth-child(5) {
  width: 18%;
}

.order-detail-items-table th:nth-child(6),
.order-detail-items-table td:nth-child(6) {
  width: 24%;
}

.order-detail-items-table th:nth-child(7),
.order-detail-items-table td:nth-child(7) {
  width: 16%;
}

.order-detail-items-table .table-select,
.order-detail-items-table .table-input {
  width: 100%;
  min-width: 0;
}

.order-detail-request-reason {
  margin: 0 0 7px;
  color: var(--foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.order-detail-cancel-actions {
  display: grid;
  gap: 6px;
}

.order-detail-cancel-actions .button {
  width: 100%;
  min-height: 36px;
  height: auto;
  padding: 8px 9px;
  line-height: 1.3;
  white-space: normal;
}

.order-detail-cancel-approve {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.order-detail-stock-restore {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: var(--weight-medium);
}

.order-detail-stock-restore[hidden] {
  display: none;
}

.order-detail-stock-restore input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
}

.order-detail-item-save {
  min-height: 36px;
  height: 36px;
  padding: 0 10px;
}

.order-detail-tracking-editor {
  grid-template-columns: minmax(150px, 0.7fr) minmax(240px, 1.3fr) auto;
  max-width: 720px;
  padding: 16px 18px 18px;
}

.order-detail-memo-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 16px 18px 18px;
}

.order-detail-memo-editor textarea {
  min-height: 104px;
}

.order-detail-history {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-detail-history li {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 13px 18px;
}

.order-detail-history li:last-child {
  border-bottom: 0;
}

.order-detail-history li > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.order-detail-history strong {
  color: var(--foreground);
  font-size: 12px;
}

.order-detail-history time,
.order-detail-history small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.order-detail-history p {
  margin: 0;
  font-weight: var(--weight-medium);
}

.order-detail-empty {
  margin: 0;
  padding: 28px 18px;
  color: var(--muted-foreground);
  text-align: center;
}

.order-detail-empty.error {
  color: var(--red);
}

@media (max-width: 1100px) {
  .order-status-tabs {
    grid-template-columns: repeat(4, minmax(118px, 1fr));
  }

  .order-detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-detail-dialog-content {
    display: flex;
  }

  .order-detail-card,
  .order-detail-card--wide,
  .order-detail-dialog-content > .order-detail-empty {
    flex-basis: 100%;
    width: 100%;
  }

  .order-detail-items-table table {
    min-width: 920px;
  }

  .order-detail-refund-account-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-detail-info-grid > div:nth-child(4n) {
    border-right: 1px solid var(--border);
  }

  .order-detail-info-grid > div:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .order-status-tabs {
    grid-template-columns: repeat(2, minmax(126px, 1fr));
  }

  .order-status-tabs button {
    min-height: var(--control-height-touch);
  }

  .order-detail-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: var(--radius);
  }

  .order-detail-dialog-panel {
    max-height: calc(100vh - 16px);
  }

  .order-detail-dialog-head,
  .order-detail-dialog-foot {
    align-items: flex-start;
    padding: 14px;
  }

  .order-detail-dialog-foot {
    flex-direction: column;
  }

  .order-detail-dialog-foot .button {
    width: 100%;
  }

  .order-detail-dialog-content {
    padding: 10px;
  }

  .order-detail-info-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-info-grid > div,
  .order-detail-info-grid > div:nth-child(2n),
  .order-detail-info-grid > div:nth-child(4n) {
    border-right: 0;
  }

  .order-tracking-editor,
  .order-detail-tracking-editor {
    min-width: 0;
    max-width: none;
    grid-template-columns: 1fr;
  }

  .order-detail-memo-editor {
    grid-template-columns: 1fr;
  }

  .order-detail-memo-editor .button {
    width: 100%;
  }
}

/* Unified order workspace */
.nav-tree {
  display: grid;
  gap: 3px;
}

.nav-tree-level-2,
.nav-tree-level-3 {
  gap: 2px;
}

.nav-item-level-2,
.nav-item-level-3 {
  min-height: 34px;
  color: var(--foreground);
  font-size: 14px;
  padding: 0 9px;
}

.nav-item-level-2 .nav-icon,
.nav-item-level-3 .nav-icon {
  width: 16px;
  height: 16px;
  border: 0;
  color: var(--foreground);
}

.nav-tree-level-2 .nav-submenu {
  margin-left: 20px;
}

.nav-item-level-2.active,
.nav-item-level-3.active {
  background: var(--card);
  color: var(--foreground);
}

.nav-tree-entry.active-branch > .nav-parent {
  background: var(--card);
  color: var(--foreground);
}

.nav-tree-level-1 > .nav-tree-entry.active-branch > .nav-parent {
  background: var(--card);
  color: var(--dark);
}

.order-dashboard-page,
.order-management-page,
.order-detail-page {
  min-width: 0;
  --order-font-title: 24px;
  --order-font-middle: 14px;
  --order-font-detail: 12px;
}

body[data-mode="order-dashboard"] .content,
body[data-mode="order-management"] .content {
  background: var(--card);
}

body[data-mode="order-detail"] {
  min-width: 0;
  overflow: auto;
  background: var(--card);
}

.order-detail-popup-shell {
  min-width: 920px;
  min-height: 100vh;
  padding: 22px;
}

.order-detail-popup-shell .order-detail-page {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.order-detail-popup-shell .order-detail-page > .page-head {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 20px 22px;
}

.order-detail-popup-shell .order-detail-page > .section-grid {
  margin-top: 14px;
}

.order-dashboard-page .page-head h2,
.order-management-page .page-head h2,
.order-detail-page .page-head h2 {
  margin: 0;
  font-size: var(--order-font-title);
}

.order-dashboard-page h3,
.order-management-page h3,
.order-detail-page h3,
.order-dashboard-page strong,
.order-management-page strong,
.order-detail-page strong,
.order-dashboard-page .button,
.order-management-page .button,
.order-detail-page .button,
.order-detail-tabs button,
.order-result-tabs button {
  font-size: var(--order-font-middle);
}

.order-dashboard-page p,
.order-dashboard-page small,
.order-dashboard-page label,
.order-dashboard-page input,
.order-management-page p,
.order-management-page small,
.order-management-page label,
.order-management-page input,
.order-management-page select,
.order-management-page th,
.order-management-page td,
.order-detail-page p,
.order-detail-page small,
.order-detail-page label,
.order-detail-page input,
.order-detail-page select,
.order-detail-page th,
.order-detail-page td,
.order-detail-page dt,
.order-detail-page dd {
  font-size: var(--order-font-detail);
}

.order-dashboard-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-dashboard-search input {
  box-sizing: border-box;
  width: min(420px, 42vw);
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 12px;
}

.order-dashboard-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-dashboard-metric {
  display: flex;
  min-height: 100px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-top: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.order-dashboard-metric span {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.order-dashboard-metric strong {
  font-size: 25px;
}

.order-status-queue {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.order-status-queue a {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.order-status-queue a:nth-child(4n) {
  border-right: 0;
}

.order-status-queue a:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.order-status-queue a:hover {
  background: var(--card);
}

.order-status-queue strong {
  display: inline-flex;
  min-width: 34px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 12px;
}

.order-unified-filter {
  display: grid;
  gap: 12px;
}

.order-basic-search-panel {
  overflow: visible;
}

.order-basic-search-row {
  flex-wrap: nowrap;
  border-bottom: 0;
  padding-block: 16px;
}

.order-basic-search-submit {
  min-width: 88px;
  min-height: var(--control-height);
  flex: 0 0 auto;
}

.order-advanced-filter-body {
  display: grid;
}

.order-filter-row,
.order-status-filter {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 10px 18px;
}

.order-filter-label,
.order-status-filter legend {
  flex: 0 0 82px;
  margin: 0;
  color: var(--foreground);
  font-size: var(--order-font-middle);
  font-weight: var(--weight-bold);
}

.order-filter-row label,
.order-upload-card label,
.order-action-dialog-panel > label {
  display: grid;
  gap: 6px;
  color: var(--foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.order-filter-row input,
.order-filter-row select,
.order-upload-card input,
.order-upload-card select,
.order-action-dialog-panel textarea,
.order-action-dialog-panel select {
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  padding: 0 11px;
}

.order-filter-row .filter-select {
  position: relative;
  display: block;
  flex: 0 0 138px;
}

.order-filter-row .filter-select::after {
  position: absolute;
  top: 50%;
  right: 11px;
  color: var(--foreground);
  content: "⌄";
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-55%);
  transform-origin: center;
  transition: transform 0.16s ease;
}

.order-filter-row .filter-select.is-open::after {
  transform: translateY(-45%) rotate(180deg);
}

.order-filter-row .filter-select select {
  width: 100%;
  appearance: none;
  padding-right: 34px;
}

.order-filter-row .order-date-field {
  display: block;
}

.order-filter-row .order-keyword-field {
  flex: 1 1 420px;
  min-width: 0;
}

.order-filter-row .order-keyword-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--control-height);
  background: var(--card);
}

.order-action-dialog-panel textarea {
  padding-block: 10px;
  resize: vertical;
}

.order-range-buttons {
  display: flex;
  gap: 4px;
}

.order-range-buttons button {
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  padding: 0 12px;
}

.order-range-buttons button:hover {
  border-color: var(--dark);
}

.order-range-buttons button.is-active {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.order-date-field input {
  width: 150px;
}

.order-keyword-field {
  flex: 1 1 320px;
}

.order-keyword-field input {
  width: 100%;
}

.order-status-filter {
  align-items: center;
  border: 0;
  margin: 0;
}

.order-status-filter legend {
  float: left;
}

.order-status-filter label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.order-status-filter input,
.order-select-all input,
.unified-order-select,
[data-order-detail-item-select],
[data-shipping-item-choice] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
}

.order-filter-actions {
  justify-content: flex-start;
  padding: 14px 18px;
}

.order-filter-summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.order-filter-summary::-webkit-details-marker {
  display: none;
}

.order-filter-summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -3px;
}

.order-filter-summary-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.order-filter-toggle-label {
  color: var(--muted-foreground);
  font-size: 0;
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.order-filter-toggle-label::before {
  content: "검색 조건 열기";
  font-size: 11px;
}

.order-filter-toggle-label::after {
  display: inline-block;
  margin-left: 7px;
  content: "⌄";
  font-size: 16px;
  line-height: 1;
  transform-origin: center;
  transition: transform 160ms ease;
}

.order-filter-panel[open] .order-filter-toggle-label::before {
  content: "검색 조건 닫기";
}

.order-filter-panel[open] .order-filter-toggle-label::after {
  transform: rotate(180deg);
}

.order-filter-panel:not([open]) > .order-filter-summary {
  border-bottom-color: transparent;
}

.order-results-panel {
  overflow: visible;
}

.order-results-head {
  position: sticky;
  top: 12px;
  z-index: 15;
  min-height: 66px;
  background: var(--card);
  box-shadow: var(--shadow-sm);


}

.order-result-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.order-result-tabs button {
  min-width: 124px;
  min-height: 46px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font-weight: var(--weight-bold);
}

.order-result-tabs button.is-active {
  background: var(--card);
  color: var(--dark);
  box-shadow: var(--shadow-sm);
}

.order-results-head > div:first-child {
  display: grid;
  gap: 2px;
}

.order-results-head p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.order-results-head .button.primary,
.order-detail-actions .button.primary,
.order-action-dialog .button.primary {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.button.bundle-action {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.button.bundle-action:hover:not(:disabled) {
  border-color: var(--border);
  background: var(--card);
}

.button.bundle-action:disabled {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: not-allowed;
}

.order-unified-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.order-management-page #orderSearchResults .order-unified-table,
.order-management-page #orderBundleResults .order-unified-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.order-unified-table th,
.order-unified-table td {
  box-sizing: border-box;
  min-width: 0;
  height: auto;
  padding: 9px 5px;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}

.order-unified-table tr {
  height: auto;
}

.order-unified-table th {
  background: var(--card);
  color: var(--foreground);
  font-size: 12px;
  line-height: 1.35;
}

.order-unified-table th:nth-child(1),
.order-unified-table td:nth-child(1) {
  position: sticky;
  left: 0;
  width: 3.5%;
  min-width: 0;
  padding-inline: 6px 3px;
  text-align: left;
}

.order-unified-table th:nth-child(1) {
  z-index: 4;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.order-unified-table td:nth-child(1) {
  z-index: 2;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.order-unified-table tr:hover td:nth-child(1) {
  background: var(--card);
}

.order-unified-table .amount-column,
.order-unified-table td.numeric {
  text-align: right;
}

.order-select-all {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.unified-order-select {
  display: block;
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th,
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td {
  min-width: 0;
  padding: 9px 5px;
  font-size: 12px;
  line-height: 1.35;
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(1),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(1),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(1),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(1) {
  width: 3.5%;
  min-width: 0;
  padding-inline: 6px 3px;
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(2),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(2) { width: 14%; }
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(3),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(3) { width: 6%; }
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(4),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(4) { width: 16%; }
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(5),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(5) {
  width: 4.5%;
  text-align: center;
}
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(6),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(6) { width: 17%; }
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(7),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(7),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(7),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(7) { width: 14%; }
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(8),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(8),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(8),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(8) { width: 10%; }
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(9),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(9),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(9),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(9) { width: 8.5%; }
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table th:nth-child(10),
.order-management-page[data-order-view="ready"] #orderSearchResults .order-unified-table td:nth-child(10),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table th:nth-child(10),
.order-management-page[data-order-view="standby"] #orderSearchResults .order-unified-table td:nth-child(10) { width: 6.5%; }

.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table td:nth-child(2) { width: 10%; }
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table td:nth-child(3) { width: 12%; }
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table td:nth-child(4) { width: 6%; }
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table td:nth-child(5) { width: 20%; }
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table td:nth-child(6) { width: 9%; }
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table th:nth-child(7),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table td:nth-child(7),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table th:nth-child(8),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table td:nth-child(8) { width: 7%; }
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table th:nth-child(n + 9):nth-child(-n + 13),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table td:nth-child(n + 9):nth-child(-n + 13) {
  width: 4%;
  text-align: center;
}
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table th:nth-child(14),
.order-management-page[data-order-view="all"] #orderSearchResults .order-unified-table td:nth-child(14) { width: 5.5%; }

.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table td:nth-child(2) { width: 18%; }
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table td:nth-child(3) { width: 9%; }
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table td:nth-child(4) { width: 25%; }
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table td:nth-child(5) { width: 31%; }
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table td:nth-child(6) { width: 13.5%; }

.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table td:nth-child(2) { width: 14%; }
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table td:nth-child(3) { width: 6%; }
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table td:nth-child(4) { width: 17%; }
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table td:nth-child(5) { width: 11%; }
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table td:nth-child(6) { width: 14%; }
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table th:nth-child(7),
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table td:nth-child(7) { width: 19%; }
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table th:nth-child(8),
.order-management-page[data-order-view="complete"] #orderSearchResults .order-unified-table td:nth-child(8) { width: 15.5%; }

.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table td:nth-child(2) { width: 10%; }
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table td:nth-child(3) { width: 11%; }
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table td:nth-child(4) { width: 6%; }
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table td:nth-child(5) { width: 17%; }
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table td:nth-child(6) {
  width: 5%;
  text-align: center;
}
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table th:nth-child(7),
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table td:nth-child(7) { width: 10%; }
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table th:nth-child(8),
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table td:nth-child(8) { width: 8%; }
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table th:nth-child(9),
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table td:nth-child(9) { width: 9.5%; }
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table th:nth-child(10),
.order-management-page[data-order-view="cancel"] #orderSearchResults .order-unified-table td:nth-child(10) { width: 20%; }

.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table td:nth-child(2) { width: 11%; }
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table td:nth-child(3) { width: 12%; }
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table td:nth-child(4) { width: 6%; }
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table td:nth-child(5) {
  width: 13%;
  padding-right: 4px;
  padding-left: 4px;
}
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table td:nth-child(6) {
  width: 5%;
  text-align: center;
}
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table th:nth-child(7),
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table td:nth-child(7) { width: 11%; }
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table th:nth-child(8),
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table td:nth-child(8) { width: 25%; }
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table th:nth-child(9),
.order-management-page[data-order-view="exchange"] #orderSearchResults .order-unified-table td:nth-child(9) { width: 14%; }

.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table td:nth-child(2) { width: 12%; }
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table td:nth-child(3) { width: 11%; }
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table td:nth-child(4) { width: 6%; }
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table td:nth-child(5) { width: 16%; }
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table td:nth-child(6) {
  width: 5%;
  text-align: center;
}
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table th:nth-child(7),
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table td:nth-child(7) { width: 10%; }
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table th:nth-child(8),
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table td:nth-child(8) { width: 18%; }
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table th:nth-child(9),
.order-management-page[data-order-view="return"] #orderSearchResults .order-unified-table td:nth-child(9) { width: 18.5%; }

.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table td:nth-child(2),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table td:nth-child(2) { width: 10%; }
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table td:nth-child(3),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table td:nth-child(3) { width: 11%; }
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table td:nth-child(4),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table td:nth-child(4) { width: 6%; }
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table td:nth-child(5),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table td:nth-child(5) { width: 16%; }
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table td:nth-child(6),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table td:nth-child(6) {
  width: 5%;
  text-align: center;
}
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table th:nth-child(7),
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table td:nth-child(7),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table th:nth-child(7),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table td:nth-child(7) { width: 9%; }
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table th:nth-child(8),
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table td:nth-child(8),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table th:nth-child(8),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table td:nth-child(8) { width: 8%; }
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table th:nth-child(9),
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table td:nth-child(9),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table th:nth-child(9),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table td:nth-child(9) { width: 10%; }
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table th:nth-child(10),
.order-management-page[data-order-view="refund"] #orderSearchResults .order-unified-table td:nth-child(10),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table th:nth-child(10),
.order-management-page[data-order-view="admin-refund"] #orderSearchResults .order-unified-table td:nth-child(10) { width: 21.5%; }

.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table th:nth-child(2),
.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table td:nth-child(2) { width: 15%; }
.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table th:nth-child(3),
.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table td:nth-child(3) { width: 18%; }
.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table th:nth-child(4),
.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table td:nth-child(4) { width: 10%; }
.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table th:nth-child(5),
.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table td:nth-child(5) { width: 38%; }
.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table th:nth-child(6),
.order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table td:nth-child(6) { width: 15.5%; }

.order-management-page[data-order-view="ready"] #orderSearchResults .order-stacked-column-title,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-stacked-column-title,
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-stacked-column-title,
.order-management-page[data-order-view="complete"] #orderSearchResults .order-stacked-column-title {
  display: block;
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-fulfillment-identity,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-fulfillment-identity,
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-fulfillment-identity,
.order-management-page[data-order-view="complete"] #orderSearchResults .order-fulfillment-identity,
.order-management-page[data-order-view="ready"] #orderSearchResults .order-fulfillment-payment-summary,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-fulfillment-payment-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-fulfillment-identity > :last-child,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-fulfillment-identity > :last-child,
.order-management-page[data-order-view="shipping"] #orderSearchResults .order-fulfillment-identity > :last-child,
.order-management-page[data-order-view="complete"] #orderSearchResults .order-fulfillment-identity > :last-child,
.order-management-page[data-order-view="ready"] #orderSearchResults .order-fulfillment-payment-entry + .order-fulfillment-payment-entry,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-fulfillment-payment-entry + .order-fulfillment-payment-entry {
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-fulfillment-payment-entry,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-fulfillment-payment-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  min-width: 0;
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-fulfillment-payment-entry small,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-fulfillment-payment-entry small {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: var(--weight-medium);
  line-height: 1.2;
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-fulfillment-payment-entry strong,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-fulfillment-payment-entry strong {
  color: var(--ink);
  font-weight: var(--weight-bold);
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-fulfillment-payment-amount-cell .order-fulfillment-payment-entry,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-fulfillment-payment-amount-cell .order-fulfillment-payment-entry {
  justify-items: end;
}

.order-management-page[data-order-view="ready"] #orderSearchResults .order-quantity-summary,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-quantity-summary {
  justify-items: center;
  text-align: center;
}

.order-management-page[data-order-view="ready"] #orderSearchResults .unified-order-tracking,
.order-management-page[data-order-view="standby"] #orderSearchResults .unified-order-tracking,
.order-management-page[data-order-view="ready"] #orderSearchResults .order-cj-stage,
.order-management-page[data-order-view="standby"] #orderSearchResults .order-cj-stage {
  grid-template-columns: minmax(0, 1fr);
}

.order-management-page[data-order-view="ready"] #orderSearchResults .button.compact,
.order-management-page[data-order-view="standby"] #orderSearchResults .button.compact {
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  height: auto;
  padding: 5px 7px;
  line-height: 1.2;
  white-space: normal;
}

.order-management-page #orderSearchResults .order-cell-stack > span {
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.order-management-page #orderSearchResults .order-cell-stack > span + span {
  border-top: 1px solid var(--border);
  padding-top: 5px;
}

.order-management-page #orderSearchResults .order-cell-stack small {
  font-size: 10px;
  line-height: 1.2;
}

.order-management-page #orderSearchResults .button.compact,
.order-management-page #orderBundleResults .button.compact {
  width: fit-content;
  max-width: 100%;
  height: auto;
  min-height: 28px;
  padding: 5px 7px;
  line-height: 1.2;
  white-space: normal;
}

.order-management-page #orderSearchResults .order-unified-table td > *,
.order-management-page #orderBundleResults .order-unified-table td > * {
  min-width: 0;
  max-width: 100%;
}

.order-krw {
  white-space: nowrap;
}

.order-date-stack,
.order-product-summary {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
}

.order-product-summary strong,
.order-product-summary small {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.order-product-summary-separated {
  width: 100%;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.order-product-line,
.order-quantity-summary > span {
  display: grid;
  min-height: 40px;
  align-content: center;
  gap: 2px;
}

.order-product-line + .order-product-line,
.order-quantity-summary > span + span {
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

.order-quantity-summary {
  display: grid;
  align-content: start;
  font-weight: var(--weight-bold);
  text-align: right;
}

.order-date-stack small,
.order-product-summary small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.order-date-value {
  display: grid;
  width: max-content;
  gap: 1px;
  font-style: normal;
  white-space: nowrap;
}

.order-date-value em {
  margin-bottom: 2px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-style: normal;
  font-weight: var(--weight-bold);
}

.order-date-day,
.order-date-time {
  display: block;
  white-space: nowrap;
}

.order-cell-stack,
.order-number-stack {
  display: grid;
  align-content: start;
  gap: 7px;
}

.order-cell-stack > span {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.order-cell-stack small {
  color: var(--muted-foreground);
  font-size: 12px;
  white-space: nowrap;
}

.order-cell-stack strong {
  min-width: 0;
  font-size: 13px;
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
  white-space: normal;
}

.order-recipient-stack > span:last-child strong {
  line-height: 1.55;
  word-break: keep-all;
}

.order-claim-request {
  display: grid;
  gap: 9px;
}

.order-claim-request-entry {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.order-claim-request-entry strong {
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.order-claim-request-entry small,
.order-claim-contact small {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: normal;
}

.order-claim-replacement-shipment {
  display: grid;
  gap: 4px;
  margin-top: 5px;
  padding: 8px;
  background: var(--card);
}

.order-claim-replacement-shipment > strong {
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.order-claim-replacement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.order-claim-contact {
  display: grid;
  gap: 2px;
  border-radius: var(--radius);
  background: var(--card);
  padding: 7px 8px;
}

.order-return-processing {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.order-return-processing > article {
  display: grid;
  gap: 7px;
  border-radius: var(--radius);
  background: var(--card);
  padding: 10px;
}

.order-return-processing > article > strong {
  font-size: 12px;
}

.order-return-processing > article > small {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.45;
}

.order-return-stage-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-return-stage-track li {
  border-radius: var(--radius);
  background: var(--card);
  padding: 5px 2px;
  color: var(--foreground);
  font-size: 9px;
  font-weight: var(--weight-bold);
  text-align: center;
  white-space: nowrap;
}

.order-return-stage-track li.is-complete {
  background: var(--card);
  color: var(--foreground);
}

.order-return-stage-track li.is-current {
  background: var(--card);
  color: var(--foreground);
}

.order-return-stage-track.is-rejected li {
  opacity: .45;
}

.order-return-cj-stage {
  display: block;
  border-left: 1px solid var(--border);
  padding-left: 7px;
  color: var(--foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
  line-height: 1.5;
}

.order-return-cj-stage.is-success {
  border-left-color: var(--border);
  color: var(--foreground);
}

.order-return-processing .button.compact {
  width: fit-content;
}

.order-exchange-processing {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.order-exchange-processing > article {
  display: grid;
  gap: 8px;
  border-radius: var(--radius);
  background: var(--card);
  padding: 10px;
}

.order-exchange-processing > article > strong {
  font-size: 12px;
}

.order-exchange-fee-payment {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 9px;
}

.order-exchange-fee-payment > strong,
.order-exchange-fee-payment > p,
.order-exchange-fee-payment > small {
  margin: 0;
  overflow-wrap: anywhere;
}

.order-exchange-fee-payment > strong,
.order-exchange-fee-payment > p {
  font-size: 11px;
  line-height: 1.5;
}

.order-exchange-fee-payment > small {
  color: var(--muted-foreground);
  font-size: 10px;
  line-height: 1.45;
}

.order-exchange-fee-payment .button.compact {
  width: fit-content;
  margin-top: 3px;
}

.order-claim-collection-method {
  display: block;
  border-radius: var(--radius);
  padding: 7px 8px;
  font-size: 11px;
  font-weight: var(--weight-bold);
  line-height: 1.45;
}

.order-claim-collection-method.is-self-ship {
  background: var(--card);
  color: var(--foreground);
}

.order-claim-collection-method.is-seller-pickup {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
}

.order-exchange-pickup {
  display: grid;
  gap: 4px;
  border-left: 1px solid var(--border);
  background: var(--card);
  padding: 8px;
}

.order-exchange-pickup > small {
  color: var(--muted-foreground);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.order-exchange-pickup > strong {
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.order-exchange-pickup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.order-exchange-pickup-actions .button.compact {
  width: fit-content;
}

.order-number-link {
  display: inline-block;
  max-width: 13ch;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-all;
}

.order-number-link {
  color: var(--foreground);
  font-weight: var(--weight-bold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.unified-order-tracking {
  display: grid;
  grid-template-columns: auto minmax(88px, 1fr) auto;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}

.order-separated-tracking-cell .unified-order-tracking {
  margin-top: 0;
}

.order-management-page[data-order-view="standby"]
  tr.standby-bundle-group-start:not(:first-child) td {
  border-top: 1px solid var(--border);
}

.order-management-page[data-order-view="standby"]
  tr.standby-bundle-group-continuation td {
  background: var(--card);
}

.standby-bundle-tracking {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  min-height: 72px;
}

.standby-bundle-tracking strong {
  overflow-wrap: anywhere;
}

.standby-bundle-tracking span,
.standby-bundle-tracking small {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
}

.unified-order-courier {
  color: var(--muted-foreground);
  font-size: 11px;
  white-space: nowrap;
}

.unified-order-tracking-number {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.order-cj-package-summary {
  grid-column: 1 / -1;
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
}

.shipping-tracking-summary {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
}

.shipping-tracking-summary > span,
.shipping-tracking-summary > small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.shipping-tracking-summary > strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.shipping-tracking-summary > .button {
  width: fit-content;
  margin-top: 2px;
}

.unified-order-tracking input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
}

.order-unified-table tr.is-cj-printed td,
.order-unified-table tr.is-cj-printed:hover td {
  background: var(--secondary);
  color: var(--muted-foreground);
}

.order-unified-table tr.is-cj-printed td:nth-child(1),
.order-unified-table tr.is-cj-printed:hover td:nth-child(1) {
  background: var(--secondary);
}

.order-unified-table tr.is-cj-error td,
.order-unified-table tr.is-cj-error:hover td {
  background: var(--destructive-soft);
  color: var(--destructive-soft-foreground);
}

.order-unified-table tr.is-cj-error td:nth-child(1),
.order-unified-table tr.is-cj-error:hover td:nth-child(1) {
  background: var(--destructive-soft);
}

.order-unified-table tr.is-cj-printed .unified-order-select:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.order-cj-stage-summary {
  display: grid;
  gap: 5px;
}

.order-cj-stage {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 3px 7px;
  border-radius: var(--radius);
  background: var(--card);
  padding: 5px 7px;
}

.order-cj-stage small {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: var(--weight-bold);
}

.order-cj-stage strong {
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.order-cj-stage.is-error {
  border: 1px solid var(--border);
  background: var(--card);
}

.order-cj-stage.is-error small,
.order-cj-stage.is-error strong {
  color: var(--foreground);
}

.order-cj-stage.is-pending {
  color: var(--muted-foreground);
  font-size: 11px;
}

.order-cj-error-button {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 27px;
  height: 27px;
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.order-bundle-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.order-bundle-table th:nth-child(2),
.order-bundle-table td:nth-child(2) { width: 8%; }
.order-bundle-table th:nth-child(3),
.order-bundle-table td:nth-child(3) { width: 10%; }
.order-bundle-table th:nth-child(4),
.order-bundle-table td:nth-child(4) { width: 6%; }
.order-bundle-table th:nth-child(5),
.order-bundle-table td:nth-child(5) { width: 14%; }
.order-bundle-table th:nth-child(6),
.order-bundle-table td:nth-child(6),
.order-bundle-table th:nth-child(7),
.order-bundle-table td:nth-child(7) { width: 8%; }
.order-bundle-table th:nth-child(8),
.order-bundle-table td:nth-child(8) { width: 6%; }
.order-bundle-table th:nth-child(9),
.order-bundle-table td:nth-child(9),
.order-bundle-table th:nth-child(10),
.order-bundle-table td:nth-child(10) { width: 7%; }
.order-bundle-table th:nth-child(11),
.order-bundle-table td:nth-child(11) { width: 12%; }
.order-bundle-table th:nth-child(12),
.order-bundle-table td:nth-child(12) { width: 10.5%; }

.order-bundle-table tr.bundle-group-start:not(:first-child) td {
  border-top: 1px solid var(--border);
}

.order-bundle-table .bundle-single-row td {
  vertical-align: top;
}

.bundle-order-links,
.bundle-memo-controls {
  display: grid;
  align-content: start;
  gap: 6px;
}

.bundle-order-links {
  width: 100%;
  min-width: 0;
}

.bundle-order-links .order-number-link {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-all;
}

.bundle-customer-summary,
.bundle-product-summary {
  min-width: 0;
}

.bundle-memo-controls .button {
  width: 100%;
  white-space: normal;
}

.bundle-tracking-cell {
  min-width: 0;
  background: var(--card);
  vertical-align: top;
}

.bundle-tracking-editor {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.bundle-tracking-editor > strong {
  font-size: 12px;
}

.bundle-tracking-editor input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
}

.bundle-tracking-message {
  color: var(--foreground);
  font-size: 11px;
  line-height: 1.45;
}

.bundle-tracking-guidance {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.45;
}

.bundle-tracking-editor.has-error {
  border-radius: var(--radius);
  background: var(--card);
  padding: 8px;
}

.bundle-status-badge {
  width: fit-content;
}

.bundle-refund-cell {
  min-width: 0;
  background: var(--card);
  vertical-align: top;
}

.bundle-refund-control {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.bundle-refund-control > small {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.55;
}

.bundle-refund-status {
  width: fit-content;
}

.bundle-order-select {
  width: 16px;
  height: 16px;
  margin: 0;
}

.button.compact {
  min-height: 32px;
  height: 32px;
  padding: 0 9px;
  font-size: 11px;
  white-space: nowrap;
}

.order-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-upload-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
  gap: 14px;
  padding: 18px;
}

.order-upload-card + .order-upload-card {
  border-left: 1px solid var(--line);
}

.order-upload-card-head {
  display: flex;
  align-items: center;
  align-content: start;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.order-upload-card a {
  color: var(--foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.order-sample-download {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
}

.order-sample-download svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.order-upload-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}

.order-upload-fields.single {
  grid-template-columns: 1fr;
}

.order-file-field {
  display: grid;
  min-width: 0;
  align-content: end;
  gap: 6px;
}

.order-file-field-label {
  color: var(--foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.order-file-picker {
  display: flex;
  min-width: 0;
  min-height: var(--control-height);
  align-items: center;
  gap: 10px;
}

.order-upload-card .order-file-trigger {
  display: inline-flex;
  min-width: 128px;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.order-file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-upload-card > .button {
  width: fit-content;
  min-width: 132px;
  justify-self: end;
}

.order-confirm-dialog-panel {
  width: min(460px, calc(100vw - 32px));
}

.order-confirm-message {
  margin: 0;
  padding: 22px 24px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}

.order-detail-heading strong {
  font-weight: inherit;
}

.order-detail-heading h1 {
  margin: 0 0 6px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: var(--weight-bold);
  letter-spacing: .08em;
}

.order-detail-heading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 8px 0 0;
  color: var(--muted-foreground);
}

.order-detail-heading-meta strong {
  color: var(--ink);
  font-size: inherit;
  font-weight: var(--weight-bold);
}

.order-detail-scroll-content {
  display: grid;
  gap: 18px;
  padding: 18px;
  background: var(--card);
}

.order-detail-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.order-detail-section-heading {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  background: var(--card);
}

.order-detail-section-heading h3 {
  margin: 0;
  color: var(--dark);
  font-size: 15px;
  font-weight: var(--weight-bold);
}

.order-detail-section .order-detail-tabpanel {
  min-height: 0;
}

.order-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.order-detail-actions[hidden] {
  display: none;
}

.order-detail-tabpanel {
  min-height: 220px;
}

.order-detail-claim-shipping {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 18px;
  background: var(--card);
}

.order-detail-claim-shipping-heading {
  display: grid;
  gap: 3px;
}

.order-detail-claim-shipping-heading h4,
.order-detail-claim-shipping-heading p,
.order-detail-claim-products p,
.order-detail-claim-shipping-empty {
  margin: 0;
}

.order-detail-claim-shipping-heading h4 {
  font-size: 15px;
}

.order-detail-claim-shipping-heading p,
.order-detail-claim-shipping-empty {
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.55;
}

.order-detail-claim-shipping-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px;
}

.order-detail-claim-shipping-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-detail-claim-shipping-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-detail-claim-shipping-identity strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.order-detail-claim-shipping-identity small,
.order-detail-claim-products p,
.order-detail-claim-leg > small {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.order-detail-claim-products {
  display: grid;
  gap: 3px;
}

.order-detail-claim-leg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.order-detail-claim-leg {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--card);
}

.order-detail-claim-leg h5 {
  margin: 0;
  font-size: 12px;
}

.order-detail-claim-leg > strong {
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.order-detail-claim-leg .order-claim-collection-method {
  width: fit-content;
}

.order-detail-claim-leg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.order-detail-claim-leg-actions .button.compact {
  width: fit-content;
}

.order-detail-items table {
  min-width: 980px;
}

.order-product-summary strong,
.order-detail-items strong {
  display: block;
}

.order-status-badge {
  white-space: nowrap;
}

.order-cs-history,
.order-refund-list {
  display: grid;
}

.order-cs-history article,
.order-refund-list article {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
}

.order-cs-history p,
.order-refund-list p,
.order-qna-list p,
.order-consult-empty {
  margin: 0;
  color: var(--muted-foreground);
}

.order-consult-empty {
  padding: 28px 18px;
  text-align: center;
}

.order-qna-list {
  display: grid;
}

.order-qna-list article {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding: 16px 18px;
}

.order-qna-list article > small {
  color: var(--muted-foreground);
  font-size: 12px;
}

.order-qna-answer {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  border-left: 1px solid var(--border);
  padding: 10px 12px;
  background: var(--card);
}

.order-qna-answer strong {
  font-size: 13px;
}

.order-party-information {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.order-party-information > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  border-bottom: 1px solid var(--border);
}

.order-party-information dt,
.order-party-information dd {
  margin: 0;
  padding: 15px 18px;
}

.order-party-information dt {
  background: var(--card);
  color: var(--foreground);
  font-weight: var(--weight-bold);
}

.order-party-information dd {
  color: var(--ink);
}

.order-action-dialog {
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow-sm);
}

.order-action-dialog::backdrop {
  background: var(--card);
}

.order-action-dialog-panel {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 20px;
}

.order-action-dialog-panel > header,
.order-action-dialog-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.order-action-dialog-panel h2,
.order-action-dialog-panel .eyebrow {
  margin: 0;
}

.order-cj-error-dialog-panel {
  border-top: 1px solid var(--border);
}

.order-cj-error-detail {
  display: grid;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.order-cj-error-detail > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
}

.order-cj-error-detail > div + div {
  border-top: 1px solid var(--border);
}

.order-cj-error-detail dt,
.order-cj-error-detail dd {
  margin: 0;
  padding: 12px 14px;
}

.order-cj-error-detail dt {
  background: var(--card);
  color: var(--foreground);
  font-weight: var(--weight-bold);
}

.order-cj-error-detail dd {
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.order-cj-error-detail code {
  color: var(--foreground);
  font-size: 12px;
}

.order-cj-package-dialog-panel {
  border-top: 1px solid var(--border);
}

.order-cj-package-guide {
  margin: 0;
  border-radius: var(--radius);
  background: var(--card);
  padding: 12px 14px;
  color: var(--foreground);
  line-height: 1.65;
}

.order-cj-package-guide code {
  font-weight: var(--weight-bold);
}

.order-cj-package-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.55fr);
  gap: 14px;
}

.order-cj-package-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.order-cj-package-fields select,
.order-cj-package-fields input,
.order-cj-package-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
  color: var(--ink);
}

.order-cj-package-reason-field {
  grid-column: 1 / -1;
}

.order-cj-package-reason-field textarea {
  resize: vertical;
}

.order-cj-fare-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.order-cj-fare-input > span {
  color: var(--ink);
}

.order-dialog-choices {
  display: grid;
  gap: 8px;
  border: 0;
  padding: 0;
}

.order-dialog-choices legend {
  margin-bottom: 8px;
  font-weight: var(--weight-bold);
}

.order-dialog-choices label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 13px;
}

.order-dialog-choices label span,
.order-dialog-choices label small {
  display: grid;
}

.order-dialog-choices label small {
  margin-top: 3px;
  color: var(--muted-foreground);
}

.order-admin-return-dialog-panel {
  border-top: 1px solid var(--border);
}

.order-admin-return-guide {
  margin: 0;
  border-radius: var(--radius);
  background: var(--card);
  padding: 12px 14px;
  color: var(--foreground);
  line-height: 1.65;
}

.order-admin-return-dialog-panel > label {
  display: grid;
  gap: 7px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.order-admin-return-dialog-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  resize: vertical;
}

.order-admin-return-summary {
  display: grid;
  gap: 8px;
  margin: 0;
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px 14px;
}

.order-admin-return-summary > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
}

.order-admin-return-summary dt {
  color: var(--muted-foreground);
}

.order-admin-return-summary dd {
  margin: 0;
  font-weight: var(--weight-bold);
}

.order-admin-partial-refund-controls {
  display: grid;
  min-width: 150px;
  gap: 8px;
}

.order-admin-partial-refund-controls > article {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.order-admin-partial-refund-controls > article:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.order-admin-partial-refund-controls small {
  color: var(--muted-foreground);
}

.order-admin-partial-refund-dialog-panel {
  border-top: 1px solid var(--border);
}

.order-admin-partial-refund-guide {
  margin: 0;
  border-radius: var(--radius);
  background: var(--card);
  padding: 12px 14px;
  color: var(--foreground);
  line-height: 1.65;
}

.order-admin-partial-refund-dialog-panel > label {
  display: grid;
  gap: 7px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.order-admin-partial-refund-dialog-panel input,
.order-admin-partial-refund-dialog-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.order-admin-partial-refund-dialog-panel textarea {
  resize: vertical;
}

.order-admin-partial-refund-amount-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.order-admin-partial-refund-summary {
  display: grid;
  gap: 8px;
  margin: 0;
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px 14px;
}

.order-admin-partial-refund-summary.calculated {
  background: var(--card);
}

.order-admin-partial-refund-summary > div {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 10px;
}

.order-admin-partial-refund-summary dt {
  color: var(--muted-foreground);
}

.order-admin-partial-refund-summary dd {
  margin: 0;
  font-weight: var(--weight-bold);
}

.order-admin-partial-refund-history {
  display: grid;
  max-height: 180px;
  gap: 6px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.order-admin-partial-refund-history p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.order-completed-return-actions {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.order-completed-return-actions .button {
  height: auto;
  min-height: 32px;
  line-height: 1.35;
  white-space: normal;
}

.order-dialog-list {
  display: grid;
  max-height: 54vh;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
}

.order-dialog-list > label,
.order-dialog-list > article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 12px;
}

.order-dialog-list > label:last-child,
.order-dialog-list > article:last-child {
  border-bottom: 0;
}

.order-dialog-list article > div {
  display: grid;
  gap: 3px;
}

.order-dialog-list article small {
  color: var(--muted-foreground);
}

.order-action-dialog.order-bundle-dialog {
  width: min(1180px, calc(100vw - 24px));
}

.order-bundle-dialog-panel {
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.order-dialog-summary {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
}

.order-bundle-help {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px 16px;
}

.order-bundle-help strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

.order-bundle-help ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--foreground);
  font-size: 12px;
  line-height: 1.55;
}

.order-bundle-validation {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 11px 13px;
  color: var(--foreground);
  font-size: 12px;
  font-weight: var(--weight-bold);
}

.order-bundle-validation.is-success {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.order-bundle-validation.is-warning {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.order-bundle-validation.is-error {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.order-bundle-preview-table {
  min-width: 1040px;
}

.order-bundle-preview-table th,
.order-bundle-preview-table td {
  padding: 11px 10px;
}

.order-bundle-preview-table th:nth-child(1),
.order-bundle-preview-table th:nth-child(2),
.order-bundle-preview-table th:nth-child(3),
.order-bundle-preview-table th:nth-child(7) {
  white-space: nowrap;
}

.bundle-recipient-cell {
  display: grid;
  min-width: 118px;
  gap: 6px;
}

.bundle-address-cell {
  min-width: 240px;
  white-space: normal;
}

.order-action-dialog.order-recipient-dialog {
  width: min(720px, calc(100vw - 24px));
}

.order-recipient-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.order-recipient-fields label,
.order-recipient-address {
  display: grid;
  gap: 7px;
  color: var(--foreground);
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.order-recipient-fields input,
.order-recipient-fields textarea {
  width: 100%;
  min-height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  padding: 0 11px;
}

.order-recipient-fields textarea {
  padding-block: 10px;
  resize: vertical;
}

.order-recipient-fields em,
.order-recipient-address em {
  color: var(--foreground);
  font-style: normal;
}

.order-recipient-address {
  grid-column: 1 / -1;
  border: 0;
  margin: 0;
  padding: 0;
}

.order-recipient-address legend {
  margin-bottom: 7px;
}

.order-recipient-postcode {
  display: grid;
  grid-template-columns: minmax(120px, 180px) auto;
  justify-content: start;
  gap: 7px;
}

.order-recipient-message {
  grid-column: 1 / -1;
}

.order-recipient-dialog .policy-note {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 11px;
}

@media (max-width: 1100px) {
  .order-management-page #orderSearchResults .order-unified-table,
  .order-management-page #orderBundleResults .order-unified-table {
    min-width: 860px;
  }

  .order-management-page[data-order-view="shipping"] #orderSearchResults .order-unified-table {
    min-width: 720px;
  }

  .order-management-page[data-order-view="card-cancel"] #orderSearchResults .order-unified-table {
    min-width: 640px;
  }

  .order-upload-grid {
    grid-template-columns: 1fr;
  }

  .order-upload-card + .order-upload-card {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .order-status-queue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-status-queue a:nth-child(2n) {
    border-right: 0;
  }

  .order-status-queue a:nth-child(n) {
    border-bottom: 1px solid var(--line);
  }

  .order-status-queue a:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .order-dashboard-page .page-head,
  .order-detail-page .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .order-dashboard-search,
  .order-dashboard-search label,
  .order-dashboard-search input {
    width: 100%;
  }

  .order-dashboard-search .button {
    flex: 0 0 auto;
  }

  .order-filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .order-filter-label,
  .order-status-filter legend,
  .order-filter-row .filter-select {
    flex-basis: auto;
    width: 100%;
  }

  .order-date-field input,
  .order-filter-row select {
    width: 100%;
  }

  .order-date-separator {
    display: none;
  }

  .order-range-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .order-results-head {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 12px;
  }

  .order-results-head .button-row {
    width: 100%;
    justify-content: flex-start;
  }

  .order-upload-card {
    grid-template-columns: 1fr;
  }

  .order-upload-fields,
  .order-party-information {
    grid-template-columns: 1fr;
  }

  .order-upload-card > .button {
    width: 100%;
  }

  .order-party-information > div {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .unified-order-tracking {
    grid-template-columns: 1fr;
  }

  .order-action-dialog-panel {
    padding: 16px;
  }

  .order-recipient-fields {
    grid-template-columns: 1fr;
  }

  .order-cj-package-fields {
    grid-template-columns: 1fr;
  }

  .order-cj-package-reason-field {
    grid-column: 1;
  }

  .order-recipient-fields label,
  .order-recipient-address,
  .order-recipient-message {
    grid-column: 1;
  }

  .order-recipient-postcode {
    grid-template-columns: 1fr;
  }

  .order-detail-claim-leg-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin account security */
body[data-mode="account-security"] .content {
  max-width: 980px;
}

.account-security-layout {
  display: grid;
  grid-template-columns: minmax(0, 620px);
}

.account-security-form {
  padding: 26px;
}

.account-security-form .panel-head {
  align-items: flex-start;
  margin-bottom: 24px;
}

.account-security-form .panel-head p {
  margin: 7px 0 0;
  color: var(--foreground);
  font-size: 13px;
}

.account-security-fields {
  display: grid;
  gap: 18px;
}

.account-security-fields label {
  display: grid;
  gap: 8px;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 700;
}

.account-security-fields input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 14px;
  color: var(--foreground);
  font: inherit;
}

.account-security-fields input:focus {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.account-security-help {
  margin: 14px 0 0;
  color: var(--foreground);
  font-size: 12px;
  line-height: 1.55;
}

.account-security-status {
  min-height: 21px;
  margin: 16px 0 0;
  text-align: left;
}

.account-security-status.success,
.form-success {
  color: var(--foreground);
}

.account-security-submit {
  width: 100%;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .account-security-form {
    padding: 20px 16px;
  }
}
