/* Hallmark · v2 · shape: app screen · theme: custom · screen: 货品管理和发布 · signature: 线上与审核双态并列 */
/* Critique · 搜索、筛选和货品操作的布局按使用频率安排，主操作由绿色标识。 */
@import url('./tokens.css');

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; color: var(--color-ink); background: var(--color-canvas); font: 14px/1.55 var(--font-body); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
[hidden] { display: none !important; }
svg { display: block; flex: none; width: 18px; height: 18px; }
h1, h2, h3, p { margin: 0; min-width: 0; overflow-wrap: break-word; }
h1 { text-wrap: balance; font-size: 26px; font-weight: 700; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 700; }
small, .muted { color: var(--color-muted); }
small { font-size: 12px; }
.skip-link { position: absolute; top: 8px; left: 10px; z-index: 10; transform: translateY(-150%); background: var(--color-paper); padding: 12px; }
.skip-link:focus { transform: none; }
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--color-nav); color: var(--color-nav-ink); }
.brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px; color: var(--color-paper); min-height: 76px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; flex: none; background: var(--color-green); border-radius: 9px; }
.brand-mark svg { width: 21px; height: 21px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small, .sidebar-foot small { color: var(--color-nav-muted); }
.nav { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 7px; }
.nav a:hover { background: var(--color-nav-hover); }
.nav a[aria-current] { background: var(--color-green); color: var(--color-paper); font-weight: 650; }
.nav .nav-child { margin-left: 24px; min-height: 37px; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--color-nav-hover); }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.avatar { width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center; background: var(--color-green-soft); color: var(--color-green); font-weight: 750; flex: none; }
.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 32px; background: var(--color-paper); border-bottom: 1px solid var(--color-line); }
.crumb { display: flex; align-items: center; gap: 12px; color: var(--color-muted); white-space: nowrap; }
.crumb strong { color: var(--color-ink); }
.top-actions, .heading-actions, .inline, .row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.top-actions { justify-content: flex-end; }
.menu-toggle { display: none !important; }
.main { width: 100%; max-width: 1500px; margin: 0 auto; padding: 28px 32px 40px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.heading p { margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 12px; color: var(--color-ink); background: var(--color-paper); border: 1px solid var(--color-field); border-radius: 6px; white-space: nowrap; font-weight: 600; }
.btn:hover { background: var(--color-paper-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--color-green); border-color: var(--color-green); color: var(--color-paper); }
.btn.primary:hover { background: var(--color-green-dark); }
.btn.outline { color: var(--color-green); border-color: var(--color-green); }
.btn.icon { padding: 0; width: 36px; }
.text-button { border: 0; min-height: 32px; padding: 4px 0; background: transparent; color: var(--color-blue); white-space: nowrap; font-size: 13px; }
.text-button:hover { text-decoration: underline; }
.text-button.danger { color: var(--color-red); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { position: relative; background: var(--color-paper); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 16px 16px; }
.metric-label { color: var(--color-muted); }
.metric strong { display: block; margin-top: 4px; font-size: 29px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric svg { position: absolute; right: 16px; top: 17px; width: 19px; height: 19px; }
.green { color: var(--color-green); }
.amber { color: var(--color-amber); }
.red { color: var(--color-red); }
.panel { background: var(--color-paper); border: 1px solid var(--color-line); border-radius: var(--radius); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 16px; }
.filter-group, .tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search { position: relative; width: 210px; }
.search svg { position: absolute; top: 10px; left: 9px; color: var(--color-muted); width: 16px; height: 16px; pointer-events: none; }
.search input { padding-left: 32px; }
.field { color: var(--color-ink); min-height: 36px; border: 1px solid var(--color-field); border-radius: 6px; background: var(--color-paper); padding: 8px 8px; width: 100%; }
.field:hover { background: var(--color-paper-2); }
.field[aria-invalid=true] { border-color: var(--color-red); }
.filter-group select { width: auto; }
.tab { min-height: 31px; border: 0; border-radius: 6px; padding: 4px 8px; background: transparent; color: var(--color-muted); white-space: nowrap; }
.tab:hover { background: var(--color-paper-2); }
.tab[aria-pressed=true] { background: var(--color-green-soft); color: var(--color-green); font-weight: 700; }
.table-wrap { position: relative; overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
.products-table { min-width: 780px; }
thead { background: var(--color-paper-2); color: var(--color-muted); }
th { font-size: 13px; font-weight: 600; white-space: nowrap; }
td, th { border-bottom: 1px solid var(--color-line); padding: 8px 12px; }
th:first-child, td:first-child { padding-left: 16px; }
.products-table tr:hover td { background: var(--color-paper-2); }
.product { display: flex; align-items: center; gap: 12px; min-width: 198px; }
.product-name { display: block; color: var(--color-ink); font-weight: 650; }
.mobile-detail { display: none; }
.thumb { width: 44px; height: 44px; border-radius: 6px; flex: none; object-fit: cover; background-color: var(--color-paper-2); }
div.thumb { display: grid; place-items: center; color: var(--color-muted); }
.sprite { background-image: url('./demo-products.png'); background-size: 300% 200%; }
.sprite-0 { background-position: 0 0; }
.sprite-1 { background-position: 50% 0; }
.sprite-2 { background-position: 100% 0; }
.sprite-3 { background-position: 0 100%; }
.sprite-4 { background-position: 50% 100%; }
.sprite-5 { background-position: 100% 100%; }
.pill { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 20px; color: var(--color-muted); background: var(--color-paper-2); white-space: nowrap; font-size: 12px; font-weight: 600; }
.pill svg { width: 13px; height: 13px; margin-right: 4px; }
.pill.green { background: var(--color-green-soft); color: var(--color-green); }
.pill.amber { background: var(--color-amber-soft); color: var(--color-amber); }
.pill.red { background: var(--color-red-soft); color: var(--color-red); }
.pill.blue { background: var(--color-blue-soft); color: var(--color-blue); }
.number { white-space: nowrap; font-variant-numeric: tabular-nums; }
.check { width: 16px; height: 16px; vertical-align: middle; accent-color: var(--color-green); }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 58px; padding: 12px 16px; }
.empty { padding: 40px 20px; text-align: center; color: var(--color-muted); }
.empty h2 { color: var(--color-ink); }
.empty p { margin: 8px 0 12px; }
.publish-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(242px, 29%); gap: 16px; align-items: start; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.section { min-width: 0; padding: 16px 20px; }
.section h2 { margin-bottom: 12px; }
.section .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field-label { display: grid; gap: 4px; align-content: start; min-width: 0; font-weight: 550; }
.field-label small { font-weight: 400; }
.required { color: var(--color-red); }
.fields + .fields { margin-top: 12px; }
.settings-box { position: sticky; top: 15px; }
.settings-box .inline { margin-top: 16px; }
.switch { appearance: none; width: 34px; height: 19px; border-radius: 99px; background: var(--color-field); position: relative; margin: 0; flex: none; cursor: pointer; }
.switch::before { content: ''; position: absolute; inset: 3px auto auto 3px; width: 13px; height: 13px; border-radius: 50%; background: var(--color-paper); }
.switch:checked { background: var(--color-green); }
.switch:checked::before { transform: translateX(15px); }
.media-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.media-item { position: relative; }
.media-item .thumb { display: block; width: 76px; height: 76px; }
.media-item > button { position: absolute; right: 3px; top: 3px; }
.upload { min-width: 76px; min-height: 76px; display: grid; place-content: center; justify-items: center; gap: 4px; font-size: 12px; font-weight: 550; }
.upload-tile { width: 76px; min-height: 76px; border: 1px dashed var(--color-field); border-radius: 6px; display: grid; place-items: center; }
.upload-trigger { display: grid; justify-items: center; gap: 0; min-height: 44px; border: 0; padding: 0 4px; font-size: 12px; }
.matrix { min-width: 500px; }
.matrix th:nth-child(2), .matrix th:nth-child(3) { width: 19%; }
.matrix button { min-width: 30px; }
.message { padding: 8px 12px; border-radius: 6px; background: var(--color-green-soft); color: var(--color-green); margin-bottom: 12px; }
.message.error { color: var(--color-red); background: var(--color-red-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
dialog { margin: auto; overflow: auto; max-width: min(90%, 520px); width: 100%; max-height: 85vh; color: var(--color-ink); background: var(--color-paper); border: 0; border-radius: var(--radius); box-shadow: 0 16px 40px var(--color-shadow); padding: 20px; }
dialog::backdrop { background: var(--color-overlay); }
dialog .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.account-form { max-width: 545px; }
.account-form .field-label { margin-bottom: 12px; }
.login { width: min(440px, 92%); margin: 10vh auto; }
.login .section { padding: 24px; }
.login h1 { margin-bottom: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -0px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .main, .topbar { padding-inline: 20px; }
}
@media (max-width: 767.98px) {
  .shell { display: block; }
  .sidebar { display: none; position: fixed; top: 68px; z-index: 5; width: 212px; height: calc(100dvh - 68px); box-shadow: 0 8px 28px var(--color-shadow); }
  .sidebar[data-open=true] { display: flex; }
  .menu-toggle { display: inline-flex !important; }
  .publish-grid { grid-template-columns: minmax(0, 1fr) minmax(220px, 31%); }
}
@media (max-width: 660px) {
  .main { padding: 16px 12px 24px; }
  .topbar { min-height: 56px; padding: 0 12px; }
  .sidebar { top: 56px; height: calc(100dvh - 56px); }
  .crumb > span:not(:last-child) { display: none; }
  .heading { align-items: flex-start; flex-wrap: wrap; }
  .heading p { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publish-grid, .fields { grid-template-columns: minmax(0, 1fr); }
  .search { width: 100%; }
  .section { padding-inline: 12px; }
  .products-table { min-width: 0; }
  .products-table .desktop-cell { display: none; }
  .products-table th, .products-table td { padding-inline: 12px; }
  .products-table td { vertical-align: top; }
  .product { min-width: 0; }
  .product-name { overflow-wrap: anywhere; }
  .product .thumb { width: 36px; height: 36px; }
  .mobile-detail { display: block; margin-top: 4px; }
  .mobile-detail .text-button { min-height: 32px; }
  .status-cell > .inline { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
