﻿:root {
  color-scheme: light;
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  background: #fff9e8;
  color: #1f2a2a;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 360px;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(246, 192, 86, 0.18), transparent 38%),
    #fff9e8;
}

.sidebar,
.cart-panel {
  background: rgba(255, 255, 255, 0.86);
  border-color: #eadfbc;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  border-right: 1px solid #eadfbc;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.brand-mark {
  flex: 0 0 auto;
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #173f3a;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
}

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

.brand span,
.mini-summary span,
.cart-header span,
.feature-panel span,
.product-info span {
  color: #6b7d78;
  font-size: 13px;
}

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

.category-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: #42524f;
  text-align: left;
}

.category-list button.active,
.category-list button:hover {
  background: #fff1bf;
  color: #0e6b60;
}

.mini-summary {
  margin-top: 34px;
  padding: 18px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.mini-summary strong,
.mini-summary p {
  display: block;
  margin-top: 8px;
}

.mini-summary p {
  margin-bottom: 0;
  color: #6b7d78;
  font-size: 14px;
}

.catalog {
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar h1,
.cart-header h2,
.feature-panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.08;
}

.topbar p {
  margin: 10px 0 0;
  color: #6b7d78;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  padding: 12px 14px;
  border: 1px solid #e6d9b8;
  border-radius: 8px;
  background: #ffffff;
  color: #6b7d78;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #1f2a2a;
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  min-height: 230px;
  margin-bottom: 24px;
  padding: 30px;
  border-radius: 8px;
  background: #173f3a;
  color: #ffffff;
  overflow: hidden;
}

.success-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #efd27e;
  border-radius: 8px;
  background: #fff1bf;
  color: #173f3a;
}

.success-panel strong,
.success-panel span {
  display: block;
}

.success-panel span {
  margin-top: 4px;
  color: #48625c;
  font-size: 14px;
}

.success-panel a,
.admin-topbar a {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #173f3a;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.order-center {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #fffdf7;
}

.order-center-header,
.order-center-card-header,
.order-center-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.order-center-header span {
  color: #6b7d78;
  font-size: 13px;
  font-weight: 700;
}

.order-center-header h2 {
  margin: 2px 0 0;
  color: #1f2a2a;
  font-size: 28px;
}

.order-center-header strong {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1bf;
  color: #173f3a;
}

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

.order-center-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.order-center-card-header strong,
.order-center-meta strong {
  display: block;
  color: #173f3a;
}

.order-center-card-header span,
.order-center-meta span {
  display: block;
  margin-top: 3px;
  color: #6b7d78;
  font-size: 13px;
}

.order-center-card-header b {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e5f4ef;
  color: #0e6b60;
  font-size: 13px;
}

.order-center-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: #42524f;
  font-size: 14px;
  line-height: 1.45;
}

.order-item-price-line {
  display: grid;
  gap: 3px;
}

.order-item-price-line small {
  color: #8a6f3b;
  font-size: 12px;
  font-weight: 700;
}

.status-trail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.status-trail span {
  display: grid;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #f7efd8;
  color: #8a7c5d;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.status-trail span.active {
  background: #173f3a;
  color: #ffffff;
}

.status-trail.cancelled {
  grid-template-columns: 1fr;
}

.status-trail.cancelled span {
  display: none;
}

.status-trail.cancelled small {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff0ed;
  color: #b4432a;
  font-weight: 800;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-actions span {
  color: #6b7d78;
  font-weight: 700;
}

.admin-actions button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: #fff0ed;
  color: #b4432a;
  font-weight: 700;
}

.admin-actions .sound-button {
  background: #fff6d8;
  color: #173f3a;
}

.admin-actions .sound-button.active {
  background: #0e6b60;
  color: #ffffff;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(246, 192, 86, 0.18), transparent 36%),
    #fff9e8;
}

.login-card {
  display: grid;
  gap: 14px;
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.login-card h1 {
  margin: 10px 0 0;
  font-size: 34px;
  line-height: 1.1;
}

.login-card p {
  margin: 0;
  color: #6b7d78;
  line-height: 1.7;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: #42524f;
  font-size: 13px;
}

.login-card input {
  min-height: 42px;
  border: 1px solid #e6d9b8;
  border-radius: 8px;
  padding: 0 12px;
}

.login-card a {
  color: #0e6b60;
  font-weight: 700;
  text-decoration: none;
}

.demo-credential {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff6d8;
  color: #42524f;
  font-size: 13px;
}

.feature-panel span {
  color: #f6d77a;
}

.feature-panel h2 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
}

.feature-panel p {
  max-width: 520px;
  color: #fff1c0;
  line-height: 1.7;
}

.feature-panel button,
.product-actions button,
.checkout-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 700;
}

.feature-panel button {
  padding: 0 18px;
  background: #ff8a65;
  color: #1d2927;
}

.feature-image {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin-left: auto;
  border-radius: 50%;
  background: #fffaf0;
  color: #173f3a;
  font-size: 92px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.22);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: grid;
  gap: 14px;
  min-height: 278px;
  padding: 16px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.product-image {
  display: grid;
  min-height: 118px;
  place-items: center;
  border-radius: 8px;
  background: #fff6dc;
  font-size: 62px;
}

.product-info h3,
.product-info p {
  margin: 4px 0 0;
}

.product-info h3 {
  font-size: 18px;
}

.product-info p {
  color: #6b7d78;
  font-size: 14px;
}

.product-info .product-description {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: #4e635f;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.text-link-button {
  width: fit-content;
  min-height: 32px;
  margin-top: 8px;
  padding: 0;
  background: transparent;
  color: #0e6b60;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.option-picker {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.option-picker > span {
  color: #42524f;
  font-size: 12px;
  font-weight: 700;
}

.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.option-list button {
  display: grid;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid #e4d2a6;
  border-radius: 8px;
  background: #ffffff;
  color: #315a54;
  line-height: 1.25;
  font-size: 13px;
  text-align: left;
}

.option-list button.active {
  border-color: #0e6b60;
  background: #fff1bf;
  color: #0e6b60;
  font-weight: 700;
}

.option-list button small {
  color: inherit;
  font-size: 12px;
  opacity: 0.8;
}

.custom-note-input {
  width: 100%;
  min-height: 34px;
  margin-top: 8px;
  border: 1px solid #e9ddb9;
  border-radius: 8px;
  background: #fffdf7;
  font-size: 13px;
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.product-actions button {
  padding: 0 16px;
  background: #fff1bf;
  color: #0e6b60;
}

.product-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 42, 42, 0.46);
}

.product-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 22px;
  width: min(860px, 100%);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(23, 63, 58, 0.28);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #fff6d8;
  color: #173f3a;
}

.modal-product-image {
  display: grid;
  min-height: 300px;
  place-items: center;
  border-radius: 8px;
  background: #fff6dc;
  color: #173f3a;
  font-size: 86px;
  overflow: hidden;
}

.modal-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-product-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-right: 34px;
}

.modal-category {
  color: #6b7d78;
  font-size: 13px;
  font-weight: 700;
}

.modal-product-body h2 {
  margin: 0;
  color: #1f2a2a;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.modal-description {
  margin: 0;
  color: #42524f;
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.modal-options {
  margin-top: 4px;
}

.modal-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #eadfbc;
}

.modal-product-footer strong,
.modal-product-footer span {
  display: block;
}

.modal-product-footer strong {
  color: #1f2a2a;
  font-size: 22px;
}

.modal-product-footer span {
  margin-top: 4px;
  color: #6b7d78;
  font-size: 13px;
}

.modal-product-footer button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: #173f3a;
  color: #ffffff;
  font-weight: 800;
}

.cart-panel {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  padding: 28px 22px;
  border-left: 1px solid #eadfbc;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cart-fab,
.cart-backdrop,
.cart-close {
  display: none;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  margin-bottom: 0;
}

.cart-header h2 {
  font-size: 30px;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 12px;
  flex: 0 0 auto;
  max-height: min(240px, 32vh);
  overflow-y: auto;
  padding-right: 4px;
}

.empty {
  margin: 0;
  padding: 18px;
  border-radius: 8px;
  background: #fff6dc;
  color: #6b7d78;
}

.cart-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.member-panel {
  flex: 0 0 auto;
  padding: 14px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #fffdf7;
}

.sidebar-member-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 12px;
  background: #fffaf0;
}

.cart-panel > .member-panel {
  display: none;
}

.member-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.member-mode-switch button {
  min-height: 34px;
  border-radius: 8px;
  background: #fff6d8;
  color: #173f3a;
  font-weight: 800;
}

.member-mode-switch button.active {
  background: #173f3a;
  color: #ffffff;
}

.member-edit-toggle {
  min-height: 36px;
  border-radius: 8px;
  background: #fff1bf;
  color: #0e6b60;
  font-weight: 800;
}

.member-profile-form {
  padding-top: 10px;
  border-top: 1px solid #eadfbc;
}

.compact-member-orders {
  margin-top: 6px;
  padding-top: 8px;
}

.member-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.member-badge-row span,
.member-panel small,
.member-panel p {
  color: #6b7d78;
  font-size: 13px;
}

.member-badge-row strong {
  display: block;
  margin-top: 4px;
  color: #173f3a;
}

.member-badge-row button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff1bf;
  color: #0e6b60;
  font-weight: 700;
}

.member-form {
  display: grid;
  gap: 10px;
}

.member-form input {
  width: 100%;
  border: 1px solid #e6d9b8;
  border-radius: 8px;
  padding: 10px 11px;
}

.member-progress {
  height: 10px;
  margin: 10px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3e4b8;
}

.member-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #d7a72f;
}

.admin-member-progress {
  width: min(240px, 100%);
}

.member-orders {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eadfbc;
}

.member-orders-heading,
.member-order-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.member-orders-heading strong,
.member-order-card strong {
  color: #173f3a;
}

.member-orders-heading span,
.member-order-card span,
.member-order-card small {
  color: #6b7d78;
  font-size: 12px;
}

.member-order-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.member-order-card ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: #42524f;
  font-size: 13px;
  line-height: 1.45;
}

.cart-image {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: #fff6dc;
  font-size: 28px;
}

.feature-image img,
.product-image img,
.cart-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.cart-detail strong,
.cart-detail span {
  display: block;
}

.cart-detail span {
  margin-top: 4px;
  color: #6b7d78;
  font-size: 13px;
}

.quantity {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.quantity button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #e6d9b8;
  border-radius: 8px;
  background: #ffffff;
  color: #42524f;
}

.quantity span {
  min-width: 20px;
  color: #1f2a2a;
  text-align: center;
}

.checkout-form {
  display: grid;
  flex: 0 0 auto;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid #eadfbc;
}

.checkout-form label {
  display: grid;
  gap: 6px;
  color: #42524f;
  font-size: 13px;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select,
.product-editor input,
.product-editor textarea,
.product-editor select {
  width: 100%;
  border: 1px solid #e6d9b8;
  border-radius: 8px;
  padding: 10px 11px;
  outline: 0;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.totals {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.totals dt,
.totals dd {
  margin: 0;
}

.totals div:last-child {
  padding-top: 8px;
  border-top: 1px solid #eadfbc;
  font-weight: 800;
}

.checkout-button {
  width: 100%;
  background: #173f3a;
  color: #ffffff;
}

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

.status {
  margin: 0;
  color: #0e6b60;
  font-size: 13px;
  line-height: 1.5;
}

.error-text {
  margin: 0;
  color: #b4432a;
  font-size: 13px;
  line-height: 1.5;
}

.admin-page {
  min-height: 100vh;
  padding: 28px;
  background: #fff9e8;
}

.admin-topbar,
.admin-hero,
.orders-table {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  width: min(1180px, 100%);
  margin: 0 auto 24px;
  overflow-x: auto;
}

.admin-tabs button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: #ffffff;
  color: #42524f;
  font-weight: 700;
  white-space: nowrap;
}

.admin-tabs button.active {
  background: #173f3a;
  color: #ffffff;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.admin-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}

.admin-hero p {
  max-width: 620px;
  margin: 14px 0 0;
  color: #6b7d78;
  line-height: 1.8;
}

.admin-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-metrics article {
  display: grid;
  align-content: center;
  min-height: 132px;
  padding: 20px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.admin-metrics span {
  color: #6b7d78;
  font-size: 13px;
}

.admin-metrics strong {
  margin-top: 8px;
  font-size: 34px;
}

.orders-table {
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.admin-status {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff1bf;
  color: #0e6b60;
  font-weight: 700;
}

.order-alert {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  padding: 12px 14px;
  border: 1px solid #f2c56d;
  border-radius: 8px;
  background: #fff7e6;
  color: #7d4d00;
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto 22px;
  align-items: start;
}

.admin-manager {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto 22px;
  align-items: start;
}

.product-editor,
.product-admin-list,
.settings-panel {
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.product-editor,
.settings-panel {
  padding: 20px;
}

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

.product-admin-list {
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 24px;
}

.section-heading p {
  margin: 6px 0 0;
  color: #6b7d78;
  line-height: 1.6;
}

.section-heading button,
.save-button,
.admin-product-actions button {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 700;
}

.section-heading button {
  padding: 0 12px;
  background: #fff6d8;
  color: #173f3a;
}

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

.editor-grid label {
  display: grid;
  gap: 6px;
  color: #42524f;
  font-size: 13px;
}

.wide-field {
  grid-column: 1 / -1;
}

.variant-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #fffdf7;
}

.variant-editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.variant-editor-title strong,
.variant-editor-title span {
  display: block;
}

.variant-editor-title span {
  margin-top: 4px;
  color: #6b7d78;
  font-size: 12px;
  line-height: 1.5;
}

.variant-editor-title button {
  min-width: 92px;
  background: #fff1bf;
  color: #0e6b60;
}

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

.variant-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.variant-row button {
  min-height: 40px;
  padding: 0 12px;
  background: #fff0ed;
  color: #b4432a;
}

.image-upload-field {
  gap: 10px;
}

.image-upload-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.upload-preview {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #fff6dc;
  font-size: 38px;
  overflow: hidden;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-button {
  display: inline-grid;
  min-height: 38px;
  margin-top: 8px;
  padding: 0 14px;
  place-items: center;
  border-radius: 8px;
  background: #173f3a;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toggle-row {
  grid-auto-flow: column;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #e6d9b8;
  border-radius: 8px;
}

.toggle-row input {
  width: auto;
}

.save-button {
  width: 100%;
  margin-top: 14px;
  background: #173f3a;
  color: #ffffff;
}

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

.admin-product-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.admin-product-row.editing {
  align-items: start;
  background: #fffdf7;
}

.inline-product-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding: 16px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.manual-order-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #fffdf7;
}

.manual-order-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-order-summary span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1bf;
  color: #173f3a;
  font-size: 13px;
  font-weight: 800;
}

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

.pending-cart-list > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #fffaf0;
  color: #42524f;
  font-size: 13px;
}

.pending-cart-list button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff0ed;
  color: #b4432a;
  font-weight: 800;
}

.inline-editor-actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.inline-editor-actions .save-button {
  flex: 1;
  margin-top: 0;
}

.inline-editor-actions button[type="button"] {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: #f1eee4;
  color: #42524f;
  font-weight: 800;
}

.compact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #ffffff;
}

.compact-row strong,
.compact-row span {
  display: block;
}

.compact-row span {
  margin-top: 4px;
  color: #6b7d78;
  font-size: 13px;
}

.compact-row button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff1bf;
  color: #0e6b60;
  font-weight: 700;
}

.admin-product-row strong,
.admin-product-row span {
  display: block;
}

.admin-product-row span,
.admin-product-row p {
  color: #6b7d78;
  font-size: 13px;
  line-height: 1.5;
}

.admin-product-row p {
  margin: 4px 0 0;
}

.admin-product-actions {
  display: flex;
  gap: 8px;
}

.admin-product-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  background: #fff1bf;
  color: #0e6b60;
}

.admin-product-actions button:last-child {
  background: #fff0ed;
  color: #b4432a;
}

.table-title {
  padding: 18px 18px 0;
}

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

.order-total-summary .metric-card {
  min-height: 96px;
}

.table-header,
.order-row {
  display: grid;
  grid-template-columns: 140px 1.1fr 1fr 140px;
  gap: 18px;
  align-items: start;
}

.table-header {
  padding: 14px 18px;
  background: #173f3a;
  color: #ffffff;
  font-weight: 700;
}

.order-row {
  padding: 18px;
  border-top: 1px solid #eadfbc;
}

.order-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #e6d9b8;
  border-radius: 8px;
  padding: 0 10px;
}

.order-actions {
  display: grid;
  gap: 8px;
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #eadfbc;
  border-radius: 8px;
  background: #fffdf7;
}

.bulk-toolbar label,
.member-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #42524f;
  font-weight: 800;
}

.bulk-toolbar input,
.member-select-row input {
  width: 18px;
  height: 18px;
  accent-color: #0e6b60;
}

.bulk-toolbar button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: #fff0ed;
  color: #b4432a;
  font-weight: 800;
}

.bulk-toolbar button:disabled {
  cursor: not-allowed;
  background: #f1eee4;
  color: #9a9588;
}

.member-select-row {
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff6d8;
  font-size: 13px;
}

.order-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border-radius: 8px;
  background: #fff0ed;
  color: #b4432a;
  font-weight: 700;
}

.order-row strong,
.order-row span {
  display: block;
}

.order-row span {
  margin-top: 4px;
  color: #6b7d78;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 22px 24px;
    border-right: 0;
    border-bottom: 1px solid #eadfbc;
  }

  .brand {
    margin-bottom: 18px;
  }

  .category-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .category-list button {
    width: auto;
    min-width: max-content;
    padding: 0 14px;
  }

  .mini-summary {
    margin-top: 16px;
  }

  .cart-panel {
    grid-column: 1 / -1;
    position: static;
    grid-template-rows: auto auto auto;
    height: auto;
    border-top: 1px solid #eadfbc;
    border-left: 0;
  }

  .cart-items {
    overflow: visible;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-total-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sidebar {
    padding: 20px 16px;
  }

  .category-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .category-list button {
    width: 100%;
    min-width: 0;
  }

  .catalog {
    padding: 22px 16px;
  }

  .topbar,
  .feature-panel {
    display: grid;
  }

  .feature-panel {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-image {
    width: 150px;
    height: 150px;
    margin: 0;
    font-size: 70px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 12px;
  }

  .product-image {
    min-height: 96px;
    height: 96px;
    font-size: 42px;
  }

  .product-info {
    min-width: 0;
  }

  .product-info h3 {
    font-size: 17px;
    line-height: 1.25;
  }

  .product-info .product-description {
    min-height: 0;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }

  .product-card .option-picker,
  .product-card .custom-note-input,
  .product-info > p:not(.product-description) {
    display: none;
  }

  .product-card .text-link-button {
    min-height: 28px;
    margin-top: 6px;
    font-size: 12px;
  }

  .product-actions {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .product-actions strong {
    font-size: 18px;
  }

  .product-actions button {
    min-width: 86px;
  }

  .product-modal-layer {
    align-items: end;
    padding: 12px;
  }

  .product-modal {
    grid-template-columns: 1fr;
    gap: 14px;
    max-height: 92vh;
    padding: 14px;
  }

  .modal-product-image {
    min-height: 220px;
  }

  .modal-product-body {
    padding-right: 0;
  }

  .modal-product-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .order-center-header,
  .order-center-card-header,
  .order-center-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-trail {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .status-trail span {
    min-width: 74px;
    padding: 0 8px;
  }

  .cart-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    grid-template-rows: auto auto auto;
    height: min(88vh, 760px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px 16px;
    border-top: 1px solid #eadfbc;
    border-left: 0;
    box-shadow: 0 -18px 45px rgba(23, 63, 58, 0.18);
    pointer-events: none;
    transform: translateY(104%);
    transition: transform 180ms ease;
  }

  .cart-panel.open {
    pointer-events: auto;
    transform: translateY(0);
  }

  .cart-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    background: #173f3a;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(23, 63, 58, 0.28);
  }

  .cart-fab span {
    display: grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #ff8a65;
    color: #1d2927;
    font-size: 13px;
  }

  .cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: block;
    background: rgba(31, 42, 42, 0.36);
  }

  .cart-close {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: #fff6d8;
    color: #173f3a;
    font-size: 24px;
    line-height: 1;
  }

  .success-panel,
  .admin-hero,
  .admin-grid,
  .admin-manager,
  .bulk-toolbar,
  .table-header,
  .order-row,
  .form-row {
    grid-template-columns: 1fr;
  }

  .bulk-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-toolbar button {
    width: 100%;
  }

  .success-panel a {
    width: max-content;
  }

  .admin-page {
    padding: 18px 14px;
  }

  .admin-topbar {
    align-items: flex-start;
    gap: 16px;
  }

  .admin-actions {
    flex-wrap: wrap;
  }

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

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

  .table-header {
    display: none;
  }

  .editor-grid,
  .admin-product-row,
  .variant-row,
  .image-upload-row {
    grid-template-columns: 1fr;
  }

  .variant-editor-title {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-product-actions {
    justify-content: stretch;
  }

  .admin-product-actions button {
    flex: 1;
    justify-content: center;
  }

  .inline-editor-actions {
    flex-direction: column;
  }

  .inline-editor-actions button {
    width: 100%;
  }
}

