:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --text: #101828;
  --text-soft: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #cfd4dc;
  --primary: #155eef;
  --primary-hover: #0f4fd4;
  --primary-soft: #eff4ff;
  --success: #067647;
  --success-bg: #ecfdf3;
  --warning: #b54708;
  --warning-bg: #fffaeb;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 24px rgba(16, 24, 40, .08);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(21, 94, 239, .2);
  outline-offset: 2px;
}
.hidden { display: none !important; }
.skip-link {
  position: fixed;
  z-index: 300;
  top: 12px;
  left: 12px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* Shared type and controls. */
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}
.eyebrow.dark { color: var(--muted); }
.muted { color: var(--muted); }
a { color: var(--primary); }
button {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
button:active { transform: translateY(1px); }
.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(21, 94, 239, .2);
}
.primary:hover { background: var(--primary-hover); }
.secondary {
  border-color: #c7d7fe;
  background: var(--primary-soft);
  color: var(--primary);
}
.secondary:hover { border-color: #9db7f8; background: #e5edff; }
.ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text-soft);
}
.ghost:hover { border-color: var(--line-strong); background: var(--surface-muted); }
.danger {
  border-color: #fecdca;
  background: var(--danger-bg);
  color: var(--danger);
}
.danger:hover { border-color: #fda29b; background: #fee4e2; }
.wide { width: 100%; min-height: 42px; }

/* Login. */
.login-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
  background: var(--surface);
}
.brand-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  width: min(420px, 100%);
  margin-bottom: 20px;
  color: var(--text);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  object-fit: cover;
}
.brand-panel .eyebrow { display: none; }
.brand-panel h1 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.trust-row { display: none; }
.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.login-card h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.login-card .muted { margin: 0; font-size: 13px; }
.login-card form { display: grid; gap: 16px; margin-top: 18px; }
label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
}
input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: 0;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input::placeholder, textarea::placeholder { color: #98a2b3; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21, 94, 239, .12);
}
textarea { min-height: 96px; resize: vertical; }
.login-card > .ghost { margin-top: 10px; }
.demo-accounts {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.demo-accounts p { margin: 0 0 10px; color: var(--text-soft); font-size: 12px; font-weight: 650; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.demo-grid button {
  min-height: 36px;
  padding: 8px 10px;
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}
.demo-grid button:hover { border-color: #b8c8f8; background: var(--primary-soft); color: var(--primary); }
.demo-accounts small { display: block; margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }

/* Authenticated shell. */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 9px 26px; }
.logo > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.logo > img { display: block; width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.logo strong { display: block; color: var(--text); font-size: 14px; font-weight: 750; }
.logo small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
#nav { display: grid; gap: 3px; }
.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.nav-button:hover { background: var(--surface-muted); color: var(--text-soft); }
.nav-button.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 750;
}
.sidebar-note {
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.sidebar-note { display: grid; gap: 7px; line-height: 1.45; }
.design-credit { color: var(--muted); font-size: 10px; font-weight: 600; text-decoration: none; }
.design-credit:hover { color: var(--primary); text-decoration: underline; }
.design-credit:focus-visible { outline: 3px solid rgba(21, 94, 239, .2); outline-offset: 2px; border-radius: 3px; }
.workspace { min-width: 0; }
.workspace header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 clamp(20px, 3.5vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}
.workspace header .eyebrow { display: none; }
.workspace header h2 { margin: 0; color: var(--text); font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu > div:nth-child(2) { display: grid; gap: 2px; }
.user-menu strong { color: var(--text-soft); font-size: 13px; font-weight: 650; }
.user-menu small { color: var(--muted); font-size: 11px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #c7d7fe; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 750; }
.icon-button { display: none; padding: 7px 9px; border-color: var(--line); background: var(--surface); font-size: 18px; }
.workspace main { max-width: 1320px; margin: 0 auto; padding: 22px clamp(18px, 3vw, 40px) 52px; }
#content:focus, #content:focus-visible { outline: 0 !important; }

/* Page primitives. */
.page-toolbar, .section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-toolbar { margin-bottom: 20px; }
.page-toolbar h1 { margin: 0; color: var(--text); font-size: 24px; font-weight: 750; letter-spacing: -.025em; }
.page-toolbar p, .section-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.summary-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-soft); font-size: 12px; font-weight: 650; }
.market-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.hero h1 { margin: 0; color: var(--text); font-size: 24px; font-weight: 750; letter-spacing: -.025em; }
.hero p:not(.eyebrow) { max-width: 600px; margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.hero-stat { min-width: 120px; padding-left: 20px; border-left: 1px solid var(--line); }
.hero-stat strong { display: block; color: var(--text); font-size: 28px; font-weight: 750; line-height: 1; }
.hero-stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.section-head { margin: 18px 0 12px; }
.section-head h3 { margin: 0; color: var(--text); font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.market-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .empty, .order-list > .empty { grid-column: 1 / -1; }
.listing-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-sm);
  appearance: none;
}
.listing-card:hover { border-color: var(--line-strong); box-shadow: 0 3px 8px rgba(16, 24, 40, .08); }
.listing-card.is-own { cursor: default; }
.listing-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f5f8ff; }
.listing-card .listing-image { border-bottom: 1px solid var(--line); }
.listing-name {
  display: -webkit-box;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 14px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.listing-price { margin-top: 4px; padding: 0 14px 14px; color: var(--text); font-size: 19px; font-weight: 800; line-height: 1.2; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.grid > .card, .grid > .listing-card, .order-list > .card { animation: rise-in .2s ease both; }
.card:hover { border-color: var(--line-strong); }
.grid > .card { padding: 14px; }
.workspace main > .card, .workspace main > section.card { padding: 18px; }
.workspace main > .card + .card, .workspace main > .notice + .card, .workspace main > section.card + section.card { margin-top: 16px; }
.card .card { padding: 14px; background: var(--surface-muted); box-shadow: none; }
.card h3, .card h4 { color: var(--text); }
.card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 750; }
.card h4 { margin: 0 0 7px; font-size: 15px; font-weight: 700; }
.card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.product-art {
  display: flex;
  align-items: flex-end;
  height: 92px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbe4f5;
  border-radius: var(--radius-sm);
  background: #f5f8ff;
  color: var(--primary);
}
.product-art span { font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.price-row, .card-actions, .status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.status-row > * { min-width: 0; }
.status-row h4 {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.status-row > strong { min-width: 0; overflow-wrap: anywhere; }
.price { color: var(--text); font-size: 22px; font-weight: 750; line-height: 1; }
.seller { color: var(--muted); font-size: 11px; }
.card-actions { align-items: center; margin-top: 17px; }
.card-actions button { flex: 1; }
.warehouse-card .listing-image { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.warehouse-card .price { margin-top: 10px; font-size: 18px; }
.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.badge.green { border-color: #abefc6; background: var(--success-bg); color: var(--success); }
.badge.amber { border-color: #fedf89; background: var(--warning-bg); color: var(--warning); }
.badge.red { border-color: #fecdca; background: var(--danger-bg); color: var(--danger); }
.notice {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid #fedf89;
  border-left: 3px solid #f79009;
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
  color: #7a2e0b;
  font-size: 12px;
  line-height: 1.55;
}
.empty {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 24px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.order-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.order { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 14px; }
.order h4 { margin: 0 0 6px; }
.order-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; color: var(--muted); font-size: 11px; }
.order-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.code-box { padding: 15px; border: 1px dashed #98b3f7; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); font: 750 14px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-align: center; }
.qr { display: block; width: 190px; height: 190px; margin: 15px auto; border: 8px solid var(--surface); box-shadow: var(--shadow-md); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric strong { display: block; color: var(--text); font-size: 25px; font-weight: 750; line-height: 1; }
.metric span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: var(--surface-muted); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
td { color: var(--text-soft); }
tr:last-child td { border-bottom: 0; }
.form-stack { display: grid; gap: 13px; margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }

/* Dialogs and feedback. */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(16, 24, 40, .48); }
.modal-card { position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 24px 64px rgba(16, 24, 40, .18); animation: rise-in .18s ease both; }
.modal-card h3 { margin: 0 0 7px; color: var(--text); font-size: 19px; font-weight: 750; }
.modal-close { position: absolute; top: 10px; right: 10px; min-height: 32px; padding: 4px 8px; border: 0; background: transparent; color: var(--muted); font-size: 22px; }
.modal-close:hover { background: var(--surface-muted); color: var(--text); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; max-width: min(360px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid #344054; border-radius: var(--radius-sm); background: #1d2939; color: #fff; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(12px); transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .app { display: block; }
  .sidebar { position: fixed; z-index: 40; width: 236px; transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 12px 0 34px rgba(16, 24, 40, .14); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 30; display: block; border: 0; border-radius: 0; background: rgba(16, 24, 40, .32); }
  .workspace header { min-height: 70px; padding: 0 18px; }
  .workspace header > div:first-of-type { display: block; }
  .workspace header h2 { font-size: 19px; }
  .icon-button { display: inline-block; }
  .user-menu > div:nth-child(2), .user-menu .ghost { display: none; }
  .workspace main { padding: 16px 12px 42px; }
  .hero { align-items: flex-start; flex-direction: column; padding: 19px; }
  .hero-stat { width: 100%; min-width: 0; padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .section-head, .page-toolbar { align-items: flex-start; }
  .grid, .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .order { grid-template-columns: 1fr; }
  .order-actions { justify-content: flex-start; }
  .listing-name { margin-top: 9px; padding: 0 10px; font-size: 13px; }
  .listing-price { padding: 0 10px 11px; font-size: 17px; }
  .card-actions { flex-direction: column; align-items: stretch; }
  .card-actions button { width: 100%; }
}
@media (max-width: 520px) {
  .login-shell { padding: 22px 16px; }
  .login-card { padding: 22px 18px; box-shadow: var(--shadow-sm); }
  .form-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { padding: 13px; }
  .metric strong { font-size: 22px; }
  .demo-grid { grid-template-columns: 1fr 1fr; }
  .grid, .market-grid, .order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { border-radius: 8px; }
  .grid > .card { padding: 10px; }
  .workspace main > .card, .workspace main > section.card { padding: 13px; }
  .order { padding: 11px; }
  .order-actions button { width: 100%; }
  .toast { right: 16px; bottom: 16px; }
}

/* Admin case review details. */
.admin-case { display: grid; gap: 14px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.detail-grid > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}
.detail-grid span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.detail-grid strong { overflow-wrap: anywhere; font-size: 13px; }
.case-note { margin: 0; padding: 10px 12px; border-left: 3px solid var(--primary); background: var(--primary-soft); }
.case-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.inline-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.table-note { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.danger-text { color: var(--danger); }
details { border-top: 1px solid var(--line); padding-top: 10px; }
summary { cursor: pointer; color: var(--text-soft); font-size: 13px; font-weight: 700; }
.timeline { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 22px; color: var(--text-soft); font-size: 12px; }
.timeline li div { margin-top: 3px; color: var(--muted); }
@media (max-width: 800px) { .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .detail-grid { grid-template-columns: 1fr; } .case-footer { align-items: stretch; flex-direction: column; } }
/* Reference UI tuning: wahtsumean2-inspired marketplace shell. */
:root {
  --bg: #f5f7fb;
  --surface: #fff;
  --surface-muted: #f8fafc;
  --text: #0f172a;
  --text-soft: #344054;
  --muted: #667085;
  --line: #e7ebf3;
  --line-strong: #cfd7e7;
  --primary: #1463ff;
  --primary-hover: #0e4fd6;
  --primary-soft: #edf3ff;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, .09);
}
body { background: var(--bg); }
.login-shell { background: radial-gradient(circle at 50% -10%, #edf3ff 0, #fff 48%, #f7f9fc 100%); }
.login-card { border-color: #e3e9f4; box-shadow: 0 22px 60px rgba(25, 55, 110, .11); }
.app { background: #f5f7fb; }
.sidebar { background: #fff; border-right-color: #e7ebf3; }
.workspace header { background: rgba(255,255,255,.92); border-bottom-color: #e7ebf3; }
.workspace main { max-width: 1360px; padding-top: 30px; }
.hero { border: 0; background: linear-gradient(120deg, #eaf1ff 0%, #f7faff 54%, #fff 100%); box-shadow: none; padding: 30px 34px; }
.hero h1 { font-size: 30px; }
.hero p:not(.eyebrow) { font-size: 14px; }
.hero-stat strong { color: var(--primary); }
.market-toolbar { justify-content: space-between; margin-top: 22px; }
.market-toolbar::before { content: '全部服务'; color: var(--text); font-size: 18px; font-weight: 750; }
.market-grid { gap: 18px; }
.listing-card { border-color: #e5eaf3; border-radius: 16px; box-shadow: 0 8px 22px rgba(18, 45, 90, .05); }
.listing-card:hover { transform: translateY(-2px); border-color: #b7c9ee; box-shadow: 0 14px 28px rgba(18, 45, 90, .11); }
.listing-image { aspect-ratio: 1.28; background: #eef4ff; }
.listing-name { margin-top: 15px; padding-left: 15px; font-size: 14px; }
.listing-price { padding: 0 15px 15px; color: #111827; font-size: 20px; }
.card, .order, .warehouse-card { border-color: #e5eaf3; border-radius: 16px; box-shadow: 0 8px 22px rgba(18, 45, 90, .04); }
.card h3, .section-head h3 { font-size: 18px; }
.nav-button { border-radius: 10px; }
.nav-button.active { box-shadow: inset 3px 0 0 var(--primary); }
.badge { border-radius: 999px; }
@media (max-width: 800px) { .workspace main { padding-top: 18px; } .hero { padding: 22px; } .hero h1 { font-size: 24px; } .market-grid { gap: 10px; } }

/* 2026 UI refresh: compact, calm, product-first workspace. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f7f8fa;
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --primary: #111827;
  --primary-hover: #374151;
  --primary-soft: #f3f4f6;
  --success: #166534;
  --success-bg: #f0fdf4;
  --warning: #92400e;
  --warning-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .04);
  --shadow-md: 0 10px 30px rgba(17, 24, 39, .08);
}

body, .app, html { background: var(--bg); }
button { border-radius: 8px; font-size: 13px; }
.primary { background: #111827; box-shadow: none; }
.primary:hover { background: #374151; }
.secondary { border-color: var(--line); background: var(--surface-muted); color: var(--text); }
.secondary:hover { border-color: var(--line-strong); background: #eef0f2; }
.ghost { border-color: var(--line); background: var(--surface); color: var(--text-soft); }
.ghost:hover { background: var(--surface-muted); border-color: var(--line-strong); }

.login-shell { align-items: stretch; justify-content: center; padding: 48px 24px; background: #fff; }
.brand-panel { width: min(400px, 100%); margin: 0 auto 24px; grid-template-columns: auto 1fr; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: #111827; }
.brand-panel h1 { font-size: 16px; font-weight: 700; }
.login-card { width: min(400px, 100%); margin: 0 auto; padding: 28px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 38px rgba(17,24,39,.07); }
.login-card h2 { font-size: 22px; letter-spacing: -.02em; }
.login-card form { gap: 14px; margin-top: 22px; }
.login-card .muted { display: none; }
.login-card input { min-height: 44px; }
.login-card .primary { min-height: 44px; }
.demo-accounts { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.demo-accounts > p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.demo-grid { gap: 8px; }
.demo-grid button { min-height: 34px; background: #fff; }

.app { grid-template-columns: 216px minmax(0, 1fr); }
.sidebar { padding: 18px 12px; border-right: 1px solid var(--line); }
.logo { padding: 4px 8px 24px; }
.logo > img, .logo > span { width: 30px; height: 30px; border-radius: 7px; }
.logo strong { font-size: 14px; }
.logo small { display: none; }
#nav { gap: 2px; }
.nav-button { min-height: 38px; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.nav-button.active { background: #f3f4f6; color: #111827; box-shadow: inset 2px 0 0 #111827; }
.nav-icon { width: 20px; color: inherit; font-size: 12px; }
.sidebar-note { margin: auto 8px 4px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.workspace header { min-height: 70px; padding: 14px 30px; background: #fff; border-bottom: 1px solid var(--line); }
.workspace header h2 { font-size: 20px; letter-spacing: -.02em; }
.workspace main { max-width: 1280px; padding: 28px 30px 48px; }
.user-menu { gap: 9px; }
.user-menu strong { font-size: 12px; }
.user-menu small { font-size: 11px; }
.avatar { width: 30px; height: 30px; background: #111827; }

.hero { display: none; }
.market-toolbar { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.market-toolbar::before { content: '全部服务'; font-size: 16px; font-weight: 700; }
.summary-chip { border: 0; background: transparent; padding: 0; color: var(--muted); font-size: 12px; }
.market-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.listing-card { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: none; text-align: left; }
.listing-card:hover { transform: translateY(-1px); border-color: #9ca3af; box-shadow: 0 8px 18px rgba(17,24,39,.08); }
.listing-card:disabled { opacity: .58; }
.listing-image { display: block; width: 100%; aspect-ratio: 1.15; object-fit: cover; background: #f3f4f6; }
.listing-name { display: block; margin-top: 0; padding: 12px 12px 4px; color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.35; }
.listing-price { display: block; padding: 0 12px 13px; color: var(--text); font-size: 17px; line-height: 1.2; }

.card, .order, .warehouse-card { border: 1px solid var(--line); border-radius: 10px; box-shadow: none; }
.card:hover, .order:hover, .warehouse-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.section-head { margin-bottom: 14px; }
.section-head h3, .card h3 { font-size: 16px; }
.order-list, .grid { gap: 12px; }
.notice { border-radius: 8px; }
.form-stack { gap: 12px; }
.badge { border-radius: 999px; font-size: 10px; }
.table-wrap { border-color: var(--line); box-shadow: none; }

@media (max-width: 1020px) {
  .market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { width: min(280px, 86vw); }
  .workspace header { padding: 12px 16px; }
  .workspace main { padding: 18px 16px 34px; }
  .market-grid, .order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .listing-name { padding: 10px 10px 3px; font-size: 12px; }
  .listing-price { padding: 0 10px 11px; font-size: 16px; }
}
@media (max-width: 520px) {
  .login-shell { padding: 28px 16px; }
  .login-card { padding: 22px 18px; }
  .workspace main { padding-inline: 12px; }
  .market-grid, .order-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card, .order, .warehouse-card { border-radius: 8px; }
}
