@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/dm-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/dm-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/dm-sans-700.woff2") format("woff2");
}

:root {
  --bg: #f4f5f7;
  --paper: #ffffff;
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e6e8ee;
  --accent: #16181d;
  --accent-ink: #ffffff;
  --good: #0f7a4a;
  --header: #111318;
  --header-ink: #f4f5f7;
  --danger: #d92d20;
  --tap: 40px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 8px 24px rgba(17, 19, 24, 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }

h1 { font-size: 1.55rem; margin: 0 0 12px; }
h2 { font-size: 1.05rem; margin: 18px 0 8px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.wrap, .content { width: min(1100px, 100%); margin: 0 auto; padding: 16px 16px 40px; }
.content { width: auto; }

.topbar, .sidenav {
  background: var(--header);
  color: var(--header-ink);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand { color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -0.03em; font-size: 1.05rem; }
.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: calc(100% - 56px);
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.brand-logo, .brand-preview img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.brand-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.topbar.align-center {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}
.topbar.align-center .brand { grid-column: 2; justify-self: center; max-width: 100%; }
.topbar.align-center .cart-link { grid-column: 3; justify-self: end; }
.logo-input { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.logo-pick { position: relative; margin: 0; }

.cart-link, .sidenav a, .text-button.light {
  color: var(--header-ink);
  text-decoration: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.topbar .cart-link {
  position: relative;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--ink);
}
.cart-link svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-link circle { fill: currentColor; stroke: none; }
.cart-link span {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
}

.sidenav {
  display: flex;
  gap: 4px 14px;
  overflow-x: auto;
  padding: 10px 12px;
  align-items: center;
}

.sidenav a, .sidenav .text-button { white-space: nowrap; padding: 7px 10px; border-radius: 8px; font-weight: 500; font-size: 0.92rem; }
.sidenav a:hover, .sidenav a.is-active { background: rgba(255, 255, 255, 0.08); }
.sidenav .brand { font-size: 1rem; background: transparent; }

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { background: #ffffff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); }

.search input { margin-bottom: 14px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; }
.chip {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.chip.active { background: var(--ink); color: white; border-color: var(--ink); }

.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(17, 19, 24, 0.08); }
.card img, .placeholder {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #eef0f4;
}
.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.placeholder.large { min-height: 240px; border-radius: var(--radius); }
.card-body, .product-info { padding: 12px 14px 16px; }
.code, .muted, .crumb { color: var(--muted); margin: 0 0 4px; font-size: 0.92rem; }
.card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.price { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.wholesale { color: var(--good); margin: 4px 0 0; }
.empty { color: var(--muted); }

.product { display: block; }
.stage {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: none;
  cursor: zoom-in;
}
.stage-image { width: 100%; border-radius: 14px; aspect-ratio: 1; object-fit: cover; background: #eef0f4; }
.thumb-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.gallery-nav, .lightbox-nav, .lightbox-close {
  border: 0;
  border-radius: 999px;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.thumb-row .gallery-nav {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 1.35rem;
}
.thumb-row .gallery-nav:focus-visible,
.lightbox-nav:focus-visible,
.lightbox-close:focus-visible { outline: 3px solid rgba(22, 24, 29, 0.28); outline-offset: 2px; }
.thumbs {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #eef0f4;
  cursor: pointer;
  overflow: hidden;
}
.thumb img { width: 72px; height: 72px; object-fit: cover; }
.thumb.is-active { border-color: var(--ink); }
.thumb:focus-visible { outline: 3px solid rgba(22, 24, 29, 0.28); outline-offset: 2px; }
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.lightbox::backdrop { background: rgba(17, 19, 24, 0.86); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox-image {
  max-width: min(1080px, calc(100vw - 112px));
  max-height: calc(100vh - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
}
.lightbox-nav, .lightbox-close {
  position: fixed;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 1.8rem;
  backdrop-filter: blur(2px);
}
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 14px; }
.lightbox-nav.next { right: 14px; }
.lightbox-close { top: 14px; right: 14px; font-size: 1.6rem; }
.lightbox-nav:hover, .lightbox-close:hover { background: rgba(255, 255, 255, 0.46); }
.description { margin: 12px 0 70px; }

.buybar {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  margin: 12px -16px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.buybar .qty { width: 84px; }
.buybar .button { flex: 1; }
.buybar .color-choice { flex: 1 0 100%; margin: 0; }

.button, .text-button {
  font: inherit;
  cursor: pointer;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  width: auto;
  margin: 8px 8px 0 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  padding: 0 14px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}
.button:hover { background: #2c303a; }
.button.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.button.secondary:hover { background: #f4f5f7; }
.button.danger { background: var(--danger); color: white; }
.button.danger:hover { background: #b42318; }
.button.small { min-height: 34px; margin: 0; padding: 0 12px; font-size: 0.86rem; }
.text-button { background: none; border: 0; color: var(--ink); min-height: 36px; padding: 0; font-weight: 600; }
.text-button.light { color: var(--header-ink); }

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="color"]),
select, textarea {
  width: 100%;
  min-height: var(--tap);
  font: inherit;
  font-size: 0.95rem;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid #d8dbe3;
  background: white;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #9aa3b2;
  box-shadow: 0 0 0 3px rgba(22, 24, 29, 0.08);
}
.logo-pick input[type="file"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="color"]) {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
}
textarea { min-height: 96px; resize: vertical; }
[hidden] { display: none !important; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.checkline { display: flex; gap: 10px; align-items: center; min-height: 36px; }
.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8fa;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 26px;
  margin: 0;
}
.switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d5d8e0;
  position: relative;
  flex: 0 0 auto;
}
.switch-ui::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform .15s ease;
}
.switch input:checked + .switch-ui { background: #16181d; }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { box-shadow: 0 0 0 3px rgba(22, 24, 29, 0.16); }
.switch strong, .switch small { display: block; }
.switch strong { font-weight: 600; }
.color-pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.swatch-field { width: auto; margin-bottom: 12px; }
input.swatch {
  width: 56px;
  height: 40px;
  min-height: 40px;
  padding: 4px;
  border: 1px solid #d8dbe3;
  border-radius: 10px;
  background: white;
  cursor: pointer;
}
.swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--swatch, #808080);
  display: inline-block;
  vertical-align: -2px;
  margin-right: 6px;
}
.palette { display: flex; flex-wrap: wrap; gap: 8px; }
.palette-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  cursor: pointer;
}
.palette-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.palette-option .swatch-dot { width: 28px; height: 28px; margin: 0; }
.palette-option:has(input:checked) { border-color: var(--ink); background: #f4f5f7; }
.palette-option:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(22, 24, 29, 0.16); }
.color-line { display: flex; align-items: center; gap: 8px; }
.button.add-row { width: auto; margin-top: 8px; justify-self: start; }
.remove-row { position: relative; width: auto; margin: 0; justify-self: start; cursor: pointer; }
.remove-row input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.remove-row:has(input:checked) { background: #16181d; color: white; border-color: #16181d; }
#code-preview { font-size: 1.05rem; letter-spacing: -0.02em; }
.errorlist, .field .errorlist { color: var(--danger); list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }

.cart-list, .summary, .steps { list-style: none; padding: 0; margin: 0; }
.cart-list li, .summary li, .steps li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cart-product { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; min-width: 0; }
.cart-product p { margin: 0 0 2px; }
.cart-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #eef0f4;
  text-decoration: none;
}
.cart-thumb img,
.cart-thumb .placeholder {
  width: 72px;
  height: 72px;
  min-height: 0;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0;
  font-size: 0.68rem;
}
.cart-list form { display: flex; gap: 8px; align-items: end; }
.cart-list form label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 0.86rem; font-weight: 600; }
.cart-list form .qty { width: 88px; }
.cart-list form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="color"]),
.cart-list form .button,
.cart-list form .icon-button {
  height: 40px;
  min-height: 40px;
}
.cart-list form .button { margin: 0; padding: 0 14px; font-size: 0.92rem; }
.cart-list .price { margin: 0; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid #f3c7c4;
  border-radius: 10px;
  background: #fff;
  color: var(--danger);
  cursor: pointer;
}
.icon-button:hover { background: #fdecec; }
.icon-button svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.total { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.pager a { min-height: 44px; display: inline-flex; align-items: center; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.panel.narrow { max-width: 420px; margin: 24px auto; }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 16px; padding: 12px; }
legend { padding: 0 6px; font-weight: 600; letter-spacing: -0.02em; }
.path { font-family: Consolas, "Courier New", monospace; background: #f4f5f7; border-radius: 8px; padding: 10px; overflow-wrap: anywhere; }
.repeat { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.page-head h1 { margin: 0; }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.table th, .table td { text-align: left; padding: 12px 16px; vertical-align: middle; }
.table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.table td { border-bottom: 1px solid var(--line); }
.table tbody tr:last-child td { border-bottom: 0; }
.table a:not(.button) { font-weight: 600; text-decoration: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.row-actions .button { margin: 0; }
.costs { margin: 0; }
.costs div, .total-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.costs dt { margin: 0; }
.costs dd { margin: 0; font-variant-numeric: tabular-nums; }
.total-line { font-weight: 600; }
.profit-line dd { color: var(--good); }
.done { color: var(--good); }
.pending { color: var(--accent); }
.steps a { text-decoration: none; }

@media (max-width: 720px) {
  .topbar .brand { font-size: 1.4rem; }
  .brand-logo, .brand-preview img { height: 36px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select, textarea { font-size: 16px; }
  .panel > .button, .stack-form > .button, .panel.narrow .button { width: 100%; }
  .content { padding: 8px; }
  .sheet.panel,
  .sheet fieldset,
  .sheet .repeat { padding: 12px; }
  .table { overflow: visible; border: 0; background: transparent; border-radius: 0; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 8px 12px; }
  .table td { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
  .table td:last-child { border-bottom: 0; }
  .table td::before { content: attr(data-label); color: var(--muted); }
  .table td:empty, .table td[data-label=""]::before { content: none; }
}

@media (min-width: 720px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .buybar { margin-left: 0; margin-right: 0; border: 1px solid var(--line); border-radius: 14px; }
  .description { margin-bottom: 12px; }
}

@media (min-width: 960px) {
  .grid { grid-template-columns: 1fr 1fr 1fr; }
  .shell { display: flex; align-items: stretch; min-height: 100vh; }
  .sidenav {
    flex-direction: column;
    align-items: stretch;
    width: 220px;
    overflow: visible;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 12px;
    gap: 2px;
  }
  .sidenav .brand { padding: 4px 10px 14px; }
  .content { flex: 1; padding: 28px; }
  .product { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: start; }
  .buybar { position: static; }
  .panel .button, .stack-form .button, .cart-list + .button, .content > .button { max-width: 280px; }
}

.count { margin: 4px 0 0; color: var(--muted); }
.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}
.filters label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 0.92rem; }
.filters-actions { display: flex; gap: 16px; align-items: center; }
.filters-actions .button { width: 100%; }
.listing { display: flex; flex-direction: column; gap: 10px; }
.listing-head { display: none; }
.listing-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "identity actions"
    "name name"
    "meta meta"
    "prices prices";
  gap: 6px 12px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.article-id { grid-area: identity; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.article-name { grid-area: name; font-weight: 600; letter-spacing: -0.02em; font-size: 1.05rem; text-decoration: none; }
.article-code { font-weight: 600; text-decoration: none; }
.article-meta { grid-area: meta; margin: 0; color: var(--muted); }
.price-stack { grid-area: prices; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.price-stack .unit { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-stack .wholesale, .price-stack .muted { margin: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef0f4;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.published { background: #e7f6ee; color: var(--good); }
.badge.alert { background: #fdecec; color: var(--danger); }
.article-meta:empty, .price-stack:empty { display: none; }
.actions { grid-area: actions; position: relative; justify-self: end; z-index: 1; }
.actions[open] { z-index: 6; }
.actions summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  list-style: none;
  font-size: 0.86rem;
  font-weight: 600;
}
.actions summary::-webkit-details-marker { display: none; }
.actions summary::after { content: ""; margin-left: 8px; border: 5px solid transparent; border-top-color: var(--muted); transform: translateY(2px); }
.actions[open] summary::after { border-top-color: transparent; border-bottom-color: var(--muted); transform: translateY(-2px); }
.actions-menu {
  position: absolute;
  z-index: 5;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(31, 26, 22, 0.12);
  overflow: hidden;
}
.actions-menu a, .actions-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.actions-menu a:hover, .actions-menu button:hover { background: #f4f5f7; }
.actions-menu .danger-link { color: var(--danger); }
.pager span { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }

@media (min-width: 720px) {
  .filters { grid-template-columns: 1.4fr 1fr 1fr; }
  .filters-actions { grid-column: 1 / -1; }
  .filters-actions .button { width: auto; }
}

@media (min-width: 960px) {
  .filters { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .listing { gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
  .listing-head, .listing-row {
    grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.5fr) minmax(160px, 1.2fr) 150px 120px;
    grid-template-areas: none;
    gap: 12px;
    padding: 12px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .listing-head {
    display: grid;
    color: var(--muted);
    font-size: 0.82rem;
    border-bottom: 1px solid var(--line);
  }
  .listing-row + .listing-row { border-top: 1px solid var(--line); }
  .article-id, .article-name, .article-meta, .price-stack, .actions { grid-area: auto; }
  .article-meta:empty { display: block; }
  .price-stack:empty { display: flex; }
  .article-id { flex-direction: column; align-items: flex-start; gap: 6px; }
  .price-stack { flex-direction: column; align-items: flex-start; gap: 2px; }
  .article-name { font-size: 1.05rem; }

  .sheet { max-width: 960px; }
  .fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    align-items: start;
  }
  .fields > :not(.field),
  .fields > .field.wide,
  .fields > .field:has(textarea),
  .fields > .field:has(input[type="file"]),
  .fields > .field:has(input[type="url"]) {
    grid-column: 1 / -1;
  }
}
