:root {
  color: #342d2b;
  background: #fbf7f1;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(251, 247, 241, 0.94), rgba(246, 239, 229, 0.94)),
    repeating-linear-gradient(90deg, rgba(92, 72, 56, 0.04) 0 1px, transparent 1px 24px);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar,
.panel-heading,
.actions,
.admin-sidebar nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading {
  flex-wrap: wrap;
  min-width: 0;
}

.panel-heading > div,
.panel,
.list-row,
.order-list,
.order-row-button,
.order-row-button span,
.detail-list,
.detail-list dd {
  min-width: 0;
}

.topbar-actions,
.customer-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.product-shell-mount {
  width: 100%;
}

.product-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 4px 0 18px;
  border-bottom: 1px solid rgba(52, 45, 43, 0.12);
}

.product-page-heading > div:first-child {
  min-width: 0;
}

.product-page-heading h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.product-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #7c6b5b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.step-label {
  width: fit-content;
  margin: 0;
  border-radius: 999px;
  background: #eef4ed;
  color: #526f57;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.3rem;
}

h3 {
  margin-bottom: 10px;
}

.ghost-link,
.admin-sidebar a,
.admin-sidebar button,
.inline-form button {
  border: 1px solid rgba(52, 45, 43, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #342d2b;
  cursor: pointer;
  padding: 10px 14px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.ghost-link:hover,
.admin-sidebar a:hover,
.admin-sidebar button:hover,
.inline-form button:hover {
  border-color: #a45f49;
  background: #fff;
  transform: translateY(-1px);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  align-items: stretch;
  margin: 28px 0;
  padding: 28px;
  border: 1px solid rgba(115, 89, 67, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.intro-band h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.intro-band p {
  color: #6b5b50;
  font-size: 1.02rem;
  line-height: 1.8;
}

.sample-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 220px;
}

.sample-strip span,
.image-slot {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px dashed rgba(123, 91, 65, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(195, 145, 112, 0.12), rgba(108, 139, 121, 0.12)),
    #fffaf4;
  color: #8a7767;
  font-size: 0.92rem;
  overflow: hidden;
}

.image-slot.has-image {
  min-height: 180px;
  border-style: solid;
  padding: 0;
  background: #fff;
}

.image-slot img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}

.watermark-frame {
  position: relative;
  display: block;
  overflow: hidden;
}

.watermark-frame::after {
  content: attr(data-watermark);
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  width: max-content;
  max-width: 64%;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.42);
  color: rgba(52, 45, 43, 0.24);
  font-size: clamp(0.68rem, 1.6vw, 0.92rem);
  font-weight: 800;
  letter-spacing: 0;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  user-select: none;
}

.thumb-button .watermark-frame {
  border-radius: 8px;
}

.accessory-sheet-grid .image-slot.has-image,
.accessory-sheet-grid .image-slot img {
  min-height: 220px;
}

.accessory-sheet-grid .image-slot img {
  object-fit: contain;
  background: #fffaf4;
}

.sample-strip span:first-child {
  grid-row: span 2;
}

.order-form,
.form-section,
.panel,
.success-panel {
  display: grid;
  gap: 18px;
}

.form-section,
.panel,
.success-panel {
  padding: 22px;
  border: 1px solid rgba(115, 89, 67, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 50px rgba(76, 55, 36, 0.07);
}

.field-grid,
.choice-grid,
.admin-grid,
.catalog-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.section-help {
  margin: -4px 0 0;
  color: #6b5b50;
  line-height: 1.7;
}

.option-groups {
  display: grid;
  gap: 16px;
}

.option-group {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  padding: 14px;
}

.option-group-heading {
  display: grid;
  gap: 4px;
}

.option-group-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.option-group-heading small {
  color: #78685c;
  line-height: 1.5;
}

.option-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}

.option-chip {
  min-height: 42px;
  border: 1px solid rgba(52, 45, 43, 0.14);
  border-radius: 8px;
  background: #fffaf4;
  color: #342d2b;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 9px 10px;
  text-align: center;
}

.option-chip.selected {
  border-color: #a45f49;
  background: #fff0e6;
  box-shadow: 0 0 0 2px rgba(164, 95, 73, 0.12);
}

.person-count-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.step-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
  margin-bottom: 2px;
}

.step-dot {
  display: grid;
  gap: 5px;
  justify-items: center;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #6b5b50;
  cursor: pointer;
  padding: 9px 6px;
}

.step-dot span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #f1e6da;
  color: #6b5b50;
  font-size: 0.82rem;
  font-weight: 900;
}

.step-dot small {
  font-size: 0.76rem;
  font-weight: 800;
}

.step-dot.active {
  border-color: #a45f49;
  background: #fff7ed;
}

.step-dot.active span,
.step-dot.done span {
  background: #a45f49;
  color: #fffdf9;
}

.previous-step-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(164, 95, 73, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 240, 230, 0.9), rgba(255, 253, 249, 0.96));
}

.previous-step-summary-heading {
  color: #8f4f3d;
  font-size: 0.92rem;
  font-weight: 900;
}

.previous-step-summary dl {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.previous-step-summary div {
  display: grid;
  gap: 3px;
  min-width: min(220px, 100%);
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(164, 95, 73, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.previous-step-summary dt {
  color: #78685c;
  font-size: 0.82rem;
  font-weight: 900;
}

.previous-step-summary dd {
  margin: 0;
  color: #342d2b;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.step-screen {
  min-height: 360px;
}

.step-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: sticky;
  bottom: 0;
  z-index: 10;
  border-top: 1px solid rgba(52, 45, 43, 0.1);
  background: rgba(251, 247, 241, 0.94);
  padding: 12px 0 0;
  backdrop-filter: blur(10px);
}

.step-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.review-list {
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  padding: 14px;
}

.settlement-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settlement-panel > div {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffaf4;
  padding: 16px;
}

.settlement-panel h3,
.settlement-panel p {
  margin: 0;
}

.settlement-panel strong {
  color: #a45f49;
  font-size: 1.35rem;
  font-weight: 900;
}

.settlement-panel small {
  color: #6b5b50;
  line-height: 1.55;
}

.count-button {
  min-height: 46px;
  border: 1px solid rgba(52, 45, 43, 0.14);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  cursor: pointer;
  font-weight: 800;
}

.count-button.selected {
  border-color: #a45f49;
  background: #fff0e6;
  box-shadow: 0 0 0 2px rgba(164, 95, 73, 0.12);
}

.theme-preview-trigger {
  display: block;
  cursor: zoom-in;
}

.theme-preview-trigger:focus-visible {
  outline: 3px solid rgba(164, 95, 73, 0.5);
  outline-offset: 3px;
  border-radius: 8px;
}

.people-stack {
  display: grid;
  gap: 18px;
}

.person-panel {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffaf4;
  padding: 16px;
}

.person-heading {
  display: grid;
  gap: 4px;
}

.person-heading h3 {
  margin: 0;
  font-size: 1.15rem;
}

.person-heading small {
  color: #78685c;
  line-height: 1.5;
}

.person-name-field {
  display: grid;
  gap: 10px;
  border: 2px solid rgba(164, 95, 73, 0.36);
  border-radius: 8px;
  background: #fff1e6;
  padding: 14px;
  box-shadow: 0 0 0 4px rgba(164, 95, 73, 0.08);
}

.person-name-field strong {
  color: #8f4f3d;
  font-size: 1.02rem;
}

.person-name-field span {
  color: #6b5b50;
  line-height: 1.45;
}

.compact-group {
  background: #fffdf9;
  padding: 12px;
}

.collapsible-option-group {
  display: grid;
  gap: 12px;
}

.collapsible-option-group:not([open]) {
  gap: 0;
}

.option-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.option-group-summary::-webkit-details-marker {
  display: none;
}

.option-group-summary span:first-child {
  display: grid;
  gap: 4px;
}

.option-group-summary strong {
  color: #342d2b;
  font-size: 1.05rem;
}

.option-group-summary small {
  color: #78685c;
  line-height: 1.35;
}

.summary-chevron {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-right: 2px solid #a45f49;
  border-bottom: 2px solid #a45f49;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.collapsible-option-group[open] .summary-chevron {
  transform: rotate(225deg);
}

.visual-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.visual-option-grid.accessory-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  justify-items: stretch;
}

.visual-option {
  display: grid;
  gap: 8px;
  min-height: 144px;
  border: 1px solid rgba(52, 45, 43, 0.14);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  cursor: pointer;
  overflow: hidden;
  padding: 8px;
  text-align: center;
}

.visual-option.selected {
  border-color: #a45f49;
  background: #fff0e6;
  box-shadow: 0 0 0 2px rgba(164, 95, 73, 0.12);
}

.accessory-choice {
  align-content: start;
  cursor: default;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 214px;
  justify-items: center;
  padding: 8px;
}

.accessory-choice-main {
  align-content: start;
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: center;
  justify-items: center;
}

.accessory-choice .option-thumb-frame {
  aspect-ratio: 1;
  max-height: 118px;
  width: 100%;
  display: grid;
  place-items: center;
}

.accessory-choice .option-thumb {
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.accessory-quantity {
  display: grid;
  grid-template-columns: 30px minmax(44px, 1fr) 30px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 2px;
  width: min(100%, 122px);
}

.accessory-quantity button {
  box-sizing: border-box;
  width: 30px;
  height: 32px;
  border: 1px solid rgba(164, 95, 73, 0.24);
  border-radius: 8px;
  background: #fff8f1;
  color: #7f3f2c;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 900;
}

.accessory-quantity button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.accessory-quantity span {
  box-sizing: border-box;
  min-width: 0;
  border-radius: 8px;
  background: rgba(244, 231, 216, 0.72);
  color: #5f4f46;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 32px;
}

.accessory-assignment-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(164, 95, 73, 0.18);
  border-radius: 8px;
  background: #fffaf4;
}

.accessory-assignment-list {
  display: grid;
  gap: 10px;
}

.accessory-assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffdf9;
}

.assignment-option {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.assignment-option .option-thumb-frame {
  width: 58px;
  height: 58px;
}

.assignment-option .option-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.assignment-option strong,
.assignment-option small {
  display: block;
  overflow-wrap: anywhere;
}

.accessory-assignment-row label {
  display: grid;
  gap: 6px;
  margin: 0;
}

.visual-option .option-label,
.visual-option > span:last-child:not(.option-price) {
  align-self: center;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.visual-option .option-price {
  justify-self: center;
  align-self: center;
  min-width: 48px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f4e7d8;
  color: #7f3f2c;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
}

.thumb-button {
  display: block;
  border-radius: 8px;
  outline: none;
}

.option-thumb-frame {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.option-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  border: 1px solid rgba(123, 91, 65, 0.22);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(28, 22, 18, 0.55);
  padding: 20px;
}

.preview-modal {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  border-radius: 8px;
  background: #fffdf9;
  padding: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.preview-modal h2 {
  margin-bottom: 0;
}

.preview-close {
  justify-self: end;
  border: 1px solid rgba(52, 45, 43, 0.16);
  border-radius: 8px;
  background: #fff;
  color: #342d2b;
  cursor: pointer;
  font-weight: 800;
  padding: 8px 12px;
}

.preview-crop {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  border: 1px solid rgba(123, 91, 65, 0.22);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

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

.option-order-field {
  display: grid;
  gap: 6px;
}

.option-order-field small {
  color: #8a7767;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: #8a7767;
  font-size: 0.9rem;
  line-height: 1.5;
}

.reference-upload-zone {
  display: grid;
  gap: 6px;
  border: 1px dashed rgba(174, 96, 68, 0.38);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.72);
  padding: 12px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.reference-upload-zone:focus,
.reference-upload-zone:focus-within,
.reference-upload-zone.is-drag-over {
  outline: none;
  border-color: #ae6044;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(174, 96, 68, 0.12);
}

.reference-upload-zone p {
  margin: 0;
  color: #8a7767;
  font-size: 0.9rem;
  line-height: 1.5;
}

.reference-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
}

.editable-attachment-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.editable-attachment-item {
  display: grid;
  gap: 8px;
  align-content: start;
}

.reference-image-item {
  display: grid;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.reference-image-item img,
.reference-image-item span {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffaf4;
  object-fit: cover;
}

.reference-image-item span {
  display: grid;
  place-items: center;
  color: #8a7767;
}

.reference-image-item small {
  overflow: hidden;
  color: #6f6259;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.selected-file-row .attachment-note {
  flex: 1 1 220px;
}

.tiny-danger-button {
  min-height: 34px;
  border: 1px solid rgba(168, 79, 69, 0.24);
  border-radius: 8px;
  background: #fff1ec;
  color: #8c3f37;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 7px 10px;
}

.tiny-danger-button:hover {
  border-color: rgba(168, 79, 69, 0.48);
  background: #ffe6dc;
}

.completion-image-item {
  align-content: start;
}

.completion-image-item a {
  display: grid;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.completion-image-item .tiny-link {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 0.82rem;
}

.customer-completion-feedback {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(52, 45, 43, 0.14);
}

.customer-completion-feedback strong {
  display: block;
  color: #4b3b33;
  font-size: 0.95rem;
}

.customer-completion-feedback small {
  color: #8a7767;
  font-size: 0.78rem;
}

.customer-completion-list {
  grid-template-columns: repeat(auto-fill, minmax(72px, 92px));
}

.customer-completion-thumb {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.customer-completion-thumb:disabled {
  cursor: default;
  opacity: 0.65;
}

.customer-completion-thumb:focus-visible {
  outline: 2px solid rgba(168, 96, 69, 0.55);
  outline-offset: 3px;
}

.change-request-panel {
  display: grid;
  gap: 9px;
  grid-column: 1 / -1;
  border: 1px solid rgba(168, 96, 69, 0.22);
  border-radius: 8px;
  background: #fff7ed;
  padding: 12px;
}

.change-request-panel.pending {
  border-left: 4px solid #b76749;
}

.change-request-panel strong {
  color: #3c332f;
}

.change-request-panel p {
  margin: 0;
  color: #5f5149;
}

.change-request-panel small {
  color: #806f61;
  font-weight: 700;
}

label,
.edit-stack {
  display: grid;
  gap: 8px;
  color: #5a4a41;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(52, 45, 43, 0.16);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  padding: 12px 13px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #a45f49;
  box-shadow: 0 0 0 3px rgba(164, 95, 73, 0.12);
}

.choice-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 210px;
  border: 1px solid rgba(52, 45, 43, 0.14);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.theme-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.theme-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.theme-showcase-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffdf9;
}

.theme-showcase-card.selected {
  border-color: rgba(164, 95, 73, 0.72);
  box-shadow: 0 0 0 3px rgba(164, 95, 73, 0.12);
}

.theme-showcase-image {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(52, 45, 43, 0.1);
  background: #fffaf4;
  cursor: zoom-in;
  padding: 0;
}

.theme-showcase-image .image-slot,
.theme-showcase-image .image-slot.has-image {
  aspect-ratio: 4 / 3;
  min-height: 0;
  border-radius: 0;
}

.theme-showcase-image .image-slot img {
  min-height: 0;
  object-fit: contain;
  background: #fffaf4;
}

.theme-showcase-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  min-height: 0;
}

.theme-showcase-body h3,
.theme-showcase-body p {
  margin: 0;
}

.theme-showcase-body h3 {
  color: #342d2b;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.35;
}

.theme-showcase-body p {
  display: -webkit-box;
  overflow: hidden;
  color: #6b5b50;
  font-size: 0.86rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.theme-meta-compact {
  gap: 4px;
  align-self: start;
  min-height: 126px;
  overflow: hidden;
}

.theme-meta-compact .theme-meta-row {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  min-height: 38px;
  padding-top: 5px;
}

.theme-meta-compact .theme-meta-row dd {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.theme-select-button {
  align-self: end;
  width: 100%;
  border: 1px solid rgba(164, 95, 73, 0.42);
  border-radius: 8px;
  background: #a45f49;
  color: #fffdf9;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 9px 10px;
}

.theme-showcase-card.selected .theme-select-button {
  background: #fff7ed;
  color: #7f3f2c;
}

.theme-card {
  gap: 12px;
  min-height: 0;
}

.theme-card .image-slot.has-image {
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: #fffaf4;
}

.theme-card .image-slot img {
  min-height: 0;
  object-fit: contain;
  background: #fffaf4;
}

.theme-title {
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.35;
}

.theme-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.theme-extra-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(164, 95, 73, 0.22);
  border-radius: 8px;
  background: #fff7ed;
  padding: 14px;
}

.theme-extra-panel small {
  color: #8a7767;
  line-height: 1.5;
}

.count-step-option {
  border-width: 2px;
  border-color: rgba(164, 95, 73, 0.42);
  box-shadow: 0 10px 24px rgba(164, 95, 73, 0.08);
}

.count-step-option .checkbox-line span {
  color: #342d2b;
  font-size: 1.02rem;
  font-weight: 900;
}

.theme-meta-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(115, 89, 67, 0.12);
}

.theme-meta-row dt,
.theme-meta-row dd {
  margin: 0;
}

.theme-meta-row dt {
  color: #8a7767;
  font-size: 0.82rem;
  font-weight: 800;
}

.theme-meta-row dd {
  display: grid;
  gap: 4px;
  color: #4c3d34;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.choice-card.compact {
  min-height: 250px;
}

.choice-card.selected {
  border-color: #a45f49;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(164, 95, 73, 0.12);
}

.choice-card small,
.list-row small,
.catalog-row small,
.wechat-box small {
  color: #78685c;
  line-height: 1.5;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #a45f49;
  color: #fffdf9;
  cursor: pointer;
  font-weight: 800;
  padding: 13px 18px;
}

.primary-button:hover {
  background: #8f4f3d;
}

.global-loading-indicator {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  max-width: min(440px, calc(100% - 32px));
  min-width: min(280px, calc(100% - 32px));
  border: 1px solid rgba(82, 111, 87, 0.28);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 22px 58px rgba(52, 45, 43, 0.22);
  color: #2f4433;
  font-size: 1.02rem;
  font-weight: 800;
  padding: 18px 22px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 16px));
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.global-loading-indicator.visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(82, 111, 87, 0.22);
  border-top-color: #526f57;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: loading-spin 0.75s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  margin: 0;
  border: 1px dashed rgba(123, 91, 65, 0.3);
  border-radius: 8px;
  background: #fffaf4;
  color: #78685c;
  padding: 16px;
}

.warning-state {
  border-color: rgba(171, 95, 72, 0.42);
  background: #fff3ec;
  color: #7a3f2e;
  font-weight: 700;
}

.success-page {
  display: grid;
  min-height: calc(100vh - 176px);
  place-items: center;
}

.success-panel {
  width: min(640px, 100%);
}

.stacked-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.wechat-box {
  display: grid;
  gap: 8px;
  border-left: 4px solid #6f8a73;
  background: #f4f8f1;
  padding: 16px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(251, 247, 241, 0.94), rgba(246, 239, 229, 0.94)),
    repeating-linear-gradient(90deg, rgba(92, 72, 56, 0.04) 0 1px, transparent 1px 24px);
}

.admin-sidebar {
  display: flex;
  position: sticky;
  top: 0;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid rgba(52, 45, 43, 0.12);
  background: #f7efe4;
}

.admin-sidebar h1 {
  font-size: 2.2rem;
}

.admin-sidebar nav {
  align-items: stretch;
  flex-direction: column;
}

.admin-sidebar button,
.admin-sidebar a {
  width: 100%;
  text-align: left;
}

.admin-sidebar button.active {
  border-color: #a45f49;
  background: #fff;
}

.admin-content {
  min-width: 0;
  padding: 24px;
}

.admin-login-page {
  min-height: 100vh;
  place-items: center;
}

.admin-login-panel {
  width: min(460px, 100%);
}

.admin-login-error {
  margin: 0;
  border-radius: 8px;
  background: #fff0e6;
  color: #8f3f2d;
  font-weight: 800;
  padding: 10px 12px;
}

.image-export-panel {
  align-content: start;
}

.catalog-wide-panel,
.admin-preview-panel {
  grid-column: 1 / -1;
}

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

.compact-danger {
  padding: 10px 12px;
}

.catalog-edit-form {
  margin: 0;
}

.catalog-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(164, 95, 73, 0.16);
  border-radius: 8px;
  background: #fffaf4;
  margin: 14px 0 12px;
  padding: 12px;
}

.catalog-filter label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b5b50;
  font-weight: 900;
}

.catalog-filter select {
  min-width: 220px;
}

.catalog-filter span {
  color: #78685c;
  font-size: 0.9rem;
  font-weight: 800;
}

.accessory-admin-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.catalog-thumb-preview {
  width: 74px;
}

.catalog-thumb-preview .option-thumb-wrap {
  width: 62px;
  height: 62px;
}

.admin-preview-frame {
  width: 100%;
  min-height: 780px;
  border: 1px solid rgba(52, 45, 43, 0.14);
  border-radius: 8px;
  background: #fffdf9;
}

.image-export-list {
  margin-top: 4px;
}

.image-export-row {
  cursor: default;
}

.image-export-row .ghost-link {
  width: auto;
  white-space: nowrap;
}

.image-export-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.export-progress {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  padding: 12px;
}

.export-progress p {
  margin: 0;
  color: #6b5b50;
  font-weight: 700;
}

.export-progress-bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #efe6d8;
}

.export-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #a45f49;
  transition: width 0.2s ease;
}

.admin-grid {
  align-items: start;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
  min-width: 0;
}

.order-admin-grid {
  align-items: start;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  min-width: 0;
}

.order-admin-grid > .panel {
  min-height: 0;
  min-width: 0;
}

.order-admin-grid > .panel:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(520px, 1fr) auto;
  min-height: calc(100vh - 48px);
  height: auto;
  max-height: none;
}

.order-admin-grid > .panel:first-child .panel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.order-admin-grid > .panel:first-child .admin-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  width: 100%;
  max-width: 100%;
}

.order-admin-grid > .panel:first-child .admin-toolbar .bulk-count {
  grid-column: 1 / -1;
}

.order-admin-grid > .panel:first-child .admin-toolbar .ghost-link {
  width: 100%;
  min-width: 0;
}

.order-admin-grid > .panel:first-child .order-list {
  overflow: auto;
  min-height: 0;
  max-height: max(620px, calc(100vh - 390px));
  padding-right: 4px;
}

.order-admin-grid > .panel:last-child {
  align-self: start;
}

@media (min-width: 861px) {
  .order-admin-grid > .panel:last-child {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow: auto;
  }
}

@media (min-width: 861px) and (max-width: 1120px) {
  .order-admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-admin-grid > .panel:first-child,
  .order-admin-grid > .panel:last-child {
    max-height: none;
    overflow: visible;
  }

  .order-admin-grid > .panel:first-child .order-list {
    overflow: auto;
    max-height: min(420px, 55vh);
  }

  .order-admin-grid > .panel:last-child {
    position: static;
  }
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-toolbar .ghost-link,
.admin-toolbar select {
  width: auto;
  min-width: 150px;
}

.order-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.order-stats div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  padding: 14px;
}

.order-stats strong {
  color: #a45f49;
  font-size: 1.4rem;
}

.order-stats span {
  color: #6b5b50;
  font-weight: 800;
}

.order-search-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
  gap: 10px;
  border: 1px solid rgba(164, 95, 73, 0.16);
  border-radius: 8px;
  background: #fffaf4;
  margin: 14px 0;
  padding: 12px;
}

.order-search-panel .bulk-count {
  min-width: 0;
}

.order-export-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  border-top: 1px solid rgba(164, 95, 73, 0.14);
  padding-top: 10px;
}

.order-export-actions .ghost-link {
  width: 100%;
  min-width: 0;
}

.bulk-selection-row {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bulk-selection-row .ghost-link {
  width: auto;
}

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

.sub-panel {
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  padding: 16px;
}

.compact-control {
  display: grid;
  gap: 6px;
  color: #6b5b50;
  font-weight: 800;
  min-width: 180px;
}

.ranking-list {
  display: grid;
  gap: 8px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(52, 45, 43, 0.08);
  padding: 10px 0;
}

.ranking-row strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #eef4ed;
  color: #526f57;
}

.ranking-row em {
  color: #a45f49;
  font-style: normal;
  font-weight: 900;
}

.customer-analytics-panel {
  grid-column: 1 / -1;
}

.customer-analytics-list {
  display: grid;
  gap: 10px;
}

.customer-analytics-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid rgba(52, 45, 43, 0.08);
  padding: 10px 0;
}

.customer-analytics-row > strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #eef4ed;
  color: #526f57;
}

.customer-analytics-row h4 {
  margin: 0 0 6px;
  color: #2d2926;
  font-size: 1rem;
}

.customer-analytics-row small {
  color: #8c7d72;
}

.customer-analytics-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.customer-analytics-metrics span {
  border-radius: 999px;
  background: #fff5ed;
  color: #6b5b50;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 8px;
}

.user-management-row {
  align-items: start;
  flex-wrap: wrap;
}

.user-management-row > span p {
  margin: 6px 0 0;
  color: #6b5b50;
}

.user-meta-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  flex: 1 1 360px;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.user-meta-form textarea {
  grid-column: 1 / -1;
}

.order-search-panel label {
  display: grid;
  gap: 6px;
  color: #6b5b50;
  font-size: 0.86rem;
  font-weight: 900;
}

.order-list,
.admin-list,
.accessory-list {
  display: grid;
  gap: 10px;
}

.list-row,
.catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffdf9;
  color: #342d2b;
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.order-select-row {
  cursor: default;
  padding: 0;
}

.order-checkbox {
  display: grid;
  flex: 0 0 auto;
  min-height: 100%;
  padding: 14px 0 14px 14px;
  place-items: center;
}

.order-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #a45f49;
}

.order-row-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.order-row-button strong,
.order-row-button small,
.detail-list dd,
.order-log-item span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-row-badges {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  max-width: 100%;
}

.new-order-pill {
  border-radius: 999px;
  background: #a84f45;
  color: #fffdf9;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  padding: 5px 9px;
}

.bulk-count {
  align-self: center;
  color: #6b5b50;
  font-size: 0.9rem;
  font-weight: 800;
}

.list-row span,
.catalog-row span {
  display: grid;
  gap: 4px;
}

.list-row.active,
.catalog-row.active {
  border-color: #a45f49;
  background: #fff7ed;
}

.list-row em,
.catalog-row em,
.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef4ed;
  color: #526f57;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
  padding: 6px 10px;
}

.price-highlight {
  color: #a45f49;
  font-size: 1.08rem;
}

.detail-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.danger-button {
  border: 0;
  border-radius: 8px;
  background: #a84f45;
  color: #fffdf9;
  cursor: pointer;
  font-weight: 900;
  padding: 13px 16px;
}

.danger-button:hover {
  background: #8c3f37;
}

.edit-cart-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(164, 95, 73, 0.24);
  border-radius: 8px;
  background: #fff7ed;
  color: #45342b;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.page-update-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 2px solid rgba(168, 79, 69, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff1e8, #fffaf4);
  box-shadow: 0 16px 34px rgba(168, 79, 69, 0.16);
  color: #45342b;
  margin: 0 0 18px;
  padding: 14px;
}

.page-update-notice > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.page-update-notice strong {
  color: #8c3f37;
  font-size: 1.03rem;
}

.page-update-notice span {
  color: #6b5b50;
  font-weight: 800;
}

.edit-cart-notice > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.edit-cart-notice span {
  flex: 1 1 auto;
  color: #6b5b50;
  font-weight: 700;
}

.pending-order-edit-notice {
  position: sticky;
  top: 10px;
  z-index: 12;
  border-width: 2px;
  border-color: rgba(168, 79, 69, 0.46);
  background: linear-gradient(135deg, #fff1e8, #fffaf4);
  box-shadow: 0 14px 34px rgba(168, 79, 69, 0.18);
}

.pending-order-edit-notice strong {
  color: #8c3f37;
  font-size: 1.02rem;
}

.pending-order-edit-notice span {
  color: #5f4b42;
  line-height: 1.5;
}

.pending-order-edit-notice .danger-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.assignment-panel {
  border: 1px solid rgba(164, 95, 73, 0.18);
  border-radius: 8px;
  background: #fffaf3;
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
}

.compact-heading {
  margin-bottom: 0;
}

.checkbox-line {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  accent-color: #a45f49;
}

.orderer-field {
  border: 2px solid rgba(164, 95, 73, 0.32);
  border-radius: 8px;
  background: #fff7ed;
  padding: 14px;
}

.shipping-choice-panel {
  display: grid;
  gap: 12px;
  border: 2px solid rgba(164, 95, 73, 0.34);
  border-radius: 8px;
  background: #fff7ed;
  padding: 16px;
}

.shipping-choice-panel h3 {
  margin: 0 0 4px;
}

.shipping-choice-panel p,
.attachment-note {
  margin: 0;
  color: #7c6b5b;
  font-weight: 700;
}

.inline-link {
  color: #9b513f;
  font-weight: 900;
  text-decoration: underline;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid rgba(52, 45, 43, 0.08);
  padding-bottom: 12px;
}

.detail-list dt {
  color: #7c6b5b;
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  line-height: 1.7;
}

.detail-section {
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  margin-top: 10px;
  overflow: hidden;
}

.detail-section summary {
  cursor: pointer;
  color: #342d2b;
  font-weight: 900;
  list-style-position: inside;
  padding: 12px 14px;
}

.detail-section .detail-list {
  border-top: 1px solid rgba(52, 45, 43, 0.08);
  padding: 12px 14px 2px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 1fr) auto;
  gap: 10px;
}

.inline-form button {
  background: #342d2b;
  color: #fffdf9;
  font-weight: 800;
}

.subheading {
  border-top: 1px solid rgba(52, 45, 43, 0.1);
  margin-top: 6px;
  padding-top: 18px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.switch input {
  width: 18px;
  height: 18px;
}

.accessory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffdf9;
  padding: 14px;
}

.management-form {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffaf4;
  padding: 14px;
}

.management-form + .management-form,
.management-form + .admin-list {
  margin-top: 14px;
}

.order-edit-form {
  margin-bottom: 18px;
}

.json-field {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.order-log-panel {
  border-top: 1px solid rgba(52, 45, 43, 0.1);
  margin-top: 18px;
  padding-top: 18px;
}

.order-log-panel h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.order-log-list {
  display: grid;
  gap: 10px;
}

.order-log-item {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffdf9;
  padding: 12px;
}

.order-log-item span {
  color: #5f5149;
}

.order-log-item small {
  color: #7c6b5b;
  font-weight: 700;
}

.login-panel {
  max-width: 560px;
  margin: 8vh auto 4vh;
}

.customer-list {
  display: grid;
  gap: 12px;
}

.customer-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  border-top: 1px solid rgba(123, 91, 65, 0.14);
  padding-top: 16px;
}

.customer-pagination span {
  color: #6c5f55;
  font-size: 0.92rem;
  font-weight: 800;
}

.customer-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid rgba(123, 91, 65, 0.14);
  padding-top: 14px;
}

.admin-pagination span {
  color: #6c5f55;
  font-size: 0.92rem;
  font-weight: 800;
}

.admin-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.customer-order-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.customer-order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.customer-order-tabs button {
  border: 1px solid #d8d1c6;
  border-radius: 8px;
  background: #fffdf9;
  color: #5f5147;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

.customer-order-tabs button.active {
  border-color: #a9614c;
  background: #a9614c;
  color: #fff;
}

.customer-order-summary div {
  border: 1px solid rgba(82, 111, 87, 0.18);
  border-radius: 8px;
  background: #f5f9f3;
  padding: 14px;
}

.customer-order-summary span,
.customer-order-summary small {
  display: block;
  color: #6a7b66;
  font-size: 0.86rem;
  font-weight: 800;
}

.customer-order-summary strong {
  display: block;
  margin-top: 4px;
  color: #2f4433;
  font-size: 1.28rem;
}

.customer-order-tools {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0 0;
}

.local-recovery-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(82, 111, 87, 0.22);
  border-radius: 8px;
  background: #f5f9f3;
  padding: 14px;
}

.local-recovery-panel div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.local-recovery-panel strong {
  color: #2f4433;
}

.local-recovery-panel span {
  color: #65755f;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.55;
}

.local-recovery-preview {
  display: grid;
  gap: 14px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid rgba(171, 95, 72, 0.36);
  border-radius: 8px;
  background: #fff8f1;
}

.compact-heading {
  margin-bottom: 0;
}

.recovery-order-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.recovery-order-list article {
  padding: 10px 12px;
  border: 1px solid rgba(123, 91, 65, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.recovery-select-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recovery-order-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.recovery-order-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #ab6048;
}

.recovery-order-check span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recovery-order-check small {
  color: #74665d;
  font-size: 14px;
  line-height: 1.45;
}

.customer-order-index {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  border-radius: 999px;
  background: #eef4ed;
  color: #526f57;
  font-size: 0.78rem;
  line-height: 1;
  padding: 5px 8px;
  vertical-align: 2px;
}

.customer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid rgba(52, 45, 43, 0.12);
  border-radius: 8px;
  background: #fffdf9;
  padding: 14px;
}

.customer-card strong,
.customer-card small,
.customer-card p {
  display: block;
}

.customer-card small {
  margin-top: 4px;
  color: #7c6b5b;
  font-weight: 700;
}

.customer-card p {
  margin: 8px 0 0;
  color: #5f5149;
}

.customer-order-detail {
  grid-column: 1 / -1;
  margin-top: 2px;
  border: 1px solid rgba(52, 45, 43, 0.1);
  border-radius: 8px;
  background: #fffaf4;
  overflow: hidden;
}

.customer-order-detail summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #342d2b;
  font-weight: 900;
  list-style-position: inside;
}

.customer-order-detail .detail-list {
  padding: 12px 14px 2px;
  border-top: 1px solid rgba(52, 45, 43, 0.08);
}

.customer-order-detail dd small {
  display: block;
  margin-top: 4px;
  color: #7c6b5b;
  font-weight: 700;
}

.option-thumb-empty {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #78685c;
  font-weight: 800;
}

@media (max-width: 860px) {
  .intro-band,
  .field-grid,
  .choice-grid,
  .order-search-panel,
  .analytics-grid,
  .admin-grid,
  .catalog-layout,
  .admin-shell {
    grid-template-columns: 1fr;
  }

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

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-admin-grid > .panel:first-child,
  .order-admin-grid > .panel:last-child {
    max-height: none;
    overflow: visible;
  }

  .order-admin-grid > .panel:first-child .order-list {
    overflow: auto;
    max-height: min(420px, 55vh);
  }
}

@media (max-width: 560px) {
  .page,
  .admin-content {
    width: min(100% - 20px, 1120px);
    padding: 14px 0 36px;
  }

  .topbar,
  .product-page-heading,
  .panel-heading,
  .actions,
  .accessory-row,
  .accessory-admin-row,
  .customer-card,
  .local-recovery-panel,
  .edit-cart-notice,
  .page-update-notice,
  .topbar-actions,
  .product-page-actions,
  .customer-card-actions,
  .catalog-actions,
  .catalog-filter,
  .catalog-filter label {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .product-page-heading {
    align-items: stretch;
    padding-bottom: 14px;
  }

  .product-page-actions .ghost-link,
  .product-page-actions .status-pill {
    width: 100%;
    text-align: center;
  }

  .user-meta-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .catalog-filter select {
    width: 100%;
    min-width: 0;
  }

  .customer-order-summary {
    grid-template-columns: 1fr;
  }

  .accessory-assignment-row {
    grid-template-columns: 1fr;
  }

  .catalog-thumb-preview {
    width: 100%;
  }

  .admin-toolbar,
  .admin-toolbar .ghost-link,
  .admin-toolbar select {
    width: 100%;
  }

  .intro-band,
  .form-section,
  .panel,
  .success-panel {
    padding: 16px;
  }

  .sample-strip,
  .inline-form,
  .person-count-row,
  .step-actions,
  .settlement-panel {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    padding: 18px;
  }

  .admin-sidebar nav {
    grid-template-columns: 1fr;
  }

  .order-stats {
    grid-template-columns: 1fr;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .global-loading-indicator {
    width: calc(100% - 28px);
    border-radius: 8px;
    padding: 16px 18px;
  }
}

@media (max-width: 380px) {
  .hh-product-shell__brand-copy {
    display: none;
  }
}
