/* ==========================================================================
   Fashion Archive — clean editorial redesign
   ========================================================================== */

:root,
html[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-elev: #131312;
  --fg: #f0ece2;
  --fg-muted: #8c8880;
  --fg-faint: #57544d;
  --line: #232220;
  --line-soft: #181715;
  --hover: rgba(240, 236, 226, 0.05);
  --inset: rgba(240, 236, 226, 0.07);
  --accent: #f0ece2;

  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif; /* legacy alias — same family */
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gap: 36px;
  --col-min: 230px;
  --pad-x: clamp(14px, 4vw, 64px);
}

html[data-theme="paper"] {
  --bg: #f4f2ec;
  --bg-elev: #ffffff;
  --fg: #0c0c0a;
  --fg-muted: #6f6c63;
  --fg-faint: #a8a49a;
  --line: #d8d4ca;
  --line-soft: #e7e3d9;
  --hover: rgba(12, 12, 10, 0.04);
  --inset: rgba(12, 12, 10, 0.06);
  --accent: #0c0c0a;
}

html[data-theme="white"] {
  --bg: #ffffff;
  --bg-elev: #fafaf8;
  --fg: #0c0c0a;
  --fg-muted: #6f6c63;
  --fg-faint: #a8a49a;
  --line: #e6e4dd;
  --line-soft: #efece5;
  --hover: rgba(12, 12, 10, 0.04);
  --inset: rgba(12, 12, 10, 0.06);
  --accent: #0c0c0a;
}

html[data-density="dense"]      { --gap: 22px; --col-min: 190px; }
html[data-density="comfortable"]{ --gap: 36px; --col-min: 230px; }
html[data-density="sparse"]     { --gap: 56px; --col-min: 290px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02", "kern";
}

a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  line-height: inherit;
}
input { font-family: inherit; }

/* ──────────────────────────────────────────────── Header */
.head {
  padding: 22px var(--pad-x) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
@media (max-width: 480px) {
  .head { padding: 18px var(--pad-x) 0; gap: 10px; }
}
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { opacity: 0.7; }
.wordmark em {
  font-style: normal;
  color: var(--fg-muted);
  font-weight: 400;
  margin-right: 4px;
}
@media (max-width: 480px) {
  .wordmark { font-size: 12px; }
  .wordmark em { margin-right: 3px; }
}
.head-nav {
  display: flex;
  gap: 26px;
  font-size: 12px;
  letter-spacing: 0.02em;
}
@media (max-width: 480px) {
  .head-nav { gap: 14px; font-size: 11px; }
}
.nav-link {
  color: var(--fg-muted);
  padding: 4px 0;
  transition: color 0.15s;
  border-bottom: 1px solid transparent;
}
.nav-link:hover { color: var(--fg); }
.nav-link.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

/* ──────────────────────────────────────────────── Toolbar */
.toolbar {
  margin-top: 64px;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 24px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 720px) {
  .toolbar {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0 10px;
  color: var(--fg-muted);
  transition: border-color 0.2s;
}
.search:focus-within {
  border-bottom-color: var(--fg);
  color: var(--fg);
}
.search-ic {
  flex: none;
  stroke-width: 1.2;
  opacity: 0.7;
}
.search-input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  font-size: 14px;
  color: var(--fg);
  padding: 0;
  letter-spacing: 0.005em;
}
.search-input::placeholder {
  color: var(--fg-faint);
}
.search-clear {
  color: var(--fg-faint);
  font-size: 18px;
  line-height: 1;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}
.search-clear:hover { color: var(--fg); }

.sort {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 8px;
}
.sort button {
  font-size: 12px;
  color: var(--fg-muted);
  padding: 6px 10px;
  min-height: 36px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  transition: color 0.12s, background 0.12s;
}
.sort button:hover { color: var(--fg); }
.sort button.on {
  color: var(--fg);
  background: var(--inset);
}
.sort-divider {
  width: 1px;
  height: 14px;
  background: var(--line);
  margin: 0 6px;
}

/* ──────────────────────────────────────────────── Result line */
.result-line {
  padding: 18px var(--pad-x);
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.count {
  font-family: var(--mono);
  color: var(--fg);
  font-size: 13px;
  letter-spacing: 0;
  font-feature-settings: "tnum";
}
.count-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-muted);
}
.count-sep {
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}
.count-meta { font-family: var(--mono); font-size: 11px; }

/* ──────────────────────────────────────────────── Grid */
.grid {
  padding: 24px var(--pad-x) 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--col-min), 1fr));
  gap: var(--gap) calc(var(--gap) * 0.8);
}

.empty {
  grid-column: 1 / -1;
  padding: 80px 0;
  text-align: center;
  color: var(--fg-faint);
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* ──────────────────────────────────────────────── Item */
.item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: opacity 0.15s;
}
.item-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
}
.item.card-bordered .item-media {
  border: 1px solid var(--fg-muted);
}
.item.card-framed .item-media {
  border: 1px solid var(--line);
  padding: 14px;
  background: var(--bg);
}
.item.card-framed .item-media .thumb {
  position: relative;
}

.thumb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  color: rgba(0,0,0,0.55);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.item.card-framed .thumb {
  position: relative;
  width: 100%;
  height: 100%;
}
.thumb-stripes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.thumb-label {
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
  color: #c8c4ba;
  opacity: 0.6;
}

.stock-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 7px;
  background: var(--bg);
  color: var(--fg);
  z-index: 2;
}
.stock-tag.low { background: var(--fg); color: var(--bg); }

/* Wishlist remove button */
.wl-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.15s, transform 0.15s, background 0.15s, color 0.15s;
  z-index: 3;
}
.item:hover .wl-remove { opacity: 1; transform: scale(1); }
.wl-remove:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@media (hover: none) {
  .wl-remove { opacity: 1; transform: scale(1); }
}

.item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.brand {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}
.price {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-muted);
  font-feature-settings: "tnum";
}
.item-name {
  margin: 2px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-wrap: pretty;
}
.item-meta {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  display: flex;
  gap: 6px;
  text-transform: uppercase;
}
.item-meta .dot { color: var(--fg-faint); }
.item-material {
  margin-top: 4px;
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--sans);
  letter-spacing: 0.005em;
}

/* Display variants */
html[data-display="mono"] .brand,
html[data-display="mono"] .item-name,
html[data-display="mono"] .item-material {
  font-family: var(--mono);
  letter-spacing: 0;
}
html[data-display="mono"] .item-name {
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
}

html[data-display="sans"] .item-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
}


/* ──────────────────────────────────────────────── Footer */
.foot {
  margin-top: 40px;
  padding: 28px var(--pad-x) max(36px, calc(28px + env(safe-area-inset-bottom)));
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  flex-wrap: wrap;
  gap: 14px;
}
.foot-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.foot-links a { color: var(--fg-muted); }
.foot-links a:hover { color: var(--fg); }

/* ==========================================================================
   Sub-pages: item, account, forms, admin
   ========================================================================== */

.item-link {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: inherit;
}
.item-link:hover .item-name { color: var(--fg); }
.item-link:hover .thumb-stripes { opacity: 0.7; }
.thumb-stripes { transition: opacity 0.2s; }

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px var(--pad-x) 80px;
}
.page-wide {
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px var(--pad-x) 80px;
}
.page-hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 36px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 10px;
}
.page-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 5.6vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.page-lede {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 56ch;
  text-wrap: pretty;
}

@media (max-width: 640px) {
  .page { padding: 36px var(--pad-x) 60px; }
  .page-hero { padding-bottom: 18px; margin-bottom: 24px; }
  .page-title { font-size: clamp(28px, 8vw, 44px); }
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 520px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.field-hint {
  font-size: 12px;
  color: var(--fg-faint);
  font-family: var(--sans);
}
.field-input,
.field-textarea,
.field-select {
  background: transparent;
  background-color: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--fg);
  font-family: var(--sans);
  outline: 0;
  transition: border-color 0.15s, background-color 0.15s;
  width: 100%;
  border-radius: 4px;
}
.field-input,
.field-textarea {
  background: transparent;
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 0;
  font-size: 15px;
}
.field-input::placeholder,
.field-textarea::placeholder { color: var(--fg-faint); }
.field-input:focus,
.field-textarea:focus { border-bottom-color: var(--fg); }
.field-select:focus,
.field-select:hover { border-color: var(--fg-muted); }
.field-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}
.field-select {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%),
    linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% + 1px), calc(100% - 9px) calc(50% + 1px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
  cursor: pointer;
}
html[data-theme="paper"] .field-select,
html[data-theme="white"] .field-select { color-scheme: light; }
.field-select option {
  background: var(--bg-elev);
  color: var(--fg);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 540px) {
  .field-grid { grid-template-columns: 1fr; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  min-height: 44px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  align-self: flex-start;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: 0.85; }
.btn-ghost {
  background: transparent;
  color: var(--fg);
}
.btn-ghost:hover { background: var(--inset); opacity: 1; }
.btn-sm { padding: 9px 16px; font-size: 11px; }

.divider {
  height: 1px;
  background: var(--line);
  margin: 36px 0;
  border: 0;
}

/* Item detail */
.detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 5vw, 90px);
  padding: 40px var(--pad-x) 100px;
  max-width: 1320px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; gap: 36px; }
}
.detail-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
}
.detail-thumbs {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.detail-thumbs .mini {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}
.detail-thumbs .mini.active { border-color: var(--fg); }
.detail-info { padding-top: 6px; }
.detail-id {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.detail-brand {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.detail-name {
  margin: 10px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 52px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: pretty;
  hyphens: none;
}
.detail-pricerow {
  margin-top: 28px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.detail-price {
  font-family: var(--mono);
  font-size: 22px;
  font-feature-settings: "tnum";
}
.detail-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.detail-stock::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.detail-stock.in { color: #6aa07a; }
.detail-stock.low { color: #c89357; }
.detail-stock.out { color: var(--fg-faint); }

.specs {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
.spec-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.spec-key {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  align-self: center;
}
.spec-val { color: var(--fg); }

.detail-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-actions .btn { align-self: auto; }
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  padding: 8px 0;
  min-height: 44px;
}
.detail-back:hover { color: var(--fg); }

.related-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px var(--pad-x) 18px;
  max-width: 1320px;
  margin: 60px auto 0;
  border-top: 1px solid var(--line);
}
.related-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 16px 0 0;
  text-transform: uppercase;
}

/* Code section (item page) */
.code-section {
  max-width: 1320px;
  margin: 0 auto 80px;
  padding: 28px var(--pad-x) 0;
}
.code-lookup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 460px;
  margin-bottom: 40px;
}
.code-lookup-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.code-lookup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  transition: border-color 0.15s;
}
.code-lookup-row:focus-within { border-bottom-color: var(--fg); }
.code-prefix {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.code-input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 18px;
  font-feature-settings: "tnum";
  letter-spacing: 0.02em;
  padding: 0;
}
.code-input::placeholder { color: var(--fg-faint); }
.code-error {
  font-family: var(--mono);
  font-size: 11px;
  color: #d57676;
  min-height: 14px;
  letter-spacing: 0.02em;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.code-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  min-height: 64px;
}
.code-chip:hover {
  background: var(--inset);
}
.code-chip.on {
  background: var(--fg);
  color: var(--bg);
}
.code-chip.on .code-chip-brand,
.code-chip.on .code-chip-id { color: inherit; }
.code-chip.sold { opacity: 0.5; }
.code-chip.sold::after {
  content: "Sold";
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-top: 2px;
}
.code-chip-id {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg);
  font-feature-settings: "tnum";
}
.code-chip-brand {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Account */
.auth-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.auth-tabs button {
  padding: 14px 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  background: none;
  cursor: pointer;
}
.auth-tabs button.on {
  color: var(--fg);
  border-bottom-color: var(--fg);
}
.auth-note {
  margin-top: 28px;
  font-size: 12px;
  color: var(--fg-muted);
}
.auth-note a {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
}
.auth-note a:hover { border-bottom-color: var(--fg); }

/* Admin */
.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.admin-search {
  flex: 1;
  min-width: 220px;
  max-width: 360px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--fg-muted);
}
.admin-search input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: var(--fg);
  font-size: 13px;
  font-family: inherit;
}
.admin-stats {
  display: flex;
  gap: 36px;
}
.admin-stat { display: flex; flex-direction: column; gap: 4px; }
.admin-stat-n {
  font-family: var(--mono);
  font-size: 22px;
  font-feature-settings: "tnum";
}
.admin-stat-l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.tbl-wrap {
  border: 1px solid var(--line);
  overflow-x: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 880px;
}
.tbl thead th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--line-soft);
  white-space: nowrap;
}
.tbl tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.tbl tbody tr:hover { background: var(--hover); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .id-col {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-muted);
}
.tbl .name-col {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.tbl .name-col .name-brand {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 2px;
}
.tbl .price-col {
  font-family: var(--mono);
  font-feature-settings: "tnum";
  text-align: right;
  white-space: nowrap;
}
.tbl .actions-col { text-align: right; white-space: nowrap; }
.swatch {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
  flex: none;
}
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
}
.pill.in { color: #6aa07a; border-color: rgba(106,160,122,0.4); }
.pill.low { color: #c89357; border-color: rgba(200,147,87,0.45); }
.pill.out { color: var(--fg-faint); }

.icon-btn {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: var(--fg-muted);
  background: none;
  border: 0;
  cursor: pointer;
  margin-left: 4px;
}
.icon-btn:hover { background: var(--inset); color: var(--fg); }
.icon-btn.danger:hover { color: #d57676; }

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--fg);
  color: var(--bg);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
