:root {
  color-scheme: light;
  --bg: #f6f6f7;
  --ink: #202223;
  --muted: #6d7175;
  --line: #dfe3e8;
  --panel: #ffffff;
  --panel-subdued: #f7f7f8;
  --panel-hover: #f1f2f4;
  --sidebar: #f1f2f3;
  --input-bg: #ffffff;
  --nav-active: #e9f6f1;
  --accent: #008060;
  --accent-strong: #006e52;
  --accent-soft: #e3f1eb;
  --success: #008060;
  --warning: #b98900;
  --danger: #d72c0d;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 1px 3px rgba(63, 63, 68, 0.15);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --ink: #f4f6f8;
  --muted: #aeb4bb;
  --line: #2a2f38;
  --panel: #17191f;
  --panel-subdued: #20242c;
  --panel-hover: #252b34;
  --sidebar: #111318;
  --input-bg: #101217;
  --nav-active: #17352c;
  --accent: #00a47c;
  --accent-strong: #2bc097;
  --accent-soft: #14362d;
  --success: #2bc097;
  --warning: #f0c36a;
  --danger: #ff8a78;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 24px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.global-save-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 3px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.global-save-progress span {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 128, 96, 0.35);
  transform: translateX(-120%);
}

body.is-saving .global-save-progress {
  opacity: 1;
}

body.is-saving .global-save-progress span {
  animation: saving-progress 1.05s ease-in-out infinite;
}

.global-save-status {
  position: fixed;
  top: 10px;
  right: 18px;
  z-index: 9999;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateY(-6px);
}

body.is-saving .global-save-status {
  opacity: 1;
  transform: translateY(0);
}

@keyframes saving-progress {
  0% {
    transform: translateX(-120%);
  }
  55% {
    transform: translateX(90%);
  }
  100% {
    transform: translateX(240%);
  }
}

button,
input,
select {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 264px;
  padding: 16px 12px 22px;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--sidebar);
  color: var(--ink);
  box-shadow: none;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #202223;
  color: #ffffff;
  font-weight: 800;
}

:root[data-theme="dark"] .brand-mark {
  background: #f4f6f8;
  color: #202223;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.menu-expand {
  display: grid;
  place-items: center;
  margin-left: auto;
  min-width: 48px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.menu-expand:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

nav {
  display: grid;
  gap: 4px;
}

.nav-section-label {
  margin: 14px 10px 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-item,
.nav-child {
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 8px;
  min-height: 36px;
  padding: 8px 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-weight: 650;
}

.nav-parent {
  font-weight: 750;
}

.nav-children {
  display: none;
  gap: 4px;
}

.nav-group.open .nav-children {
  display: grid;
}

.nav-child {
  margin-left: 10px;
  padding: 7px 12px 7px 18px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-item:hover,
.nav-item.active,
.nav-child:hover,
.nav-child.active {
  background: var(--nav-active);
  color: var(--ink);
}

.nav-child.active {
  border-left-color: var(--accent);
  color: var(--accent);
}

.shell {
  margin-left: 264px;
  min-height: 100vh;
  border-radius: 0;
  background: var(--bg);
  padding: 0 28px 32px;
  box-shadow: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 -28px 24px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.35rem;
  font-weight: 750;
}

h2 {
  font-size: 1rem;
}

.quick-actions,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-action-menu .button {
  min-width: 104px;
  justify-content: center;
}

#topbar-actions-slot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-action-button {
  gap: 6px;
}

.system-action-button small {
  display: none;
  margin-left: 2px;
  color: currentColor;
  font-size: 0.66rem;
  font-weight: 720;
  opacity: 0.82;
}

.system-action-button.has-selection {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 9px 22px color-mix(in srgb, var(--accent) 30%, transparent);
}

.system-action-button.has-selection small {
  display: inline;
}

.button,
.file-button,
.text-button {
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.button,
.file-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.button:hover,
.file-button:hover {
  background: var(--accent-strong);
}

.secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}

.button.danger {
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line));
  background: color-mix(in srgb, var(--danger) 12%, var(--panel));
  color: var(--danger);
  box-shadow: none;
}

.secondary:hover {
  background: var(--panel-hover);
}

.text-button {
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid,
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.stat-card,
.panel,
.table-wrap,
.connection-card,
.customer-card,
.vendor-card,
.full-card,
.po-table-wrap,
.timeline-card,
.order-list,
.order-detail,
.product-list,
.product-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.orders-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.order-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(132px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  width: 100%;
}

.order-filter-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.order-filter-grid input,
.order-filter-grid select {
  width: 100%;
  min-height: 36px;
}

.order-filter-search {
  min-width: 220px;
}

.order-queue-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.14);
}

.order-queue-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.order-queue-tab svg {
  width: 15px;
  height: 15px;
}

.order-queue-tab strong {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
  font-size: 0.72rem;
  text-align: center;
}

.order-queue-tab.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.12);
}

.order-queue-tab.active strong {
  background: rgba(0, 122, 255, 0.12);
  color: var(--accent);
}

.view-toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.order-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.bulk-bar {
  display: none;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.bulk-bar.show {
  display: flex;
}

.stat-card {
  padding: 14px;
  min-height: 84px;
}

.stat-card span,
.stat-card small {
  color: var(--muted);
  font-size: 0.8rem;
}

.stat-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.35rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.85rem;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.metric.warning strong {
  color: var(--warning);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.compact-row small,
.muted {
  color: var(--muted);
}

.toolbar {
  margin-bottom: 14px;
}

.orders-workspace,
.product-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.orders-workspace.detail-open {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.order-list,
.product-list {
  max-height: none;
  overflow: auto;
  padding: 0;
}

.orders-workspace:not(.detail-open) .order-detail {
  display: none;
}

.order-card,
.product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.order-card:hover,
.order-card.active,
.product-card:hover,
.product-card.active {
  border-color: #9ebff2;
  background: #f2f7ff;
}

.order-card small,
.order-card strong,
.product-card small,
.product-card strong {
  display: block;
}

.order-card small,
.product-card small {
  margin-top: 3px;
  color: var(--muted);
}

.order-detail,
.product-detail {
  padding: 18px;
  min-height: 520px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.detail-head h2 {
  margin-bottom: 8px;
  font-size: 1.6rem;
}

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

.detail-grid section,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.detail-grid h3,
.detail-section h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.detail-grid p,
.detail-section p {
  margin: 4px 0;
}

.detail-section {
  margin-top: 12px;
}

.order-detail table,
.compact-table table {
  min-width: 0;
}

input,
select,
textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
}

textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

label input,
label textarea {
  color: var(--ink);
  font-weight: 500;
}

input[type="search"] {
  min-width: min(360px, 100%);
}

.file-button input {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #fbfafc;
  font-size: 0.78rem;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.table-wrap {
  overflow: auto;
}

.orders-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: #ffffff;
}

.orders-table {
  min-width: 980px;
}

.orders-table tr.selected td {
  background: #f6f0ff;
}

.orders-table tbody tr {
  cursor: pointer;
}

.orders-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.order-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.channel-logo,
.channel-logo-placeholder {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  object-fit: cover;
}

.channel-logo-placeholder {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
}

.channel-logo-frame {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
}

.channel-logo-frame .channel-logo,
.channel-logo-frame .channel-logo-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.channel-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.channel-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.channel-state.connected {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
}

.channel-state.setup {
  background: color-mix(in srgb, #d97706 14%, transparent);
  color: #b45309;
}

.supply-pill {
  cursor: default;
}

.status.supply-po {
  background: color-mix(in srgb, #2563eb 16%, transparent);
  color: #1d4ed8;
}

.status.supply-stock {
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
}

.orders-table tbody tr.supply-po td:first-child,
.orders-table tbody tr.supply-stock td:first-child {
  box-shadow: inset 3px 0 0 transparent;
}

.orders-table tbody tr.supply-po td:first-child {
  box-shadow: inset 3px 0 0 #2563eb;
}

.orders-table tbody tr.supply-stock td:first-child {
  box-shadow: inset 3px 0 0 var(--success);
}

.order-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 0.16em;
  transition: color 120ms ease, text-decoration-color 120ms ease, opacity 120ms ease;
}

.order-link:hover {
  color: var(--accent-strong);
  text-decoration-color: var(--accent-strong);
}

.order-link:focus-visible,
.text-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, white);
  outline-offset: 2px;
  border-radius: 4px;
}

.customer-chip {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: #efe7fb;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.icon-button:hover {
  border-color: var(--line);
  background: #f8f6fb;
}

.action-menu {
  position: relative;
}

.action-popover {
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 5;
  display: none;
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.action-popover.open {
  display: grid;
}

.action-popover button,
.action-popover a {
  display: block;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.action-popover button:disabled {
  color: #a8a1b4;
  cursor: not-allowed;
  background: transparent;
}

.menu-label {
  display: block;
  padding: 8px 10px 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.action-popover button:hover,
.action-popover a:hover {
  background: #f6f0ff;
  color: var(--accent);
}

.action-popover button:disabled:hover {
  color: #a8a1b4;
  background: transparent;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.status.new {
  background: #fff4df;
  color: #8a4b00;
}

.status.ready {
  background: #e8f4ff;
  color: #075985;
}

.status.confirmed {
  background: #e7f7ec;
  color: var(--success);
}

.status.approved {
  background: #e7f7ec;
  color: var(--success);
}

.status.hold {
  background: #fff4df;
  color: #8a4b00;
}

.status.draft {
  background: #f1f5f9;
  color: #475569;
}

.status.live {
  background: #e7f7ec;
  color: var(--success);
}

.status.returned,
.status.canceled,
.status.void {
  background: #fee4e2;
  color: var(--danger);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  text-align: center;
}

.qty-input {
  width: 86px;
}

.money-editor,
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}

.pnl-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.pnl-strip span,
.profit-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f9fafb;
}

.pnl-strip small,
.profit-pill small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}

.pnl-strip strong,
.profit-pill strong {
  font-size: 1rem;
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.image-strip img,
.image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
}

.image-placeholder {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  color: var(--muted);
}

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

.product-form section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.product-form h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.product-form label + label,
.product-form .form-grid + label {
  margin-top: 12px;
}

.connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.connection-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 330px;
  padding: 18px;
}

.primary-channel-card {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  box-shadow: 0 18px 40px rgba(0, 122, 255, 0.12);
}

.customer-grid {
  display: block;
}

.customer-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.customer-table {
  min-width: 960px;
}

.customer-table td {
  vertical-align: top;
}

.customer-table td small {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
}

.customer-name-link {
  font-weight: 900;
}

.mini-history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mini-history button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.mini-history button:hover {
  border-color: #9ebff2;
  background: #f2f7ff;
}

.mini-history span {
  color: var(--muted);
}

.connection-card h2 {
  margin: 0 0 5px;
  line-height: 1.15;
}

.connection-card p,
.channel-status-line {
  min-height: 40px;
  color: var(--muted);
  line-height: 1.35;
}

.connection-card .button {
  width: 100%;
  justify-content: center;
}

.auth-box {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.auth-box .button {
  margin-top: 0;
}

.channel-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.po-list {
  display: grid;
  gap: 14px;
}

.subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.subnav-item {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.subnav-item.active,
.subnav-item:hover {
  background: #f3eefb;
  color: var(--accent);
}

.po-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.po-table-wrap {
  overflow: auto;
}

.po-table {
  min-width: 860px;
}

.po-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.po-link {
  font-weight: 900;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.inline-link {
  font-weight: 800;
}

.shopify-order .order-link,
.shopify-card .order-link,
.detail-section .order-link,
.full-card .order-link {
  color: var(--accent-strong);
  text-decoration-color: color-mix(in srgb, var(--accent-strong) 55%, transparent);
}

.shopify-order .order-link:hover,
.shopify-card .order-link:hover,
.detail-section .order-link:hover,
.full-card .order-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.status.draft {
  background: #f1f5f9;
  color: #475569;
}

.status.active {
  background: #e7f7ec;
  color: var(--success);
}

.vendor-list {
  display: none;
  width: 100%;
}

.vendor-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.brand-list {
  display: none;
  width: 100%;
}

.brand-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.catalog-list {
  width: 100%;
}

.catalog-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.catalog-table {
  min-width: 1040px;
}

.catalog-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.product-name-link {
  font-weight: 900;
}

.inventory-table td {
  vertical-align: middle;
}

.inventory-low-row td {
  background: #fffaf0;
}

.template-rules {
  display: grid;
  gap: 6px;
}

.template-rules label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.template-rules input {
  min-height: auto;
}

.channel-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  display: grid;
  gap: 8px;
  margin: 0;
}

.channel-mini-grid span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: color-mix(in srgb, var(--panel-subdued) 86%, white);
}

.channel-mini-grid small,
.channel-mini-grid strong {
  display: block;
}

.channel-mini-grid small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.1;
}

.channel-mini-grid strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.1;
}

.channel-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.channel-toggle-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfaff;
  color: var(--ink);
  font-weight: 800;
}

.channel-toggle-grid input {
  min-height: auto;
}

.channel-settings-card {
  display: grid;
  gap: 14px;
}

.system-settings-page {
  display: grid;
  gap: 12px;
}

.system-settings-hero,
.system-settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.system-settings-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.system-settings-hero h2,
.system-settings-card h3 {
  margin: 0;
}

.system-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
}

.system-settings-card {
  padding: 12px;
}

.system-settings-card.span-2 {
  grid-column: span 2;
}

.compact-head {
  margin-bottom: 10px;
}

.system-user-list,
.settings-field-stack,
.role-chip-list {
  display: grid;
  gap: 8px;
}

.system-user-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.2fr) minmax(120px, 0.7fr) minmax(100px, 0.6fr) 34px;
  gap: 8px;
  align-items: center;
}

.system-user-row input,
.system-user-row select,
.settings-field-stack input,
.settings-field-stack select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.system-user-row input:disabled,
.system-user-row select:disabled,
.settings-field-stack input:disabled,
.settings-field-stack select:disabled,
.settings-toggle-grid input:disabled {
  opacity: 1;
  background: var(--surface-soft);
  cursor: default;
}

.role-chip-list span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: var(--surface-soft);
}

.role-chip-list small {
  color: var(--muted);
  font-weight: 750;
}

.settings-field-stack label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.settings-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-toggle-grid.single-column {
  grid-template-columns: 1fr;
}

.settings-toggle-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: var(--surface-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.system-settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.settings-inline-field {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.settings-inline-field select {
  min-height: 34px;
  min-width: 180px;
}

.system-fields-card {
  overflow: hidden;
}

.system-fields-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px) minmax(140px, 190px);
  gap: 8px;
  margin-bottom: 10px;
}

.system-fields-toolbar input,
.system-fields-toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
}

.system-fields-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.system-fields-summary span {
  display: grid;
  gap: 2px;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  padding: 9px 10px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.system-fields-summary strong {
  font-size: 1rem;
}

.system-fields-summary small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.system-fields-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.system-fields-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.system-fields-table th,
.system-fields-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 0.78rem;
}

.system-fields-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.system-fields-table td:first-child {
  min-width: 180px;
}

.system-fields-table td:nth-child(4) {
  min-width: 250px;
}

.system-fields-table td strong,
.system-fields-table td small {
  display: block;
}

.system-fields-table td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.system-fields-table tr:last-child td {
  border-bottom: 0;
}

.system-field-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.system-field-chip-list span {
  max-width: 220px;
  overflow-wrap: anywhere;
  border: 1px solid #d8e2f0;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
}

.channel-settings-head {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 132px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.settings-sidebar {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
  padding: 16px 14px;
}

.settings-sidebar-brand {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.settings-sidebar-brand img,
.settings-sidebar-brand > span {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  padding: 5px;
}

.settings-sidebar-brand > span {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
}

.settings-sidebar-brand strong,
.settings-sidebar-brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-sidebar-brand strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.settings-sidebar-brand small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.settings-sidebar-search {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.settings-sidebar-nav {
  display: grid;
  align-content: start;
  gap: 4px;
}

.settings-sidebar-nav button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  padding: 8px 9px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.settings-sidebar-nav button.active {
  background: #f1f5f9;
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--accent);
}

.settings-sidebar-nav button:hover {
  background: #f8fafc;
  color: var(--ink);
}

.settings-sidebar-back {
  justify-self: start;
  padding: 0;
  font-size: 0.78rem;
}

.settings-main {
  min-width: 0;
  background: #ffffff;
}

.settings-main-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.settings-main-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
}

.settings-head-stat {
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfdff;
}

.settings-head-stat small,
.settings-head-stat strong {
  display: block;
}

.settings-head-stat small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.settings-head-stat strong {
  color: var(--ink);
  font-size: 1rem;
}

.settings-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0 24px 24px;
}

.settings-content-grid > .full-card,
.settings-content-grid > .channel-settings-card,
.settings-content-grid > .channel-api-history,
.settings-content-grid > .channel-attribute-settings-card,
.settings-content-grid > .shopify-missing-variants-panel {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
  padding: 20px 0;
}

.settings-content-grid > .span-2,
.settings-content-grid > .channel-settings-card,
.settings-content-grid > .channel-api-history,
.settings-content-grid > .channel-attribute-settings-card,
.settings-content-grid > .shopify-missing-variants-panel {
  grid-column: 1 / -1;
}

.channel-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 7px;
  box-shadow: var(--shadow-soft);
}

.channel-profile-tabs button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 7px 11px;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.channel-profile-tabs button.active {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--panel-solid));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.channel-branding-card,
.channel-defaults-card {
  align-self: stretch;
}

.channel-branding-card {
  min-height: 0;
}

.channel-logo-editor {
  display: grid;
  grid-template-columns: minmax(156px, 220px) auto;
  align-items: center;
  justify-content: start;
  gap: 14px;
  margin: 0;
}

.channel-branding-card .brand-logo-large {
  width: 100%;
  max-width: 220px;
  height: 86px;
  border-radius: 8px;
  object-fit: contain;
  padding: 12px;
  background: #ffffff;
}

.channel-branding-card .brand-logo-placeholder {
  font-size: 1.45rem;
}

.channel-defaults-card .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.channel-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.channel-card-title-row h3 {
  margin: 0;
}

.channel-defaults-note {
  margin: 9px 0 0;
  font-size: 0.74rem;
}

.channel-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.settings-shell .channel-settings-layout {
  grid-template-columns: minmax(0, 1fr);
}

.settings-shell .channel-settings-aside {
  position: static;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  border-left: 0;
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
}

.settings-shell .channel-stat-strip {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.settings-shell .channel-settings-grid,
.settings-shell .channel-settings-grid.account-grid,
.settings-shell .channel-settings-grid.policy-grid,
.settings-shell .channel-settings-grid.listing-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.settings-shell .channel-toggle-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.channel-settings-main {
  display: grid;
  gap: 18px;
}

.channel-settings-group {
  display: grid;
  gap: 10px;
}

.channel-settings-group + .channel-settings-group {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.channel-attribute-settings-card {
  overflow: hidden;
}

.channel-attribute-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(160px, 220px) minmax(260px, 1fr);
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.channel-attribute-filter-bar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.channel-attribute-filter-bar input,
.channel-attribute-filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.channel-attribute-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.channel-attribute-summary span {
  display: grid;
  gap: 2px;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.channel-attribute-summary small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.channel-attribute-summary strong {
  font-size: 1rem;
}

.channel-attribute-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.channel-attribute-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.channel-attribute-table th,
.channel-attribute-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 0.78rem;
}

.channel-attribute-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.channel-attribute-table tr.required td:first-child {
  border-left: 3px solid #7c5cff;
}

.channel-attribute-table td strong,
.channel-attribute-table td small {
  display: block;
}

.channel-attribute-table td strong em {
  color: #ef4444;
  font-style: normal;
}

.channel-attribute-table td small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.channel-attribute-table select,
.channel-attribute-table input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
}

.channel-attribute-foot {
  margin: 8px 0 0;
}

.channel-settings-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.channel-settings-group-head strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.channel-settings-group-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

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

.channel-settings-grid.account-grid {
  grid-template-columns: minmax(120px, 0.6fr) minmax(120px, 0.55fr) minmax(280px, 1.85fr);
}

.channel-settings-grid.policy-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.channel-settings-grid.listing-grid {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.channel-settings-grid label {
  min-width: 0;
}

.channel-settings-grid input,
.channel-settings-grid select {
  width: 100%;
}

.channel-settings-aside {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 12px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.channel-sync-panel {
  display: grid;
  gap: 6px;
}

.channel-sync-panel strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.channel-location-form {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-subdued);
}

.channel-location-form strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.channel-location-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.channel-location-form input {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
}

.channel-location-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.channel-stat-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.channel-stat-strip span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel-subdued) 88%, white);
}

.channel-stat-strip small,
.channel-stat-strip strong {
  display: block;
}

.channel-stat-strip small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.channel-stat-strip strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.05rem;
}

.ebay-toggle-grid {
  margin-top: 2px;
}

.channel-api-history {
  display: grid;
  gap: 12px;
}

.jobs-channel-logs {
  display: grid;
  margin-top: 14px;
}

.jobs-channel-logs .channel-api-history {
  grid-column: 1 / -1;
}

.api-log-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 180px) minmax(160px, 210px) max-content max-content;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-subdued);
}

.api-log-filters label {
  display: grid;
  gap: 5px;
}

.api-log-filters small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.api-log-filters input,
.api-log-filters select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--panel);
  color: var(--ink);
}

.api-log-count {
  margin: -4px 0 0;
}

.api-log-list {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
}

.api-log-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) max-content max-content max-content max-content;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-subdued);
}

.api-log-row strong,
.api-log-row small {
  display: block;
}

.api-log-row small,
.api-log-row time,
.api-log-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.api-log-row p {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.api-log-row.ok {
  border-left-color: #16a34a;
}

.api-log-row.warn {
  border-left-color: #d97706;
}

.api-log-row.error {
  border-left-color: #dc2626;
}

.api-log-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--panel);
  color: var(--ink) !important;
}

.api-log-job-link {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--panel);
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.api-log-job-link:hover {
  border-color: var(--brand);
}

.shopify-missing-variants-panel {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.shopify-missing-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.shopify-missing-summary span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-subdued);
}

.shopify-missing-summary small,
.shopify-missing-table td small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.shopify-missing-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopify-missing-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.shopify-missing-table {
  min-width: 980px;
}

.shopify-missing-table code {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-subdued);
  color: var(--ink);
  font-size: 0.76rem;
  white-space: nowrap;
}

.compact-pagination {
  justify-content: flex-end;
  margin-top: 0;
}

@media (max-width: 900px) {
  .api-log-filters {
    grid-template-columns: 1fr;
  }

  .api-log-row {
    grid-template-columns: 1fr;
  }

  .shopify-missing-summary {
    grid-template-columns: 1fr;
  }
}

.validation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.validation-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.validation-item.ok {
  background: #f0fdf4;
}

.validation-item.missing {
  background: #fff7ed;
}

.validation-item strong,
.validation-item small {
  display: block;
}

.validation-item small {
  margin-top: 4px;
  color: var(--muted);
}

.template-preview-validation {
  margin-top: 12px;
}

.brand-table {
  min-width: 980px;
}

.brand-logo,
.brand-logo-placeholder {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.brand-logo {
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand-logo-placeholder {
  background: #f3eefb;
  color: var(--accent);
  font-weight: 900;
}

.brand-name-link {
  font-weight: 900;
}

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

.brand-logo-large {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand-table select,
.brand-table input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
}

.vendor-check-list {
  display: grid;
  gap: 6px;
  max-height: 150px;
  overflow: auto;
}

.brand-profile-vendors {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: none;
}

.vendor-check-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.vendor-check-list input {
  width: auto;
}

.vendor-table {
  min-width: 980px;
}

.vendor-table td {
  vertical-align: top;
}

.vendor-table td small {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
}

.vendor-name-link {
  font-weight: 900;
}

.vendor-notes {
  max-width: 320px;
  color: var(--muted);
}

.muted-row {
  opacity: 0.62;
}

.status.inactive {
  background: #f1f5f9;
  color: #64748b;
}

.edit-stack {
  display: grid;
  gap: 10px;
}

.edit-stack label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.edit-stack label.checkbox-row {
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}

.edit-stack label.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.edit-stack input,
.edit-stack select,
.full-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fbfaff;
  color: var(--ink);
}

.source-usage-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.source-usage-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.source-usage-summary strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.source-manager-sections {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.source-manager-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.source-manager-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.source-manager-section-head strong {
  color: var(--ink);
}

.source-manager-section-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.source-manager-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  padding: 10px;
}

.source-manager-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfafc;
}

.source-manager-field.wide {
  grid-column: span 2;
}

.source-manager-field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.source-manager-field-head strong,
.source-manager-field-head small {
  overflow-wrap: anywhere;
}

.source-manager-field-head strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.source-manager-field-head small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.source-manager-value {
  max-height: 110px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.35;
}

.source-manager-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.source-manager-chips span {
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, #ffffff);
  color: var(--accent);
  padding: 3px 7px;
  font-size: 0.68rem;
  font-weight: 900;
}

.catalog-source-summary,
.catalog-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.catalog-source-summary span {
  display: grid;
  gap: 2px;
}

.catalog-source-summary small,
.catalog-table td small {
  display: block;
  color: var(--muted);
}

.source-product-link {
  display: grid;
  gap: 2px;
  max-width: 360px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-align: left;
  box-shadow: none;
}

.source-product-link strong {
  color: var(--accent);
}

.source-product-link:hover strong,
.source-product-link:hover small {
  text-decoration: underline;
}

.source-product-cell {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.source-product-cell .catalog-product-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.source-product-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.source-product-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.source-product-badges small,
.source-diff-note {
  color: var(--muted);
  font-size: 0.68rem;
}

.source-catalog-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.source-catalog-workspace.detail-open {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.source-catalog-main {
  min-width: 0;
}

.source-catalog-workspace:not(.detail-open) .source-catalog-preview-panel {
  display: none;
}

.source-preview-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 9px;
  background: var(--input-bg);
  overflow: hidden;
}

.source-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.source-preview-media.empty {
  color: var(--muted);
}

.source-catalog-preview-panel p,
.source-preview-bullets li {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.38;
}

.source-preview-bullets {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.source-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-detail-chips span {
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  padding: 4px 8px;
  background: color-mix(in srgb, var(--accent-soft) 62%, var(--panel));
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
}

.catalog-table tr.source-selected-row td {
  background: color-mix(in srgb, var(--accent-soft) 52%, var(--panel));
}

@media (max-width: 1180px) {
  .source-catalog-workspace.detail-open {
    grid-template-columns: 1fr;
  }

  .source-catalog-preview-panel {
    position: static;
    max-height: none;
  }
}

.catalog-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.catalog-filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

.submission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.section-head,
.address-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h3 {
  margin-bottom: 0;
}

.address-list {
  display: grid;
  gap: 14px;
}

.address-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfaff;
}

.address-card .edit-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.file-feed-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfaff;
}

.file-feed-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.file-feed-meta span {
  display: grid;
  gap: 3px;
}

.file-feed-meta small {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(23, 21, 31, 0.36);
}

.modal-backdrop.show {
  display: grid;
}

.modal-card {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.modal-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.modal-grid .span-2 {
  grid-column: span 2;
}

.modal-grid input,
.modal-grid textarea,
.modal-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fbfaff;
  color: var(--ink);
}

.manual-order-modal-card {
  width: min(980px, 100%);
  max-height: min(92vh, 980px);
  overflow: auto;
}

.order-sku-map-modal-card {
  width: min(920px, 100%);
  min-height: min(620px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
}

.master-category-map-modal-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.master-category-map-content {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  padding: 14px 0;
}

.master-category-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-subdued);
}

.master-category-summary span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.master-category-summary small {
  color: var(--muted);
  font-weight: 800;
}

.master-category-summary strong {
  color: var(--ink);
}

.master-category-results {
  min-height: 260px;
}

.master-category-apply-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.master-category-apply-options[hidden] {
  display: none;
}

.master-category-apply-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-subdued);
  cursor: pointer;
}

.master-category-apply-options label.selected {
  border-color: var(--brand);
  background: rgba(0, 113, 227, 0.08);
}

.master-category-apply-options span {
  display: grid;
  gap: 3px;
}

.master-category-apply-options small {
  color: var(--muted);
  font-weight: 700;
}

.order-sku-map-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-subdued);
}

.order-sku-map-summary span,
.order-sku-map-search {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.order-sku-map-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  margin: 12px 0;
}

.order-sku-map-search label {
  display: grid;
  gap: 6px;
}

.order-sku-map-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: var(--input-bg);
  color: var(--ink);
}

.order-sku-map-results {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.order-sku-map-feedback {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  background: var(--panel-subdued);
}

.order-sku-map-feedback strong {
  color: var(--ink);
}

.order-sku-map-feedback.loading::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: sku-map-spin 0.75s linear infinite;
}

@keyframes sku-map-spin {
  to {
    transform: rotate(360deg);
  }
}

.product-section-aliases {
  display: grid;
  gap: 12px;
}

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

.product-alias-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.product-alias-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-alias-row strong,
.product-alias-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-alias-row small {
  color: var(--muted);
  font-weight: 700;
}

.order-sku-map-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.order-sku-map-result.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.order-sku-map-result div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-sku-map-result span,
.order-sku-map-result small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-sku-map-result small {
  color: var(--muted);
  font-weight: 700;
}

.order-sku-map-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-subdued);
}

.order-sku-map-choice[hidden] {
  display: none;
}

.order-sku-map-choice div {
  display: grid;
  gap: 3px;
}

.order-sku-map-choice-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.manual-order-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #f7faf8;
  margin-top: 14px;
}

.manual-order-hero small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.manual-order-section {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.manual-order-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.manual-order-section-head h3 {
  margin: 0;
  font-size: 0.9rem;
}

.manual-order-lines {
  display: grid;
  gap: 10px;
}

.manual-order-line {
  display: grid;
  grid-template-columns: minmax(140px, 1.25fr) minmax(180px, 1.9fr) 80px 110px 110px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
}

.manual-order-line label,
.manual-order-note {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.manual-order-line input,
.manual-order-note textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

.manual-order-line-meta {
  display: grid;
  gap: 6px;
  align-items: end;
}

.manual-order-line-subtotal {
  font-size: 0.82rem;
  color: var(--muted);
}

.manual-order-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  margin-top: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 24px);
}

.refund-line-row {
  display: grid;
  grid-template-columns: 88px minmax(140px, 1fr) minmax(220px, 1.8fr) 110px 110px 92px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
}

.refund-line-select,
.refund-line-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.refund-line-select {
  align-self: center;
  justify-items: start;
}

.refund-line-select input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.refund-line-select span {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.refund-line-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}

.refund-line-title input {
  text-overflow: ellipsis;
}

#order-refund-form {
  max-width: 720px;
}

#order-refund-lines {
  gap: 8px;
}

@media (max-width: 920px) {
  .refund-line-row {
    grid-template-columns: 88px repeat(2, minmax(0, 1fr));
  }

  .refund-line-title {
    grid-column: span 2;
  }
}

.manual-order-totals {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
}

.manual-order-totals strong {
  color: var(--ink);
  margin-left: 6px;
}

.full-order {
  display: grid;
  gap: 16px;
}

.full-order-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.full-order-head h2 {
  font-size: 1.6rem;
}

.full-order-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.full-card,
.timeline-card {
  padding: 16px;
}

.full-card h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.full-card h4 {
  margin: 18px 0 10px;
  color: var(--ink);
  font-size: 0.9rem;
}

.full-card p {
  margin: 6px 0;
}

.span-2 {
  grid-column: 1 / -1;
}

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

.summary-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfafc;
}

.summary-grid small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
}

.summary-grid strong {
  font-size: 1rem;
}

.note-button {
  margin-top: 10px;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-event {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 0 0 18px;
}

.timeline-event::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline-event:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-event.note .timeline-dot {
  background: #f59e0b;
}

.timeline-event.status .timeline-dot {
  background: var(--success);
}

.timeline-event.edited .timeline-dot {
  background: #0ea5e9;
}

.timeline-event p {
  margin: 4px 0;
  color: var(--ink);
}

.timeline-event small {
  color: var(--muted);
}

.report-lower {
  margin-top: 18px;
}

.report-bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-row div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bar-row small {
  color: var(--muted);
}

.bar-row span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #146ef5, #13a36f);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(20px);
  opacity: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #111820;
  color: #ffffff;
  box-shadow: var(--shadow);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 14px;
    border-radius: 0;
  }

  .brand {
    margin-bottom: 12px;
  }

  nav {
    grid-template-columns: repeat(6, 1fr);
  }

  .nav-group {
    grid-column: span 2;
    grid-template-columns: 1fr 1fr;
  }

  .nav-parent {
    grid-column: 1 / -1;
  }

  .nav-child {
    margin-left: 0;
    text-align: center;
  }

  .nav-item {
    text-align: center;
    padding: 10px 8px;
  }

  .shell {
    margin-left: 0;
    padding: 18px;
    border-radius: 0;
  }

  .topbar,
  .dashboard-grid,
  .full-order-head,
  .full-order-grid,
  .channel-settings-layout,
  .orders-workspace,
  .orders-workspace.detail-open,
  .product-workspace {
    grid-template-columns: 1fr;
    display: grid;
  }

  .order-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-filter-search,
  #order-filter-clear {
    grid-column: 1 / -1;
  }

  .summary-grid,
  .validation-grid,
  .channel-toggle-grid,
  .channel-settings-grid,
  .channel-settings-grid.account-grid,
  .channel-settings-grid.policy-grid,
  .channel-settings-grid.listing-grid,
  .po-dashboard,
  .vendor-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-settings-aside {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 14px 0 0;
  }

  .channel-settings-group-head {
    display: grid;
  }

  .channel-settings-group-head span {
    text-align: left;
  }

  .metric-grid,
  .report-grid,
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-list,
  .product-list {
    max-height: none;
  }

  .shopify-order-head,
  .shopify-order-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .shopify-header-actions,
  .shopify-card-actions {
    justify-content: stretch;
  }

  .order-line-item,
  .order-total-table div,
  .timeline-comment {
    grid-template-columns: 1fr;
  }
}

/* Polaris-style surface and theme pass. Keep page-specific layouts intact while
   moving every screen onto the shared admin shell tokens. */
.metric,
.stat-card,
.panel,
.table-wrap,
.connection-card,
.customer-card,
.vendor-card,
.full-card,
.po-table-wrap,
.timeline-card,
.order-list,
.order-detail,
.product-list,
.product-detail,
.orders-table-wrap,
.customer-table-wrap,
.vendor-table-wrap,
.brand-table-wrap,
.catalog-table-wrap,
.modal-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.metric,
.stat-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-subdued));
}

.panel-head,
.compact-row,
.orders-command,
.toolbar,
.bulk-bar,
.full-order-head,
.modal-head,
.modal-actions {
  border-color: var(--line);
}

input,
select,
textarea,
.brand-table select,
.brand-table input,
.edit-stack input,
.edit-stack select,
.full-card textarea,
.modal-grid input,
.modal-grid textarea,
.modal-grid select {
  background: var(--input-bg);
  color: var(--ink);
  border-color: var(--line);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 24%, transparent);
  outline-offset: 1px;
}

table,
.orders-table,
.customer-table,
.po-table,
.vendor-table,
.brand-table,
.catalog-table {
  color: var(--ink);
}

th {
  background: var(--panel-subdued);
  color: var(--muted);
}

td {
  background: var(--panel);
}

tbody tr:hover td {
  background: var(--panel-hover);
}

.orders-table tr.selected td {
  background: var(--nav-active);
}

.summary-grid span,
.image-slot,
.template-rule,
.channel-mini-grid span,
.channel-toggle-grid label,
.validation-item,
.address-card,
.file-row,
.po-line,
.pnl-item {
  background: var(--panel-subdued);
  border-color: var(--line);
}

.customer-chip {
  background: var(--accent-soft);
  color: var(--accent);
}

.brand-logo-placeholder {
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-button:hover,
.action-popover button:hover,
.action-popover a:hover,
.subnav-item.active,
.subnav-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.action-popover {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.action-popover button,
.action-popover a {
  color: var(--ink);
}

.action-popover button:disabled,
.action-popover button:disabled:hover {
  color: color-mix(in srgb, var(--muted) 65%, transparent);
}

.subnav {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
  width: fit-content;
}

.subnav-item {
  border-color: transparent;
  background: transparent;
}

.subnav-item.active {
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status.new,
.status.hold {
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--warning);
}

.status.ready {
  background: color-mix(in srgb, #0ea5e9 16%, transparent);
  color: #0b70a8;
}

.status.confirmed,
.status.approved,
.status.live,
.status.active {
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
}

.status.draft,
.status.inactive {
  background: var(--panel-subdued);
  color: var(--muted);
}

.status.returned,
.status.canceled,
.status.void {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
}

.inventory-low-row td,
.validation-item.missing {
  background: color-mix(in srgb, var(--warning) 12%, var(--panel));
}

.validation-item.ok {
  background: color-mix(in srgb, var(--success) 12%, var(--panel));
}

.timeline-dot {
  border-color: var(--panel);
}

.toast {
  background: var(--ink);
  color: var(--bg);
}

:root[data-theme="dark"] .button,
:root[data-theme="dark"] .file-button {
  color: #07130f;
}

:root[data-theme="dark"] .secondary {
  color: var(--ink);
}

:root[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

:root[data-theme="dark"] .status.ready {
  color: #78c7f3;
}

.shopify-order {
  max-width: 1300px;
  margin: 0 auto;
}

.shopify-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.shopify-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.shopify-title-row h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 750;
}

.shopify-header-actions,
.shopify-card-actions,
.detail-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.shopify-order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 16px;
  align-items: start;
}

.shopify-main-column,
.shopify-side-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.shopify-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.shopify-card h3,
.shopify-card h4,
.shopify-timeline h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
}

.shopify-card h4 {
  margin-top: 16px;
}

.shopify-card p {
  margin: 6px 0;
}

.shopify-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.fulfillment-box {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-subdued);
}

.order-line-list {
  display: grid;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.line-item-grid {
  display: block;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: visible;
  margin-top: 12px;
  max-width: 100%;
}

.line-item-grid-head,
.line-item-grid-row {
  display: grid;
  grid-template-columns: minmax(96px, 1.05fr) minmax(220px, 3fr) minmax(72px, 0.72fr) minmax(72px, 0.72fr) minmax(72px, 0.72fr) minmax(44px, 0.42fr);
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  min-width: 0;
}

.line-item-grid-head.with-actions,
.line-item-grid-row.with-actions {
  grid-template-columns: minmax(96px, 1fr) minmax(220px, 2.8fr) minmax(72px, 0.7fr) minmax(72px, 0.7fr) minmax(72px, 0.7fr) minmax(44px, 0.42fr) minmax(102px, 0.9fr);
  min-width: 0;
}

.line-item-grid-head {
  background: color-mix(in srgb, var(--panel) 75%, var(--bg));
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.line-item-grid-row + .line-item-grid-row {
  border-top: 1px solid var(--line);
}

.line-item-sku {
  display: grid;
  gap: 2px;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.76rem;
  line-height: 1.15;
}

.line-item-sku-note {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.line-item-sku-note.warning {
  color: var(--warning);
}

.line-item-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.line-item-action-menu {
  margin-left: auto;
  position: relative;
}

.compact-kebab {
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
}

.line-item-action-menu .action-popover {
  right: 0;
  left: auto;
  top: 34px;
  z-index: 30;
}

.line-item-title {
  min-width: 0;
}

.order-line-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.order-line-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.line-thumb {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
  color: var(--muted);
  font-weight: 800;
}

.shopify-card-actions,
.detail-card-actions {
  margin-top: 12px;
}

@media (max-width: 960px) {
  .line-item-grid {
    overflow-x: auto;
    overflow-y: visible;
  }

  .line-item-grid-head,
  .line-item-grid-row {
    grid-template-columns: minmax(100px, 1.1fr) minmax(180px, 2fr) minmax(80px, 0.8fr) minmax(80px, 0.8fr) minmax(80px, 0.8fr) minmax(60px, 0.6fr);
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.82rem;
    min-width: 760px;
  }

  .line-item-grid-head.with-actions,
  .line-item-grid-row.with-actions {
    grid-template-columns: minmax(120px, 1.1fr) minmax(180px, 2fr) minmax(70px, 0.7fr) minmax(70px, 0.7fr) minmax(70px, 0.7fr) minmax(52px, 0.5fr) minmax(150px, 1.3fr);
    min-width: 940px;
  }
}

.order-total-table {
  display: grid;
  gap: 0;
}

.order-total-table div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1.4fr) auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.order-total-table div:last-child {
  border-bottom: 0;
}

.order-total-table span:nth-child(2) {
  color: var(--muted);
}

.order-total-table strong {
  text-align: right;
}

.paid-row {
  margin-top: 6px;
  padding-top: 12px !important;
  font-weight: 800;
}

.order-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.order-detail-list dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.order-detail-list dd {
  margin: -4px 0 2px;
}

.shopify-timeline {
  display: grid;
  gap: 12px;
}

.timeline-comment {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.comment-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.timeline-comment textarea {
  min-height: 38px;
}

:root[data-theme="dark"] .comment-avatar {
  color: #07130f;
}

.receive-lines {
  display: grid;
  gap: 8px;
  margin: 8px 0 16px;
  max-height: min(58vh, 640px);
  overflow: auto;
  padding-right: 4px;
}

.receive-line {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 90px 90px 120px minmax(150px, 1fr) 140px;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-subdued);
}

.receive-line-head {
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.receive-line small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.receive-line input {
  width: 100%;
}

.receive-modal-card {
  width: min(1120px, 100%);
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
}

.return-receive-modal-card {
  width: min(820px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: auto;
}

.return-receive-primary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0 10px;
}

.return-receive-intro {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.return-receive-secondary details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-subdued);
  overflow: hidden;
}

.return-receive-secondary summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  font-weight: 800;
  color: var(--ink);
  background: #fff;
}

.return-receive-secondary summary::-webkit-details-marker {
  display: none;
}

.return-receive-secondary summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1rem;
}

.return-receive-secondary details[open] summary::after {
  content: "-";
}

.return-receive-secondary-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.return-receive-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.receive-toolbar,
.receive-toolbar-actions,
.receive-line-actions,
.serial-toolbar-row,
.serial-toolbar-actions,
.serial-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.receive-toolbar,
.serial-toolbar-row {
  justify-content: space-between;
}

.receive-toolbar {
  margin-bottom: 10px;
}

.receive-tools-grid,
.receive-bulk-actions,
.receive-attachment-head,
.receive-footer-actions,
.receive-summary-strip,
.receive-pill-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.receive-tools-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(240px, 1fr) auto;
  gap: 12px;
  margin-bottom: 12px;
}

.receive-tools-grid label,
.receive-line-variance,
.receive-line-location {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.receive-scan-field input {
  font-size: 0.95rem;
}

.receive-attachment-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-subdued);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.receive-attachment-head {
  justify-content: space-between;
}

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

.receive-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel);
}

.receive-attachment-item small,
.receive-variance-note small,
.receive-line-meta small {
  display: block;
  color: var(--muted);
}

.audit-grid,
.receipt-meta-grid,
.receipt-attachment-grid {
  display: grid;
  gap: 12px;
}

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

.audit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-subdued);
}

.audit-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
}

.audit-list,
.receipt-line-list {
  display: grid;
  gap: 10px;
}

@media (max-width: 880px) {
  .return-receive-primary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .channel-settings-head,
  .section-head.channel-settings-head {
    display: grid;
  }

  .channel-settings-grid,
  .channel-settings-grid.account-grid,
  .channel-settings-grid.policy-grid,
  .channel-settings-grid.listing-grid,
  .channel-toggle-grid,
  .channel-stat-strip,
  .knowledge-release,
  .knowledge-workflow {
    grid-template-columns: 1fr;
  }

  .knowledge-link-row {
    justify-content: flex-start;
  }

  .return-receive-primary-grid {
    grid-template-columns: 1fr;
  }
}

.audit-list button,
.receipt-line-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-subdued);
}

.audit-list button:hover {
  background: var(--panel-hover);
}

.receipt-detail-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.receipt-detail-content {
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
}

.receipt-meta-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.receipt-meta-grid span,
.receipt-line-item,
.receipt-attachment-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
  padding: 10px 12px;
}

.receipt-meta-grid small,
.receipt-attachment-item small,
.receipt-line-item small {
  display: block;
  color: var(--muted);
}

.receipt-line-item {
  display: grid;
  gap: 8px;
}

.receipt-line-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.receipt-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.receipt-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.receipt-chip.variance-short,
.status.short {
  color: #a16207;
  background: rgba(245, 158, 11, 0.16);
}

.receipt-chip.variance-over,
.status.over {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.16);
}

.receipt-chip.variance-damaged,
.status.damaged {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.16);
}

.receipt-chip.variance-backordered,
.status.backordered {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.16);
}

.receipt-attachment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.receipt-attachment-item {
  display: grid;
  gap: 6px;
}

.receive-summary-strip {
  margin-bottom: 8px;
}

.receive-pill {
  min-width: 120px;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
}

.receive-pill small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.receive-line-actions {
  justify-content: space-between;
  min-height: 42px;
}

.receive-progress {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.compact-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.74rem;
}

.serial-capture {
  grid-column: 1 / -1;
  display: none;
  gap: 8px;
  padding-top: 8px;
}

.serial-capture.open {
  display: grid;
}

.receive-line-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.receive-variance-note {
  grid-column: 1 / -1;
}

.receive-scan-hit {
  outline: 2px solid color-mix(in srgb, var(--accent) 26%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-subdued));
}

.serial-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 200px;
  align-items: end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.serial-paste {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.serial-paste textarea {
  width: 100%;
}

.serial-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  color: var(--ink);
}

.serial-check input {
  width: auto;
}

#po-receive-form .modal-actions {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

@media (max-width: 520px) {
  nav,
  .metric-grid,
  .report-grid,
  .detail-grid,
  .pnl-strip,
  .image-strip,
  .order-stats,
  .summary-grid,
  .validation-grid,
  .channel-toggle-grid,
  .po-dashboard,
  .vendor-summary {
    grid-template-columns: 1fr;
  }

  .quick-actions,
  .toolbar {
    align-items: stretch;
  }

  .button,
  .file-button,
  input,
  select {
    width: 100%;
    justify-content: center;
  }

  .receive-toolbar,
  .receive-toolbar-actions,
  .receive-tools-grid,
  .receive-summary-strip,
  .receive-attachment-head,
  .receive-footer-actions,
  .audit-grid,
  .receipt-meta-grid,
  .receipt-attachment-grid,
  .receive-line,
  .serial-row,
  .receive-line-actions,
  .receive-line-meta {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.vendor-analytics-card .section-head {
  align-items: center;
}

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

.vendor-metric-panel,
.vendor-chart-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
  min-width: 0;
}

.vendor-category-mapping-card {
  overflow: hidden;
}

.vendor-category-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.vendor-category-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.vendor-category-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.vendor-category-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.vendor-category-mapping-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.vendor-category-map-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
}

.vendor-category-map-tools label {
  display: grid;
  gap: 5px;
  flex: 1 1 520px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.vendor-category-map-tools input {
  width: min(760px, 100%);
  min-height: 42px;
  font-size: 0.95rem;
  text-transform: none;
  font-weight: 500;
}

.vendor-category-map-tools span {
  color: var(--muted);
  white-space: nowrap;
}

.vendor-category-mapping-table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
}

.vendor-category-mapping-table th,
.vendor-category-mapping-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.vendor-category-mapping-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0;
  background: var(--surface-soft);
}

.vendor-category-mapping-table td strong,
.vendor-category-mapping-table td small {
  display: block;
}

.vendor-category-mapping-table td small {
  margin-top: 3px;
  color: var(--muted);
}

.vendor-category-mapping-table input {
  width: 100%;
  min-width: 520px;
  min-height: 40px;
}

.vendor-category-combobox {
  position: relative;
  min-width: 560px;
}

.vendor-category-suggestion-row td {
  padding: 0 12px 14px;
  background: color-mix(in srgb, var(--surface-soft) 70%, var(--surface));
}

.vendor-category-suggestions {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--line) 70%, transparent);
}

.vendor-category-source-tools {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.vendor-category-source-tools span,
.vendor-category-suggestion-group > strong {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.vendor-category-source-tools button {
  width: auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.vendor-category-suggestion-group > strong {
  display: block;
  padding: 10px 12px 6px;
}

.vendor-category-suggestions button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
  cursor: pointer;
}

.vendor-category-suggestions button small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.vendor-category-suggestions button:hover,
.vendor-category-suggestions button:focus {
  background: var(--surface-soft);
  outline: none;
}

.vendor-category-suggestions .vendor-category-source-tools {
  position: static;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 8px;
  padding: 11px 12px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 75%, transparent);
}

.vendor-category-suggestions .vendor-category-source-tools span {
  flex: 0 0 100%;
  margin: 0;
  line-height: 1;
}

.vendor-category-suggestions .vendor-category-source-tools button {
  display: inline-flex;
  width: auto;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.vendor-category-suggestion-group {
  background: var(--surface);
}

.vendor-category-suggestions .vendor-category-source-tools button:hover,
.vendor-category-suggestions .vendor-category-source-tools button:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.vendor-category-suggestion-group.taxonomy {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 42%, var(--surface));
}

.vendor-category-suggestion-group.taxonomy > strong {
  color: var(--text);
}

.vendor-category-no-suggestions {
  padding: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.vendor-category-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 230px;
}

.vendor-category-mapping-table tr.unmapped {
  background: color-mix(in srgb, var(--warning) 7%, transparent);
}

.compact-action {
  min-height: 34px;
  padding-block: 7px;
}

@media (max-width: 820px) {
  .vendor-category-map-tools {
    display: grid;
    align-items: stretch;
  }

  .vendor-category-map-tools span {
    white-space: normal;
  }
}

.vendor-chart-panel.span-2 {
  grid-column: span 2;
}

.vendor-metric-panel h4,
.vendor-chart-panel h4 {
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.vendor-metric-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.vendor-metric-total strong {
  font-size: 1.45rem;
}

.vendor-metric-total span,
.vendor-chart-row small,
.vendor-metric-split-row small {
  color: var(--muted);
}

.vendor-metric-split-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.vendor-chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px 12px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.vendor-chart-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.vendor-chart-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vendor-chart-track {
  grid-column: 1 / 2;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.vendor-chart-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

@media (max-width: 900px) {
  .vendor-analytics-grid,
  .vendor-chart-panel.span-2 {
    display: block;
  }

  .vendor-metric-panel,
  .vendor-chart-panel {
    margin-bottom: 12px;
  }
}

.vendor-profile .full-order-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
  box-shadow: none;
}

.vendor-profile .full-order-grid {
  gap: 14px;
}

.vendor-profile-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 2px;
  background: #ffffff;
}

.vendor-profile-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 12px 0 11px;
  font-size: 0.84rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.vendor-profile-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.vendor-profile-tab-body {
  align-items: start;
}

.vendor-settings-shell {
  display: grid;
  gap: 14px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.vendor-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 0;
}

.vendor-rule-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.vendor-rule-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.vendor-rule-status.saved {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
}

.vendor-rule-status.editing {
  border-color: rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.09);
  color: var(--accent);
}

.vendor-rule-status.dirty {
  border-color: rgba(217, 119, 6, 0.32);
  background: rgba(245, 158, 11, 0.11);
  color: #b45309;
}

.vendor-settings-head h3,
.vendor-setting-card h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.vendor-profile .full-order-head h2 {
  font-size: 1.34rem;
}

.vendor-profile .full-card > h3,
.vendor-profile .section-head h3 {
  font-size: 0.92rem;
}

.vendor-profile .summary-grid small,
.vendor-profile .file-feed-meta small,
.vendor-profile .muted,
.vendor-category-mapping-card p {
  font-size: 0.76rem;
}

.vendor-profile .summary-grid strong {
  font-size: 0.98rem;
}

.vendor-overview-card {
  padding: 14px 16px;
}

.vendor-overview-card.locked {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.compact-section-head {
  align-items: center;
  margin-bottom: 10px;
}

.compact-edit-stack {
  gap: 10px;
}

.compact-edit-stack label {
  gap: 5px;
  font-size: 0.76rem;
}

.compact-edit-stack input,
.compact-edit-stack select,
.compact-edit-stack textarea {
  min-height: 34px;
  font-size: 0.8rem;
}

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

.vendor-locked-field,
.vendor-locked-note {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
  color: #111827;
  padding: 9px 11px;
  min-height: 44px;
  box-shadow: inset 3px 0 0 #64748b;
}

.vendor-locked-field small {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.2;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.vendor-locked-field strong,
.vendor-locked-note strong {
  display: block;
  color: #111827;
  font-size: 0.82rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.vendor-locked-field .muted,
.vendor-locked-note .muted {
  color: #64748b;
}

.vendor-locked-note {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.vendor-address-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vendor-address-grid .span-2 {
  grid-column: span 2;
}

.vendor-settings-head p,
.vendor-setting-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.vendor-settings-subtabs {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.vendor-settings-subtab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 9px 0 10px;
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.vendor-settings-subtab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.vendor-settings-panel {
  padding: 8px 16px 16px;
}

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

.vendor-setting-card {
  display: grid;
  gap: 12px;
  min-height: 134px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  padding: 14px;
}

.vendor-setting-card.span-2 {
  grid-column: span 2;
  min-height: auto;
}

.vendor-setting-card-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.vendor-setting-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
}

.vendor-setting-icon .app-icon {
  width: 18px;
  height: 18px;
}

.vendor-setting-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vendor-setting-fields.compact {
  max-width: 360px;
}

.vendor-setting-fields label,
.vendor-note-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.vendor-setting-fields label.span-2 {
  grid-column: span 2;
}

.vendor-setting-fields input,
.vendor-setting-fields select,
.vendor-note-field input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: #fbfaff;
  color: var(--ink);
  font-size: 0.8rem;
}

.vendor-setting-fields input:disabled,
.vendor-setting-fields select:disabled,
.vendor-note-field input:disabled,
.vendor-setting-switch.is-locked {
  background: #f8fafc;
  color: #475569;
  cursor: not-allowed;
  opacity: 0.78;
}

.vendor-setting-switch.is-locked .vendor-switch-control {
  opacity: 0.72;
}

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

.vendor-setting-switch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 44px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fbfaff;
  cursor: pointer;
}

.vendor-setting-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vendor-switch-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.vendor-switch-copy strong {
  color: var(--ink);
  font-size: 0.8rem;
}

.vendor-switch-copy small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.vendor-switch-control {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.vendor-switch-control::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.16s ease;
}

.vendor-setting-switch input:checked ~ .vendor-switch-control {
  background: var(--accent);
}

.vendor-setting-switch input:checked ~ .vendor-switch-control::after {
  transform: translateX(14px);
}

.vendor-switch-state {
  justify-self: end;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}

.vendor-setting-switch input:checked ~ .vendor-switch-state {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
}

.save-focus-flash {
  animation: save-focus-flash 1.45s ease;
}

body.is-saved .global-save-status {
  border-color: color-mix(in srgb, var(--success) 32%, var(--line));
  background: color-mix(in srgb, var(--success) 10%, var(--panel));
  color: var(--success);
}

@keyframes save-focus-flash {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 42%, transparent);
    border-color: color-mix(in srgb, var(--success) 55%, var(--line));
  }
  55% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 16%, transparent);
    border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  }
  100% {
    box-shadow: none;
  }
}

.vendor-summary-card .summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vendor-summary-card .summary-grid span {
  background: #ffffff;
  min-height: 64px;
  padding: 10px;
}

.vendor-summary-card .summary-grid strong {
  font-size: 0.98rem;
}

.vendor-section-head {
  margin-bottom: 14px;
}

.vendor-section-head p {
  margin: 4px 0 0;
}

.vendor-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.vendor-kpi-strip span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.vendor-kpi-strip small,
.vendor-kpi-strip em {
  color: var(--muted);
  font-style: normal;
}

.vendor-kpi-strip strong {
  font-size: 1.18rem;
}

.vendor-analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.vendor-side-stack {
  display: grid;
  gap: 12px;
}

.vendor-secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.vendor-primary-chart {
  min-height: 100%;
}

.vendor-chart-panel.compact .vendor-chart-row {
  padding: 6px 0;
}

.vendor-chart-panel.compact .vendor-chart-label span {
  max-width: 220px;
}

.vendor-metric-panel,
.vendor-chart-panel {
  background: #ffffff;
}

.vendor-profile-brands {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 220px;
  padding-right: 4px;
}

.vendor-admin-card {
  background: #ffffff;
}

.vendor-admin-card .submission-grid,
.vendor-admin-card .file-section-grid {
  gap: 12px;
}

@media (max-width: 1100px) {
  .vendor-analytics-layout,
  .vendor-secondary-grid,
  .vendor-kpi-strip,
  .vendor-summary-card .summary-grid,
  .vendor-profile-brands,
  .vendor-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vendor-setting-card.span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .vendor-analytics-layout,
  .vendor-secondary-grid,
  .vendor-kpi-strip,
  .vendor-summary-card .summary-grid,
  .vendor-profile-brands,
  .vendor-settings-grid,
  .vendor-setting-fields,
  .vendor-locked-grid,
  .vendor-address-grid {
    grid-template-columns: 1fr;
  }

  .vendor-setting-card.span-2,
  .vendor-setting-fields label.span-2,
  .vendor-address-grid .span-2 {
    grid-column: auto;
  }

  .vendor-profile-tabs,
  .vendor-settings-subtabs {
    gap: 14px;
  }

  .vendor-setting-switch {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .vendor-switch-state {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.product-editor-page {
  display: grid;
  gap: 16px;
}

.product-workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.product-workspace-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.product-workspace-title h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  line-height: 1.25;
}

.product-workspace-title h2 span {
  font-weight: 700;
  color: var(--ink);
}

.product-workspace-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-workspace-chips > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.product-workspace-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 2px;
}

.product-workspace-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px 7px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.product-workspace-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.product-workspace-body {
  display: grid;
  gap: 12px;
}

.product-home-grid {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.product-home-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 12px;
  align-items: start;
}

.product-home-side {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.product-home-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.product-image-panel,
.product-section-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.product-image-panel {
  display: grid;
  gap: 9px;
}

.product-image-panel label,
.product-row-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.product-image-panel input,
.product-image-panel textarea,
.product-row-fields input,
.product-row-fields textarea,
.product-row-fields select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}

.product-editor-page input:disabled,
.product-editor-page textarea:disabled,
.product-editor-page select:disabled {
  border-color: transparent;
  background: color-mix(in srgb, var(--panel-subdued) 62%, #ffffff);
  color: var(--ink);
  opacity: 1;
  cursor: default;
}

.product-home-image {
  min-height: 190px;
}

.product-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-gallery-head div {
  display: grid;
  gap: 2px;
}

.product-gallery-head strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.product-gallery-head span,
.product-image-link,
.image-count-pill {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-image-link {
  text-decoration: none;
}

.product-gallery-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 900;
  padding: 0;
  cursor: pointer;
}

.image-count-pill {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8fafc;
  color: var(--ink);
}

.image-count-pill.has-gallery {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, #ffffff);
  color: var(--accent);
}

.product-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -10px -10px 10px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fbfafc;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
}

.product-section-title strong {
  font-size: 0.88rem;
  letter-spacing: 0;
}

.product-section-blue { border-top: 4px solid #2f80ed; }
.product-section-green { border-top: 4px solid #70ad3f; }
.product-section-orange { border-top: 4px solid #f59e0b; }
.product-section-purple { border-top: 4px solid #d926b5; }
.product-section-teal { border-top: 4px solid #0f766e; }

.product-row-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.product-home-descriptions {
  margin-top: 12px;
}

.product-description-field textarea {
  font-weight: 400;
  line-height: 1.45;
}

.brand-guard-field {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfafc;
}

.brand-guard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-guard-head strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.brand-lock-toggle {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  color: var(--ink) !important;
  font-size: 12px !important;
}

.brand-lock-toggle input {
  width: auto !important;
}

.brand-lock-message {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.brand-lock-chip {
  border-color: rgba(0, 128, 96, 0.3) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
}

.brand-lock-chip.unlocked {
  border-color: rgba(185, 137, 0, 0.28) !important;
  background: rgba(185, 137, 0, 0.12) !important;
  color: var(--warning) !important;
}

.brand-source-note {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.brand-source-note strong {
  color: var(--ink);
  text-align: right;
}

.product-bullets-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.product-bullets-head,
.product-bullet-manager-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-bullets-head div,
.product-bullet-manager-intro {
  min-width: 0;
}

.product-bullets-head strong,
.product-bullet-manager-intro strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
}

.product-bullets-head span,
.product-bullet-manager-intro span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-bullet-preview {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink);
  display: grid;
  gap: 7px;
  line-height: 1.38;
}

.product-bullets-panel .muted {
  margin-top: 10px;
}

.product-bullets-modal-card {
  width: min(840px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.product-bullets-content {
  overflow: auto;
  padding-right: 4px;
}

.product-bullet-manager {
  display: grid;
  gap: 14px;
}

.product-bullet-rows {
  display: grid;
  gap: 10px;
}

.product-bullet-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.product-bullet-row > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.product-bullet-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.dimension-editor,
.dimension-group {
  display: grid;
  gap: 10px;
}

.dimension-group {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 10px;
  padding: 11px;
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--panel-subdued) 56%, #ffffff) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 8px 18px rgba(15, 23, 42, 0.04);
}

.dimension-group::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--dimension-accent, var(--accent));
}

.dimension-group-item {
  --dimension-accent: #0a84ff;
  background: linear-gradient(180deg, #ffffff 0%, rgba(10,132,255,0.055) 100%);
}

.dimension-group-package {
  --dimension-accent: #30d158;
  background: linear-gradient(180deg, #ffffff 0%, rgba(48,209,88,0.06) 100%);
}

.dimension-group-weight {
  --dimension-accent: #ff9f0a;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,159,10,0.065) 100%);
}

.dimension-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dimension-group-title strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 0.84rem;
}

.dimension-group-title span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.dimension-triplet,
.dimension-weight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.dimension-triplet label,
.dimension-weight-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  min-width: 0;
}

.dimension-field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
}

.dimension-field-head strong {
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 820;
  line-height: 1.2;
}

.dimension-source-badge {
  display: inline-flex;
  align-items: center;
  max-width: 62%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 5px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dimension-source-badge.data {
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.dimension-source-badge.manual {
  border-color: rgba(5, 150, 105, 0.22);
  background: rgba(5, 150, 105, 0.09);
  color: #047857;
}

.dimension-source-badge.default {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.dimension-group-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 149, 0, 0.34);
  border-radius: 999px;
  background: rgba(255, 149, 0, 0.13);
  color: #9a5a00;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  cursor: help;
}

.dimension-triplet input,
.dimension-weight-grid input {
  width: 100%;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 9px;
  padding: 8px 9px;
  background: rgba(255,255,255,0.86);
  color: var(--ink);
  font: inherit;
  font-weight: 720;
}

.dimension-weight-grid input[readonly] {
  background: #f3f6f9;
  color: var(--muted);
}

.pricing-summary {
  margin-top: 12px;
}

.product-tab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.product-tab-grid .span-2 {
  grid-column: span 2;
}

.product-home-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.product-editor-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.product-editor-head h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0;
}

.product-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.product-editor-main,
.product-editor-side {
  display: grid;
  gap: 16px;
}

.product-editor-side {
  position: sticky;
  top: 14px;
}

.product-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  min-width: 0;
}

.product-panel h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.98rem;
  text-transform: none;
}

.ebay-listing-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.ebay-listing-summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.ebay-listing-summary small,
.ebay-readiness > strong {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ebay-listing-summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ebay-pricing-rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.ebay-pricing-rule .button {
  flex: 0 0 auto;
}

.ebay-quantity-plan {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.ebay-quantity-plan > span,
.ebay-quantity-note {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.ebay-quantity-plan small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ebay-quantity-plan strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ebay-quantity-note {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.ebay-readiness {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.ebay-readiness.ready {
  border-color: color-mix(in srgb, var(--success) 26%, var(--line));
  background: color-mix(in srgb, var(--success) 8%, var(--panel-solid));
}

.ebay-readiness.missing {
  border-color: color-mix(in srgb, var(--warning) 30%, var(--line));
  background: color-mix(in srgb, var(--warning) 9%, var(--panel-solid));
}

.product-ebay-category-picker {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.ebay-attribute-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.readiness-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 10px;
}

.readiness-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

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

.readiness-missing-list span,
.source-diff-note {
  color: var(--muted);
}

.readiness-missing-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--surface-soft);
  font-size: 0.78rem;
}

.source-changed-row td {
  background: color-mix(in srgb, var(--warning) 7%, transparent);
}

.compact-availability .catalog-table {
  min-width: 520px;
}

.readiness-table {
  margin-bottom: 14px;
}

.product-section-head {
  margin-bottom: 12px;
}

.product-section-head h3 {
  margin: 0;
}

.product-field-stack {
  display: grid;
  gap: 12px;
}

.product-field-stack label,
.product-form-grid label,
.product-price-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.product-field-stack input,
.product-field-stack select,
.product-field-stack textarea,
.product-form-grid input,
.product-form-grid select,
.product-form-grid textarea,
.product-price-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  min-width: 0;
}

.product-field-stack textarea,
.product-form-grid textarea {
  resize: vertical;
}

.compact-fields {
  gap: 10px;
}

.product-form-grid,
.product-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-form-grid.two-col,
.product-price-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mapped-product-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-height: 680px;
  overflow: auto;
  padding-right: 4px;
}

.mapped-product-field {
  display: grid;
  gap: 6px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.mapped-product-field span,
.mapped-product-field small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapped-product-field span {
  color: var(--ink);
}

.mapped-product-field small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.mapped-product-field input,
.mapped-product-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  min-width: 0;
}

.mapped-product-field textarea {
  resize: vertical;
}

.mapped-product-field.readonly {
  background: var(--surface-soft);
}

.mapped-product-field.readonly input,
.mapped-product-field.readonly textarea {
  background: #f8fafc;
  color: var(--muted);
}

.shopify-readiness-panel {
  border-color: color-mix(in srgb, var(--success) 22%, var(--line));
  background: color-mix(in srgb, var(--success) 5%, var(--panel-solid));
}

.shopify-readiness-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.shopify-readiness-summary span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  min-width: 0;
}

.shopify-readiness-summary small,
.shopify-mapping-table small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.shopify-readiness-summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopify-mapping-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: var(--panel-solid);
}

.shopify-mapping-table {
  min-width: 760px;
}

.shopify-mapping-table td:first-child {
  display: grid;
  gap: 3px;
}

.product-media-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 12px;
  margin-bottom: 14px;
}

.product-main-image,
.product-image-thumb,
.product-image-rail span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.product-main-image {
  display: grid;
  place-items: center;
  min-height: 270px;
  overflow: hidden;
}

.product-main-image img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: contain;
}

.product-image-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  align-content: start;
  max-height: 250px;
  overflow: auto;
  padding-right: 2px;
}

.product-image-thumb,
.product-image-rail span {
  width: 100%;
  height: 70px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.product-image-thumb {
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

.product-image-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

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

.product-images-modal-card {
  width: min(1040px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.product-images-content {
  overflow: auto;
  padding-right: 4px;
}

.product-image-manager {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.product-image-manager-preview,
.product-image-manager-list,
.product-source-image-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.product-image-manager-preview {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 0;
}

.product-image-manager-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.product-image-manager-meta strong {
  color: var(--ink);
}

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

.product-image-manager-actions,
.product-source-image-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-image-rows {
  display: grid;
  gap: 10px;
}

.product-image-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.product-image-row-preview {
  width: 78px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.product-image-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-image-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
}

.product-image-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-source-image-note span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.product-side-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.product-side-metrics span,
.product-margin-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfafc;
}

.product-side-metrics small,
.product-margin-box small,
.product-margin-box span {
  display: block;
  color: var(--muted);
}

.product-side-metrics strong,
.product-margin-box strong {
  display: block;
  margin-top: 4px;
  font-size: 1.08rem;
}

.product-margin-box {
  margin-top: 12px;
}

.product-cost-field small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.pricing-field-grid {
  align-items: stretch;
}

.pricing-value-card {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 68px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 10px;
  padding: 9px 10px;
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--panel-subdued) 58%, #ffffff) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

.pricing-value-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
}

.pricing-value-card strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 820;
  line-height: 1.15;
}

.pricing-value-card small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 720;
  line-height: 1.25;
}

.pricing-value-primary {
  border-color: rgba(10,132,255,0.22);
  background: linear-gradient(180deg, #ffffff 0%, rgba(10,132,255,0.07) 100%);
}

.pricing-value-primary strong {
  color: #0b5cad;
}

.pricing-value-muted {
  background: linear-gradient(180deg, #ffffff 0%, rgba(142,142,147,0.08) 100%);
}

.pricing-feedback {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.pricing-feedback div {
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--panel-subdued) 54%, #ffffff) 100%);
  padding: 10px;
}

.pricing-feedback strong,
.pricing-feedback span {
  display: block;
}

.pricing-feedback strong {
  color: var(--ink);
  font-size: 0.82rem;
  margin-bottom: 3px;
}

.pricing-feedback span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.shopify-live-price-feedback {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shopify-price-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.shopify-price-compare article {
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--panel-subdued) 48%, #ffffff) 100%);
  padding: 12px;
  min-width: 0;
}

.shopify-price-compare.has-mismatch article {
  border-color: rgba(255, 149, 0, 0.38);
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 149, 0, 0.08) 100%);
}

.shopify-price-compare span,
.shopify-price-compare strong,
.shopify-price-compare small {
  display: block;
}

.shopify-price-compare span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.shopify-price-compare strong {
  color: var(--ink);
  font-size: 1rem;
  margin-top: 4px;
}

.shopify-price-compare small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 4px;
}

.pricing-feedback .price-warning {
  border-color: rgba(255, 149, 0, 0.34);
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 149, 0, 0.09) 100%);
}

.price-warning-text {
  color: #b45309;
}

.product-advanced-panel details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.product-advanced-panel details:first-child {
  border-top: 0;
  padding-top: 0;
}

.product-advanced-panel summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--ink);
}

.product-advanced-panel details > .product-form-grid,
.product-advanced-panel details > .product-manager-grid {
  margin-top: 12px;
}

.product-shadow-table input,
.product-shadow-table select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: #ffffff;
}

@media (max-width: 1100px) {
  .product-home-grid,
  .product-home-main,
  .product-home-side,
  .product-tab-grid,
  .product-image-manager,
  .product-editor-layout {
    grid-template-columns: 1fr;
  }

  .product-tab-grid .span-2 {
    grid-column: auto;
  }

  .product-editor-side {
    position: static;
  }
}

@media (max-width: 980px) {
  .product-workspace-head,
  .product-workspace-title {
    display: grid;
  }

  .product-row-fields,
  .product-home-summary,
  .product-editor-head,
  .product-media-layout,
  .dimension-triplet,
  .dimension-weight-grid,
  .product-form-grid,
  .product-form-grid.two-col,
  .mapped-product-field-grid,
  .product-price-grid {
    grid-template-columns: 1fr;
  }

  .product-editor-actions {
    justify-content: flex-start;
  }

  .product-image-rail {
    grid-template-columns: repeat(4, 70px);
    overflow: auto;
  }

  .product-image-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .product-bullet-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .product-bullet-row .button {
    grid-column: 2;
    justify-self: start;
  }

  .product-image-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .product-image-thumb,
  .product-image-rail span {
    width: 70px;
    height: 58px;
  }
}
.category-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.category-coverage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  margin-bottom: 16px;
}

.category-coverage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.category-coverage-head h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.category-coverage-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.category-coverage-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfafc;
  padding: 12px;
}

.category-coverage-grid small,
.category-coverage-grid strong,
.category-coverage-grid em {
  display: block;
}

.category-coverage-grid small,
.category-coverage-grid em,
.category-coverage-attention small {
  color: var(--muted);
}

.category-coverage-grid strong {
  margin: 4px 0;
  color: var(--ink);
  font-size: 1.12rem;
}

.category-coverage-grid em {
  font-style: normal;
  font-size: 0.78rem;
}

.category-coverage-grid .needs-work {
  border-color: color-mix(in srgb, var(--warning) 38%, var(--line));
  background: color-mix(in srgb, var(--warning) 7%, #ffffff);
}

.category-coverage-grid .ready {
  border-color: color-mix(in srgb, var(--success) 32%, var(--line));
  background: color-mix(in srgb, var(--success) 6%, #ffffff);
}

.matrixify-readiness {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.matrixify-readiness > div {
  display: grid;
  gap: 2px;
  min-width: 240px;
  margin-right: auto;
}

.matrixify-readiness strong {
  color: var(--ink);
}

.matrixify-readiness small {
  color: var(--muted);
}

.matrixify-readiness span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.matrixify-readiness span.ready {
  border-color: color-mix(in srgb, var(--success) 32%, var(--line));
  background: color-mix(in srgb, var(--success) 8%, #ffffff);
  color: #15803d;
}

.matrixify-readiness span.needs-work {
  border-color: color-mix(in srgb, var(--warning) 38%, var(--line));
  background: color-mix(in srgb, var(--warning) 9%, #ffffff);
  color: #b45309;
}

.category-coverage-attention {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.category-coverage-attention div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.category-coverage-attention strong,
.category-coverage-attention small {
  display: block;
}

.coverage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.coverage-actions a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.category-list-panel,
.category-detail-panel,
.category-settings-card,
.category-map-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.category-list-panel {
  overflow: hidden;
}

.category-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.category-list-head > div:first-child {
  display: grid;
  gap: 3px;
}

.category-scope-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--line);
}

.category-scope-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
  cursor: pointer;
}

.category-scope-tabs button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.category-list-head strong,
.category-row strong,
.category-detail-head h2,
.category-settings-card h3,
.category-map-card h4 {
  color: var(--ink);
}

.category-list-head small,
.category-row small,
.category-row em,
.category-mini-list small {
  color: var(--muted);
}

.category-list-scroll {
  max-height: 72vh;
  overflow: auto;
  padding: 8px;
}

.category-table-shell,
.category-detail-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.category-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.category-table-head > div:first-child {
  display: grid;
  gap: 3px;
}

.category-table-head strong,
.category-name-link strong {
  color: var(--ink);
}

.category-table-head small,
.category-name-link small,
.category-table-foot {
  color: var(--muted);
}

.category-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.category-filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-subdued) 100%);
}

.category-filter-bar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.category-filter-bar select,
.category-filter-bar input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  padding: 7px 9px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.category-filter-bar select:focus,
.category-filter-bar input:focus {
  border-color: rgba(124, 92, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);
  outline: none;
}

.category-filter-count {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.category-lifecycle {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--panel-subdued);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.category-lifecycle.new {
  border-color: rgba(10, 132, 255, 0.34);
  background: rgba(10, 132, 255, 0.12);
  color: #0a66c2;
}

.category-lifecycle.current {
  border-color: rgba(52, 199, 89, 0.34);
  background: rgba(52, 199, 89, 0.12);
  color: color-mix(in srgb, var(--success) 82%, var(--ink));
}

.category-lifecycle.outdated {
  border-color: rgba(255, 149, 0, 0.36);
  background: rgba(255, 149, 0, 0.13);
  color: #b45309;
}

.category-created-by {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(248, 250, 252, 0.92);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.category-created-by.system {
  border-color: rgba(52, 199, 89, 0.28);
  background: rgba(52, 199, 89, 0.1);
  color: color-mix(in srgb, var(--success) 82%, var(--ink));
}

.category-created-by.manual {
  border-color: rgba(122, 92, 255, 0.28);
  background: rgba(122, 92, 255, 0.08);
  color: var(--accent);
}

.category-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.category-row-sku-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.category-view-skus-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.category-view-skus-link:hover {
  color: color-mix(in srgb, var(--accent) 80%, var(--ink));
}

.category-sku-preview {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.76rem;
}

.category-sku-preview.loading,
.category-sku-preview.error {
  padding: 5px 0;
}

.category-sku-preview.error {
  color: var(--danger);
}

.category-sku-chip {
  border: 1px solid rgba(122, 92, 255, 0.28);
  background: rgba(122, 92, 255, 0.08);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.category-sku-chip:hover {
  border-color: rgba(122, 92, 255, 0.5);
  background: rgba(122, 92, 255, 0.14);
}

.category-sku-sample-card {
  border-color: rgba(122, 92, 255, 0.18);
  background: linear-gradient(180deg, rgba(122, 92, 255, 0.06), rgba(255, 255, 255, 0.92));
}

.category-table-wrap {
  overflow: auto;
}

.attribute-review-page {
  display: grid;
  gap: 14px;
}

.attribute-review-page #attribute-channel-filter {
  min-width: 150px;
}

.attribute-review-page #attribute-search {
  min-width: 260px;
}

.attribute-table-wrap {
  max-height: calc(100vh - 300px);
}

.attribute-review-table td {
  vertical-align: top;
}

.attribute-review-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.attribute-groups-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.attribute-groups-page {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  min-height: calc(100vh - 128px);
}

.attribute-groups-page .attribute-groups-panel {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.attribute-groups-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(420px, 1.4fr);
  gap: 12px;
  align-items: start;
}

.attribute-groups-head > div:first-child,
.attribute-group-row > div:first-child {
  display: grid;
  gap: 4px;
}

.attribute-groups-head strong,
.attribute-group-row strong {
  color: var(--ink);
}

.attribute-groups-head small,
.attribute-group-row small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.attribute-group-add {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(180px, 1fr) auto;
  gap: 8px;
}

.attribute-groups-list {
  display: grid;
  gap: 8px;
  min-height: min(560px, calc(100vh - 430px));
  max-height: none;
  overflow: auto;
}

.attribute-group-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(140px, 0.65fr) minmax(240px, 1.35fr) minmax(86px, auto);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
  padding: 10px;
}

.attribute-group-row.editing {
  border-color: rgba(0, 118, 255, 0.35);
  background: #ffffff;
}

.attribute-group-row input[readonly] {
  cursor: default;
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  box-shadow: none;
}

.attribute-group-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.attribute-map-modal {
  width: min(760px, calc(100vw - 32px));
}

.attribute-map-editor {
  display: grid;
  gap: 14px;
}

.attribute-map-editor label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.attribute-map-editor label.inline-check {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
  padding: 10px 12px;
}

.attribute-source-groups {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
}

.related-attribute-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
  padding: 12px;
}

.related-attribute-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.related-attribute-panel strong {
  color: var(--ink);
}

.related-attribute-panel small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.related-attribute-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.related-attribute-list label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px 10px;
}

.related-attribute-list input[type="checkbox"],
.attribute-map-editor .inline-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 16px;
}

.related-attribute-list span {
  display: grid;
  gap: 3px;
}

.attribute-destination-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.attribute-destination-card span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
  padding: 10px 12px;
}

.attribute-destination-card .span-2 {
  grid-column: 1 / -1;
}

.attribute-destination-card small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.attribute-destination-card strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.35;
}

.category-table {
  min-width: 1120px;
}

.category-table td {
  vertical-align: middle;
}

.category-table th:first-child,
.category-table td:first-child {
  width: 34%;
}

.table-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.category-name-link {
  display: grid;
  gap: 4px;
  max-width: 520px;
}

.category-name-link small {
  font-weight: 700;
}

.category-channel-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  max-width: 300px;
}

.category-channel-pills span,
.category-channel-pills a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-decoration: none;
}

.category-channel-pills span.mapped,
.category-channel-pills a.mapped {
  border-color: #b7dfc7;
  background: #ecfdf3;
  color: #16a34a;
}

.category-channel-pills .shopify.mapped {
  border-color: rgba(124, 92, 255, 0.36);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.16), rgba(0, 164, 124, 0.11));
  color: #6d28d9;
}

.category-channel-pills .shopify.needs-review,
.category-channel-pills .mapped.needs-review {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.96), rgba(245, 158, 11, 0.12));
  color: #92400e;
}

.category-channel-pills a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.category-missing-count {
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.category-missing-count.ready {
  color: #16a34a;
}

.category-missing-count.needs-work {
  color: #b45309;
}

.category-table-foot {
  margin: 12px 14px 14px;
}

.category-detail-page {
  padding: 18px;
}

.category-back-link {
  margin-bottom: 10px;
}

.category-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.category-row:hover,
.category-row.active {
  border-color: var(--line);
  background: #f8fafc;
}

.category-row span,
.category-mini-list span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.category-row em {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.category-detail-panel {
  padding: 18px;
}

.category-detail-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.category-detail-head h2 {
  margin: 4px 0 6px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.category-detail-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.category-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.category-metrics span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfafc;
}

.category-metrics small,
.category-metrics strong {
  display: block;
}

.category-metrics small {
  color: var(--muted);
  font-weight: 800;
}

.category-metrics strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.08rem;
}

.category-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.category-attributes-card {
  margin-bottom: 16px;
}

.category-attribute-marketplaces {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.category-attribute-marketplace {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfafc;
}

.category-attribute-marketplace h4 {
  margin: 0 0 4px;
  color: var(--ink);
}

.channel-attribute-mapper {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}

.attribute-mapper-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.attribute-mapper-head h5 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.9rem;
}

.attribute-mapper-head span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.attribute-map-table {
  display: grid;
  gap: 6px;
}

.attribute-map-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(140px, 0.8fr) 86px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.attribute-map-row.header {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  padding: 0 8px;
}

.attribute-map-row.required {
  border-color: #b7dfc7;
  background: #fbfffc;
}

.attribute-map-row strong,
.attribute-map-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attribute-map-row small {
  color: var(--muted);
  margin-top: 2px;
}

.attribute-map-row select,
.attribute-map-row input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 9px;
  font: inherit;
}

.attribute-use-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
}

.category-settings-card,
.category-map-card {
  padding: 14px;
}

.category-settings-card h3,
.category-map-card h4 {
  margin: 0 0 12px;
  font-size: 0.98rem;
}

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

.category-map-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.category-map-grid input,
.category-map-grid select,
.category-map-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  min-width: 0;
}

.category-map-grid textarea {
  resize: vertical;
}

.category-map-grid .span-2 {
  grid-column: 1 / -1;
}

.category-mini-list {
  display: grid;
  gap: 9px;
  max-height: 260px;
  overflow: auto;
}

.category-mini-list span {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.category-mini-list span:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

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

.category-channel-workspace {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.category-channel-tabs,
.category-subtabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 5px;
}

.category-channel-tabs button,
.category-subtabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  padding: 8px 11px;
}

.category-channel-tabs button {
  display: grid;
  gap: 2px;
  min-width: 116px;
  text-align: left;
}

.category-channel-tabs button small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.category-channel-tabs button.active,
.category-subtabs button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.category-channel-tabs button.mapped.active {
  border-left: 3px solid var(--success);
}

.category-channel-tabs button.missing.active {
  border-left: 3px solid var(--warning);
}

.category-channel-panel,
.category-tab-panel {
  display: grid;
  gap: 12px;
}

.category-channel-panel > .category-map-card {
  margin: 0;
}

.category-map-card .section-head {
  margin-bottom: 10px;
}

.category-map-card.missing {
  border-color: #f4d28f;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.02)), var(--panel);
  box-shadow: inset 4px 0 0 #f59e0b;
}

.category-map-card.mapped {
  border-color: #b7dfc7;
  background: linear-gradient(0deg, rgba(34, 197, 94, 0.06), rgba(34, 197, 94, 0.06)), var(--panel);
  box-shadow: inset 4px 0 0 #22c55e;
}

.category-map-card.shopify-taxonomy-card.mapped {
  border-color: rgba(124, 92, 255, 0.34);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.10), rgba(0, 164, 124, 0.06)), var(--panel);
  box-shadow: inset 4px 0 0 #7c5cff;
}

.smart-collection-profile {
  margin-top: 14px;
  border: 1px solid #c7d7ee;
  border-radius: 8px;
  background: #f7fbff;
  padding: 12px;
}

.shopify-mapped-attributes {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  border: 1px solid #d6e0ed;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.shopify-mapped-attributes.has-attributes {
  border-color: #b7dfc7;
  background: #f7fff9;
}

.shopify-mapped-attributes .section-head {
  margin-bottom: 0;
}

.attribute-taxonomy-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.attribute-taxonomy-context span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
}

.attribute-taxonomy-context small {
  color: var(--muted);
}

.attribute-taxonomy-context strong {
  color: var(--ink);
  line-height: 1.35;
}

.attribute-count-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attribute-count-strip span {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.smart-collection-profile .section-head {
  margin-bottom: 12px;
}

.category-map-grid .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.category-map-grid .checkbox-row input {
  width: auto;
}

.channel-map-badge {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 92px;
  border: 1px solid #f4d28f;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff7ed;
  color: #b45309;
  text-align: right;
  text-decoration: none;
}

.channel-map-badge.mapped {
  border-color: #b7dfc7;
  background: #ecfdf3;
  color: #16a34a;
}

.channel-map-badge.shopify.mapped {
  border-color: rgba(124, 92, 255, 0.38);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.16), rgba(0, 164, 124, 0.10));
  color: #6d28d9;
}

.channel-map-badge.needs-review {
  border-color: rgba(245, 158, 11, 0.44);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(245, 158, 11, 0.12));
  color: #92400e;
}

.channel-map-badge[href]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

.shopify-link-button {
  border-color: rgba(124, 92, 255, 0.42);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.18), rgba(0, 164, 124, 0.12));
  color: #6d28d9;
}

.channel-map-badge strong {
  font-size: 0.78rem;
  line-height: 1;
}

.channel-map-badge small {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  opacity: 0.8;
  font-size: 0.68rem;
}

.category-map-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .category-workspace,
  .category-detail-grid,
  .category-mapping-grid {
    grid-template-columns: 1fr;
  }

  .category-coverage-grid,
  .category-coverage-attention {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-list-scroll {
    max-height: 360px;
  }
}

@media (max-width: 760px) {
  .category-detail-head,
  .category-list-head,
  .category-table-head {
    display: grid;
  }

  .category-detail-actions {
    justify-content: start;
  }

  .category-table-actions {
    justify-content: start;
  }

  .category-coverage-grid,
  .category-coverage-attention,
  .category-attribute-marketplaces,
  .attribute-taxonomy-context,
  .category-metrics,
  .category-map-grid,
  .attribute-map-row {
    grid-template-columns: 1fr;
  }

  .attribute-map-row.header {
    display: none;
  }

  .shopify-taxonomy-search.search-with-button {
    grid-template-columns: 1fr;
  }
}

.shopify-taxonomy-card {
  grid-column: 1 / -1;
}

.shopify-taxonomy-card .section-head {
  align-items: flex-start;
}

.shopify-selected-category {
  display: grid;
  gap: 8px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  padding: 12px;
  background: #eef4fb;
  margin-bottom: 12px;
}

.shopify-selected-category span {
  display: grid;
  gap: 3px;
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.shopify-selected-category span strong,
.shopify-selected-category code {
  color: var(--ink);
}

.shopify-selected-category span strong {
  line-height: 1.35;
}

.shopify-selected-category small,
.shopify-taxonomy-search,
.shopify-taxonomy-result small,
.shopify-attribute-list small {
  color: var(--muted);
}

.shopify-selected-category code {
  white-space: normal;
  font-size: 0.78rem;
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f7fafc;
}

.shopify-taxonomy-search {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.shopify-taxonomy-search.search-with-button {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 8px;
}

.shopify-taxonomy-search.search-with-button label {
  display: grid;
  gap: 6px;
}

.shopify-taxonomy-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.shopify-taxonomy-results {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 320px;
  overflow: auto;
}

.shopify-taxonomy-result {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.shopify-taxonomy-result:hover {
  background: #f8fafc;
  border-color: #9ec5fe;
}

.shopify-taxonomy-result span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.shopify-taxonomy-result em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.shopify-manual-fields {
  margin-top: 12px;
}

.shopify-required-attributes {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.shopify-required-attributes h5 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.9rem;
}

.shopify-attribute-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shopify-attribute-list span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfafc;
  min-width: 0;
}

.shopify-attribute-list strong,
.shopify-taxonomy-result strong {
  color: var(--ink);
}

.ebay-attribute-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ebay-attribute-editor label {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfafc;
  min-width: 0;
}

.ebay-attribute-editor label.required {
  border-color: #b7dfc7;
  background: #f6fff9;
}

.ebay-attribute-editor label.locked {
  border-color: #cfe3ff;
  background: #f4f8ff;
}

.ebay-attribute-editor label.missing {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  background: color-mix(in srgb, var(--danger) 7%, #fbfafc);
}

.ebay-attribute-editor span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ebay-attribute-editor strong {
  color: var(--ink);
}

.ebay-attribute-editor small {
  color: var(--muted);
}

.ebay-attribute-editor input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.ebay-attribute-editor input[readonly] {
  background: #eef5ff;
  color: var(--ink);
  cursor: default;
}

.empty-state.compact {
  padding: 12px;
  min-height: 0;
}

.knowledge-page {
  display: grid;
  gap: 16px;
}

.knowledge-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.knowledge-hero h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.25rem;
}

.knowledge-changelog,
.knowledge-workflow-list {
  display: grid;
  gap: 12px;
}

.knowledge-release,
.knowledge-workflow {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.knowledge-release-date {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
}

.knowledge-release h3,
.knowledge-guide h3,
.knowledge-workflow h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.knowledge-release ul,
.knowledge-guide ol {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.knowledge-release li,
.knowledge-guide li {
  margin: 8px 0;
  line-height: 1.45;
}

.knowledge-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.knowledge-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.knowledge-feature {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.knowledge-feature h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.knowledge-feature ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.knowledge-feature li {
  margin: 7px 0;
  line-height: 1.42;
}

.knowledge-guide {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.knowledge-guide-head {
  display: grid;
  gap: 6px;
}

.knowledge-guide-head span {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
}

.knowledge-workflow {
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  align-items: center;
}

.knowledge-workflow p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.knowledge-link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.knowledge-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(480px, 100%);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 0 10px;
}

.search-box input {
  width: 100%;
  min-height: 34px;
  border: 0;
  background: transparent;
  outline: 0;
}

.knowledge-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.knowledge-sidebar,
.knowledge-article-view,
.knowledge-editor-shell,
.knowledge-settings-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.knowledge-sidebar {
  position: sticky;
  top: 88px;
  overflow: hidden;
}

.knowledge-sidebar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.knowledge-sidebar-head small,
.knowledge-article-row span,
.knowledge-article-row small,
.knowledge-article-meta small {
  color: var(--muted);
}

.knowledge-article-list {
  display: grid;
  max-height: calc(100vh - 255px);
  overflow: auto;
}

.knowledge-article-row {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.knowledge-article-row:hover,
.knowledge-article-row.active {
  background: var(--panel-hover);
}

.knowledge-article-row strong {
  font-size: 0.94rem;
}

.knowledge-article-row span {
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.knowledge-article-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-article-view {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.knowledge-article-head,
.knowledge-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.knowledge-article-head h2,
.knowledge-editor-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.45rem;
}

.knowledge-article-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.knowledge-article-actions,
.knowledge-editor-actions,
.knowledge-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.knowledge-article-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-subdued);
  color: var(--accent);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.knowledge-article-body {
  display: grid;
  gap: 14px;
  color: var(--ink);
  line-height: 1.6;
}

.knowledge-article-body h2,
.knowledge-article-body h3,
.knowledge-article-body h4 {
  margin: 10px 0 0;
  color: var(--ink);
}

.knowledge-article-body p,
.knowledge-article-body ul,
.knowledge-article-body ol {
  margin: 0;
}

.knowledge-checklist {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.knowledge-checklist li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.knowledge-media,
.knowledge-embed {
  display: grid;
  gap: 8px;
  margin: 0;
}

.knowledge-media img,
.knowledge-embed iframe {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
}

.knowledge-media img {
  max-height: 520px;
  object-fit: contain;
}

.knowledge-embed iframe {
  aspect-ratio: 16 / 9;
}

.knowledge-editor-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.knowledge-settings-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.knowledge-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.knowledge-settings-grid section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.knowledge-settings-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

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

.knowledge-setting-row,
.knowledge-setting-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

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

.knowledge-editor-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.knowledge-editor-fields .span-2 {
  grid-column: 1 / -1;
}

.knowledge-editor {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 16px 48px;
}

.knowledge-editor .codex-editor__redactor {
  padding-bottom: 40px !important;
}

.knowledge-editor .ce-block__content,
.knowledge-editor .ce-toolbar__content {
  max-width: 820px;
}

.knowledge-editor-fallback {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 900px) {
  .knowledge-hero,
  .knowledge-hero-actions,
  .knowledge-article-head,
  .knowledge-editor-head {
    display: grid;
  }

  .knowledge-workspace,
  .knowledge-editor-fields,
  .knowledge-settings-grid,
  .knowledge-setting-row,
  .knowledge-setting-add {
    grid-template-columns: 1fr;
  }

  .knowledge-sidebar {
    position: static;
  }

  .knowledge-article-list {
    max-height: 360px;
  }

  .knowledge-editor {
    padding: 12px;
  }

  .ebay-listing-summary,
  .ebay-quantity-plan {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ebay-quantity-note {
    grid-template-columns: 1fr;
  }

  .shopify-attribute-list {
    grid-template-columns: 1fr;
  }

  .ebay-attribute-editor {
    grid-template-columns: 1fr;
  }
}

.google-category-chip {
  display: grid;
  gap: 3px;
  border: 1px solid #b9d2f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eaf3ff;
}

.shopify-product-type-chip {
  display: grid;
  gap: 3px;
  border: 1px solid #c4d4e8;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff8df;
}

.shopify-product-type-chip strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.google-category-chip strong {
  color: var(--ink);
}

.google-category-chip small {
  color: var(--muted);
}

.mapping-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.mapping-list-panel,
.mapping-detail-panel,
.mapping-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mapping-list-panel {
  overflow: hidden;
}

.mapping-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.mapping-list-head div,
.mapping-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mapping-list-head small,
.mapping-row small,
.mapping-row em {
  color: var(--muted);
}

.mapping-list-scroll {
  max-height: 72vh;
  overflow: auto;
  padding: 8px;
}

.mapping-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.mapping-row:hover,
.mapping-row.active {
  border-color: var(--line);
  background: #f8fafc;
}

.mapping-row em {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.mapping-detail-panel {
  padding: 18px;
}

.mapping-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.mapping-detail-head h2 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 1.35rem;
}

.mapping-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mapping-save-state {
  min-width: 128px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-subdued);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.mapping-save-state.dirty {
  border-color: rgba(185, 137, 0, 0.35);
  background: rgba(185, 137, 0, 0.12);
  color: var(--warning);
}

.mapping-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mapping-summary-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfafc;
}

.mapping-summary-grid small,
.mapping-summary-grid strong {
  display: block;
}

.mapping-summary-grid small {
  color: var(--muted);
  font-weight: 800;
}

.mapping-summary-grid strong {
  margin-top: 4px;
  color: var(--ink);
}

.catalog-review-page {
  display: grid;
  gap: 14px;
}

.review-field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-field-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.review-table td {
  vertical-align: top;
}

.review-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.review-history {
  display: grid;
  gap: 10px;
}

.mapping-details-drawer {
  margin-bottom: 14px;
}

.mapping-details-drawer > summary,
.mapping-raw-editor > summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.mapping-details-drawer > .mapping-editor-grid {
  margin-top: 12px;
}

.mapping-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.mapping-card {
  padding: 14px;
}

.mapping-card h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.98rem;
}

.field-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.field-chip {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfafc;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.field-chip small {
  color: var(--muted);
}

.mapping-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--ink);
  font: 0.9rem/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  resize: vertical;
}

.mapping-preview-table {
  margin-top: 14px;
  max-height: 360px;
  overflow: auto;
}

.mapping-table-layout {
  display: grid;
  gap: 12px;
}

.mapping-table-layout .mapping-preview-table {
  margin-top: 0;
}

.mapping-directory,
.mapping-page {
  display: grid;
  gap: 12px;
}

.mapping-directory-head,
.mapping-page-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
}

.mapping-directory-head h2,
.mapping-page-head h2 {
  margin: 2px 0 3px;
  color: var(--ink);
  font-size: 1.28rem;
}

.mapping-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.mapping-template-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.mapping-template-card-head,
.mapping-template-actions,
.mapping-card-flags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mapping-template-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.25;
}

.mapping-template-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.mapping-card-flags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  background: #fbfafc;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.72rem;
}

.mapping-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: 10px;
}

.mapping-row-editor {
  display: grid;
  gap: 6px;
}

.mapping-row-editor-head,
.mapping-row-edit {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(210px, 1.1fr) minmax(140px, 0.75fr) 90px 74px;
  gap: 8px;
  align-items: center;
}

.mapping-row-editor-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mapping-row-edit {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfafc;
}

.mapping-row-edit input,
.mapping-row-edit select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 32px;
  padding: 6px 8px;
  background: #ffffff;
  color: var(--ink);
}

.mapping-row-edit .checkbox-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.mapping-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.mapping-actions .button,
.mapping-actions .file-button,
.mapping-template-actions .button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.mapping-save-state {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  white-space: nowrap;
}

.mapping-summary-grid {
  gap: 8px;
}

.mapping-summary-grid span {
  padding: 9px 10px;
}

.mapping-summary-grid small {
  font-size: 0.7rem;
}

.mapping-summary-grid strong {
  font-size: 0.92rem;
}

.product-import-modal-card {
  width: min(900px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.product-import-content {
  overflow: auto;
  padding: 14px 0;
}

.product-import-steps,
.product-import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.product-import-step,
.product-import-summary span,
.product-import-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfafc;
}

.product-import-step {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.product-import-step span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf2f7;
  color: var(--ink);
  font-weight: 900;
}

.product-import-step.active {
  border-color: #9ec5fe;
  background: #f4f8ff;
}

.product-import-step strong,
.product-import-picker strong,
.product-import-summary strong {
  color: var(--ink);
}

.product-import-step small,
.product-import-picker small,
.product-import-summary small {
  color: var(--muted);
}

.product-import-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.product-import-picker div,
.product-import-summary span {
  display: grid;
  gap: 4px;
}

.import-picker-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.template-column-guide {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 4%, var(--panel-solid));
  padding: 12px;
  margin-bottom: 14px;
}

.template-column-guide > div:first-child {
  display: grid;
  gap: 3px;
}

.template-column-guide small,
.template-column-grid small {
  color: var(--muted);
}

.template-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.template-column-grid span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 9px 10px;
}

.template-column-grid span.required {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
}

.product-import-preview {
  max-height: 340px;
}

.inline-id-link,
.field-inline-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.inline-id-link:hover,
.field-inline-link:hover {
  text-decoration: underline;
}

.shopify-sku-link {
  color: #7c3aed;
  font-weight: 820;
  text-decoration: none;
}

.shopify-sku-link:hover {
  color: #6d28d9;
  text-decoration: underline;
}

.field-inline-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  font-size: 0.78rem;
}

.source-import-progress {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  margin-bottom: 14px;
}

.source-import-progress-bar {
  height: 9px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 10px;
}

.source-import-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.25s ease;
}

.source-import-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.source-import-progress-meta strong {
  color: var(--ink);
}

.source-import-progress-meta small {
  color: var(--muted);
}

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

.source-import-sku-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}

.source-import-sku-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #fbfafc;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.source-import-sku-list.missing span {
  border-color: #f4d28f;
  background: #fff8eb;
}

.catalog-selection-toolbar,
.product-export-bar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(240px, 340px) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #ffffff;
}

.product-export-bar {
  grid-template-columns: minmax(220px, 0.7fr) minmax(420px, auto) minmax(340px, 0.85fr);
  gap: 16px;
  padding: 16px;
  border-color: rgba(15, 23, 42, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.94)),
    #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.selection-summary,
.product-export-bar .selection-summary {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 64px;
  padding: 4px 0;
}

.catalog-selection-toolbar strong,
.product-export-bar strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.catalog-selection-toolbar small,
.product-export-bar small {
  color: var(--muted);
}

.selection-kicker {
  width: fit-content;
  border: 1px solid rgba(26, 115, 232, 0.16);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(26, 115, 232, 0.08);
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.selection-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-actions .button {
  min-height: 36px;
  padding: 8px 10px;
  white-space: nowrap;
}

.product-selection-actions {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.product-export-bar .selection-actions {
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
  padding: 5px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.product-export-bar .selection-actions .button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-weight: 900;
}

.product-export-bar .selection-actions .button:hover {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.alternate-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.alternate-actions .compact-button {
  min-height: 32px;
  padding: 6px 11px;
}

.auto-alternates-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.auto-alternates-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--blue);
}

.product-export-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.export-control-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 1320px) {
  .product-export-bar {
    grid-template-columns: 1fr;
  }

  .product-selection-actions {
    justify-items: flex-start;
  }

  .alternate-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .product-export-controls {
    max-width: 460px;
  }
}

.product-export-controls .button {
  min-height: 40px;
  border-radius: 8px;
  white-space: nowrap;
}

.catalog-selection-toolbar select,
.product-export-bar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
}

.product-export-modal-card {
  width: min(1120px, calc(100vw - 34px));
}

.product-export-modal-layout,
.source-export-modal-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
}

.export-choice-panel,
.export-columns-panel,
.source-export-scope-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
}

.export-choice-panel,
.source-export-scope-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.export-choice-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.export-choice-panel input,
.export-choice-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.source-export-modal-card {
  width: min(760px, calc(100vw - 34px));
}

.source-export-scope-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.source-export-scope-options {
  display: grid;
  gap: 8px;
}

.source-export-scope-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-soft);
  cursor: pointer;
}

.source-export-scope-options label.selected {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 46%, var(--panel));
}

.source-export-scope-options label:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

.source-export-scope-options span {
  display: grid;
  gap: 2px;
}

.source-export-scope-options strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.source-export-scope-options small {
  color: var(--muted);
  font-size: 0.72rem;
}

.export-scope-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.export-scope-strip span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-soft);
}

.export-scope-strip small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.segmented-control.export-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface-soft);
}

.export-mode-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 7px 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.export-mode-toggle button.active {
  background: var(--accent);
  color: #ffffff;
}

.export-columns-panel.is-muted {
  opacity: 0.72;
}

.export-column-search {
  display: grid;
  gap: 5px;
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.export-column-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.export-column-groups {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.export-column-groups details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.export-column-groups summary {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.export-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 0 8px 8px;
}

.export-column-grid label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
}

.export-column-grid label.selected {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, #ffffff);
}

.export-column-grid span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.export-column-grid strong {
  color: var(--ink);
  font-size: 0.8rem;
}

.export-column-grid small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.export-format-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.export-format-options label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  cursor: pointer;
}

.export-format-options label.selected {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, #ffffff);
}

.export-format-options span,
.export-preview-list span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.export-format-options strong,
.export-preview-list strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.export-format-options small,
.export-preview-list small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.export-format-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.export-format-select {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.export-format-select select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.export-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.export-preview-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
}

.export-preview-list em {
  align-self: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.supplier-multi-filter {
  position: relative;
  min-width: 280px;
  max-width: 460px;
}

.supplier-chip-control {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.supplier-chip-control.open {
  border-color: #2684ff;
  box-shadow: 0 0 0 3px rgba(38, 132, 255, 0.14);
}

.supplier-chip-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.supplier-placeholder {
  color: var(--muted);
  padding: 4px 2px;
}

.supplier-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  max-width: 180px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 8px;
  background: #fbfafc;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.supplier-chip.more {
  color: var(--muted);
}

.supplier-chip em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.supplier-caret {
  color: var(--muted);
  font-size: 0.72rem;
}

.supplier-dropdown {
  position: absolute;
  z-index: 24;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.supplier-dropdown.show {
  display: block;
}

.supplier-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.supplier-search-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--ink);
}

.supplier-option-list {
  display: grid;
  gap: 2px;
  max-height: 250px;
  overflow: auto;
}

.supplier-option-list label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 7px;
  color: var(--ink);
  cursor: pointer;
}

.supplier-option-list label:hover,
.supplier-option-list label.selected {
  background: #f8fafc;
}

.supplier-option-list input {
  width: 16px;
  height: 16px;
}
@media (max-width: 1180px) {
  .mapping-workspace,
  .mapping-editor-grid,
  .mapping-page-grid {
    grid-template-columns: 1fr;
  }

  .mapping-row-editor-head {
    display: none;
  }

  .mapping-row-edit {
    grid-template-columns: 1fr;
  }

  .mapping-list-scroll {
    max-height: 360px;
  }
}

@media (max-width: 980px) {
  .mapping-detail-head {
    display: grid;
  }

  .mapping-directory-head,
  .mapping-page-head {
    display: grid;
  }

  .mapping-actions {
    justify-content: flex-start;
  }

  .mapping-summary-grid,
  .product-import-steps,
  .product-import-summary {
    grid-template-columns: 1fr;
  }

  .product-import-picker {
    display: grid;
  }

  .source-import-preview-grid,
  .catalog-selection-toolbar,
  .product-export-bar {
    grid-template-columns: 1fr;
  }

  .selection-actions {
    justify-content: flex-start;
  }

  .product-export-bar .selection-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

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

/* iOS-inspired visual refresh */
:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: rgba(60, 60, 67, 0.68);
  --line: rgba(60, 60, 67, 0.16);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --panel-subdued: rgba(242, 242, 247, 0.86);
  --panel-hover: rgba(229, 229, 234, 0.72);
  --sidebar: rgba(255, 255, 255, 0.76);
  --input-bg: rgba(255, 255, 255, 0.82);
  --nav-active: rgba(0, 122, 255, 0.12);
  --accent: #007aff;
  --accent-strong: #005ecb;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --success: #34c759;
  --warning: #ff9500;
  --danger: #ff3b30;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 14px 36px rgba(60, 60, 67, 0.12);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 22px rgba(60, 60, 67, 0.09);
  --glass-border: rgba(255, 255, 255, 0.62);
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --ink: #f5f5f7;
  --muted: rgba(235, 235, 245, 0.64);
  --line: rgba(235, 235, 245, 0.14);
  --panel: rgba(28, 28, 30, 0.78);
  --panel-solid: #1c1c1e;
  --panel-subdued: rgba(44, 44, 46, 0.78);
  --panel-hover: rgba(58, 58, 60, 0.74);
  --sidebar: rgba(28, 28, 30, 0.76);
  --input-bg: rgba(44, 44, 46, 0.74);
  --nav-active: rgba(10, 132, 255, 0.18);
  --accent: #0a84ff;
  --accent-strong: #5eb0ff;
  --accent-soft: rgba(10, 132, 255, 0.2);
  --success: #30d158;
  --warning: #ffd60a;
  --danger: #ff453a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 18px 42px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.22), 0 10px 26px rgba(0, 0, 0, 0.26);
  --glass-border: rgba(255, 255, 255, 0.08);
}

body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--accent);
}

.sidebar,
.topbar,
.metric,
.stat-card,
.panel,
.table-wrap,
.catalog-table-wrap,
.vendor-table-wrap,
.brand-table-wrap,
.full-card,
.modal-card,
.action-popover,
.product-workspace-head,
.product-section-card,
.product-panel,
.product-image-panel,
.brand-guard-field,
.product-bullets-panel,
.dimension-group,
.mapping-directory-head,
.mapping-page-head,
.mapping-template-card,
.mapping-side-card,
.mapping-detail-card,
.catalog-selection-toolbar,
.product-export-bar,
.supplier-chip-control,
.supplier-dropdown,
.product-import-step,
.product-import-picker,
.source-import-card,
.mapping-summary-grid span,
.catalog-source-summary,
.review-history {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}

.sidebar {
  width: 276px;
  padding: 18px 12px 22px;
  border-right: 1px solid var(--line);
}

.shell {
  margin-left: 276px;
  background: transparent;
  padding: 0 30px 34px;
}

.topbar {
  margin: 0 -30px 22px;
  padding: 14px 30px;
  border-bottom: 1px solid var(--line);
}

.brand {
  padding: 6px 8px 14px;
}

.brand strong,
.topbar h1,
.product-workspace-title h2,
.mapping-page-head h2,
.mapping-directory-head h2 {
  font-weight: 760;
}

.brand-mark {
  background: var(--ink);
  color: var(--bg);
  box-shadow: inset 0 0 0 1px var(--glass-border), var(--shadow-soft);
}

.nav-item,
.nav-child {
  min-height: 38px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 680;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item:hover,
.nav-item.active,
.nav-child:hover,
.nav-child.active {
  background: var(--nav-active);
  color: var(--accent);
}

.nav-item:active,
.nav-child:active,
.button:active,
.file-button:active,
.subnav-item:active,
.product-workspace-tab:active {
  transform: scale(0.985);
}

.nav-child {
  border-left: 0;
  margin-left: 8px;
}

.menu-expand {
  border-radius: 999px;
  background: var(--panel-subdued);
  color: var(--accent);
}

.button,
.file-button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 15px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.18);
  font-weight: 760;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.button:hover,
.file-button:hover {
  background: var(--accent-strong);
  box-shadow: 0 10px 24px rgba(0, 122, 255, 0.24);
}

.secondary,
.button.secondary,
.file-button.secondary {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-solid) 82%, transparent);
  color: var(--ink);
  box-shadow: inset 0 1px 0 var(--glass-border), var(--shadow-soft);
}

.secondary:hover,
.button.secondary:hover,
.file-button.secondary:hover {
  background: var(--panel-hover);
  color: var(--ink);
}

.button.danger {
  background: color-mix(in srgb, var(--danger) 12%, var(--panel-solid));
  color: var(--danger);
}

.text-button,
.order-link {
  color: var(--accent);
}

input,
select,
textarea,
.brand-table select,
.brand-table input,
.edit-stack input,
.edit-stack select,
.full-card textarea,
.modal-grid input,
.modal-grid textarea,
.modal-grid select,
.catalog-selection-toolbar select,
.product-export-bar select,
.supplier-search-row input {
  border-radius: 8px;
  border-color: var(--line);
  background: var(--input-bg);
  color: var(--ink);
  box-shadow: inset 0 1px 0 var(--glass-border);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), inset 0 1px 0 var(--glass-border);
}

button:focus-visible,
a:focus-visible,
.button:focus-visible,
.file-button:focus-visible,
.text-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent), var(--shadow-soft);
}

.subnav,
.product-workspace-tabs {
  width: fit-content;
  max-width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 4px;
  background: rgba(118, 118, 128, 0.14);
  box-shadow: inset 0 1px 2px rgba(60, 60, 67, 0.08);
}

.subnav-item,
.product-workspace-tab {
  min-height: 34px;
  border: 0;
  border-bottom: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.subnav-item.active,
.product-workspace-tab.active {
  background: var(--panel-solid);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(60, 60, 67, 0.12), 0 5px 15px rgba(60, 60, 67, 0.08);
}

.subnav-item:hover,
.product-workspace-tab:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--panel-solid) 56%, transparent);
}

.toolbar,
.orders-command,
.catalog-filters {
  border-radius: 8px;
}

.catalog-filters {
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.metric,
.stat-card,
.panel,
.table-wrap,
.catalog-table-wrap,
.vendor-table-wrap,
.brand-table-wrap,
.modal-card,
.product-workspace-head,
.product-section-card,
.product-panel,
.full-card,
.mapping-directory-head,
.mapping-page-head {
  border-radius: 8px;
}

.metric,
.stat-card {
  padding: 16px;
}

.metric strong,
.stat-card strong,
.mapping-summary-grid strong {
  font-weight: 780;
}

th {
  background: color-mix(in srgb, var(--panel-subdued) 92%, transparent);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
}

td {
  background: color-mix(in srgb, var(--panel-solid) 80%, transparent);
}

tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 7%, var(--panel-solid));
}

.catalog-table-wrap,
.table-wrap,
.vendor-table-wrap,
.brand-table-wrap {
  overflow: auto;
}

.status {
  min-height: 24px;
  padding: 4px 10px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 10%, transparent);
}

.status.new,
.status.hold,
.status.short {
  background: rgba(255, 149, 0, 0.14);
  color: #b85d00;
}

.status.ready,
.status.supply-po {
  background: rgba(0, 122, 255, 0.14);
  color: var(--accent);
}

.shopify-sync-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  border: 1px solid var(--line);
}

.shopify-sync-badge.graphql {
  border-color: color-mix(in srgb, #16a34a 35%, var(--line));
  background: color-mix(in srgb, #16a34a 13%, transparent);
  color: #15803d;
}

.shopify-sync-badge.manual {
  border-color: color-mix(in srgb, #2563eb 35%, var(--line));
  background: color-mix(in srgb, #2563eb 12%, transparent);
  color: #1d4ed8;
}

.shopify-sync-badge.unknown {
  border-color: color-mix(in srgb, #d97706 38%, var(--line));
  background: color-mix(in srgb, #d97706 14%, transparent);
  color: #b45309;
}

.status.confirmed,
.status.approved,
.status.live,
.status.active,
.status.supply-stock {
  background: rgba(52, 199, 89, 0.15);
  color: color-mix(in srgb, var(--success) 82%, #0f5132);
}

.status.returned,
.status.canceled,
.status.void,
.status.damaged,
.button.danger {
  background: rgba(255, 59, 48, 0.13);
  color: var(--danger);
}

.product-workspace-head {
  padding: 16px;
}

.product-workspace-title h2 {
  font-size: 1.34rem;
}

.product-workspace-chips > span,
.supplier-chip,
.review-field-chips span,
.source-import-sku-list span {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-solid) 72%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-border);
}

.product-section-card,
.product-panel,
.product-image-panel,
.brand-guard-field,
.product-bullets-panel,
.dimension-group {
  background: color-mix(in srgb, var(--panel-solid) 82%, transparent);
}

.product-section-title {
  background: color-mix(in srgb, var(--panel-subdued) 72%, transparent);
  border-bottom-color: var(--line);
}

.product-section-blue,
.product-section-green,
.product-section-orange,
.product-section-purple,
.product-section-teal {
  border-top: 0;
}

.product-section-blue { box-shadow: inset 0 3px 0 var(--accent), var(--shadow-soft); }
.product-section-green { box-shadow: inset 0 3px 0 var(--success), var(--shadow-soft); }
.product-section-orange { box-shadow: inset 0 3px 0 var(--warning), var(--shadow-soft); }
.product-section-purple { box-shadow: inset 0 3px 0 #af52de, var(--shadow-soft); }
.product-section-teal { box-shadow: inset 0 3px 0 #32ade6, var(--shadow-soft); }

.product-main-image,
.product-image-thumb,
.product-image-manager-preview,
.brand-logo-large,
.brand-logo,
.vendor-logo,
.product-gallery-placeholder {
  border-radius: 8px;
  background: var(--panel-subdued);
}

.product-image-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.brand-guard-head .status,
.brand-lock-chip {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 18%, transparent);
}

.brand-lock-message {
  background: rgba(52, 199, 89, 0.13);
  color: color-mix(in srgb, var(--success) 74%, #14532d);
}

.brand-lock-chip.unlocked {
  background: rgba(255, 149, 0, 0.13) !important;
  color: #b85d00 !important;
}

.action-popover {
  padding: 7px;
}

.action-popover button,
.action-popover a {
  border-radius: 8px;
}

.action-popover button:hover,
.action-popover a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.modal-backdrop {
  background: rgba(245, 245, 247, 0.68);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

:root[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.toast,
.global-save-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 90%, transparent);
  color: var(--bg);
  box-shadow: var(--shadow);
}

.supplier-dropdown {
  border-radius: 8px;
}

.supplier-chip-control.open {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

@media (max-width: 820px) {
  .shell {
    margin-left: 0;
    padding: 0 16px 28px;
  }

  .topbar {
    margin: 0 -16px 18px;
    padding: 12px 16px;
  }

  .sidebar {
    width: auto;
  }
}


/* Open-source icon system */
.app-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: currentColor;
  opacity: 0.88;
  pointer-events: none;
}

.nav-item,
.nav-child,
.button,
.file-button,
.text-button,
.link-button,
.subnav-item,
.product-workspace-tab,
.status,
.icon-title,
.product-gallery-foot a,
.product-gallery-foot button {
  gap: 8px;
}

.text-button,
.link-button,
.product-gallery-foot a,
.product-gallery-foot button {
  display: inline-flex;
  align-items: center;
}

.nav-item,
.nav-child {
  justify-content: flex-start;
  text-align: left;
}

.nav-item .app-icon,
.nav-child .app-icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.nav-item:hover .app-icon,
.nav-item.active .app-icon,
.nav-child:hover .app-icon,
.nav-child.active .app-icon {
  color: var(--accent);
  opacity: 1;
}

.nav-child .app-icon {
  width: 15px;
  height: 15px;
}

.button .app-icon,
.file-button .app-icon,
.text-button .app-icon,
.link-button .app-icon,
.subnav-item .app-icon,
.product-workspace-tab .app-icon {
  width: 15px;
  height: 15px;
}

.icon-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.icon-title .app-icon,
.product-section-title .app-icon,
.product-bullets-head .app-icon {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.product-section-blue .icon-title .app-icon { color: var(--accent); }
.product-section-green .icon-title .app-icon { color: var(--success); }
.product-section-orange .icon-title .app-icon { color: var(--warning); }
.product-section-purple .icon-title .app-icon { color: #af52de; }
.product-section-teal .icon-title .app-icon { color: #0f766e; }

.status .app-icon,
.status-icon {
  width: 13px;
  height: 13px;
}

.metric {
  position: relative;
  overflow: hidden;
}

.metric-symbol {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-solid));
  color: var(--accent);
  box-shadow: inset 0 1px 0 var(--glass-border);
}

.metric-symbol .app-icon {
  width: 18px;
  height: 18px;
  opacity: 1;
}

.metric > span:not(.metric-symbol) {
  display: inline-block;
  padding-right: 42px;
}

.metric.warning .metric-symbol {
  background: color-mix(in srgb, var(--warning) 13%, var(--panel-solid));
  color: var(--warning);
}

.product-workspace-tab .app-icon,
.subnav-item .app-icon {
  opacity: 0.7;
}

.product-workspace-tab.active .app-icon,
.subnav-item.active .app-icon {
  color: var(--accent);
  opacity: 1;
}

.action-popover .app-icon {
  width: 15px;
  height: 15px;
}

:root[data-theme="dark"] .metric-symbol {
  background: color-mix(in srgb, var(--accent) 18%, var(--panel-solid));
}

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

.import-center-head {
  align-items: center;
}

.import-center-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.import-center-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}

.import-center-stats small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
}

.import-center-stats strong {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 820;
}

.import-center-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.import-section-menu,
.import-section-panel,
.import-queue-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

.import-section-menu {
  display: grid;
  gap: 6px;
  padding: 8px;
  position: sticky;
  top: 88px;
}

.import-menu-title {
  padding: 4px 7px 8px;
}

.import-menu-title strong {
  color: var(--ink);
}

.import-section-button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.import-section-button:hover,
.import-section-button.active {
  border-color: var(--line);
  background: var(--panel-hover);
}

.import-section-button.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.import-section-button span,
.import-section-button span strong,
.import-section-button span small {
  display: block;
  min-width: 0;
}

.import-section-button small,
.import-section-button em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.74rem;
}

.import-section-button em {
  grid-column: 2;
}

.import-section-workspace,
.import-section-panel,
.import-action-list,
.import-template-list,
.import-job-list {
  display: grid;
  gap: 8px;
}

.import-section-panel,
.import-queue-panel {
  padding: 12px;
}

.import-panel-title {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.import-action-row,
.import-template-row,
.import-job-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-solid) 84%, transparent);
  padding: 10px 11px;
}

.import-action-row.muted-row {
  opacity: 0.72;
}

.import-action-row div,
.import-template-row div,
.import-job-main div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.import-action-row strong,
.import-template-row strong,
.import-job-row strong {
  color: var(--ink);
}

.import-action-row small,
.import-template-row small,
.import-job-row small,
.import-job-row p,
.import-job-meta {
  color: var(--muted);
}

.info-dot {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}

.category-import-row {
  background: color-mix(in srgb, var(--accent) 4%, var(--panel-solid));
}

.import-template-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.import-queue-panel {
  grid-column: 1 / -1;
  position: static;
  max-height: 360px;
  overflow: auto;
}

.import-queue-panel.full {
  position: static;
  max-height: none;
}

.import-queue-head {
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.import-job-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.import-job-row:hover,
.import-job-row.selected {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--panel-solid));
}

.import-job-row.selected {
  box-shadow: inset 3px 0 0 var(--accent);
}

.import-job-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.import-job-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.import-job-title strong,
.import-job-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-job-meta {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) repeat(2, minmax(92px, auto));
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  min-width: 0;
}

.import-job-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 0;
}

.import-job-actions a,
.import-job-actions button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-solid);
  color: var(--ink);
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.import-job-actions button {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  color: var(--danger);
}

.jobs-page {
  display: grid;
  gap: 12px;
}

.jobs-command-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  padding: 12px 14px;
}

.jobs-command-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 380px);
  align-items: center;
  gap: 12px;
}

.jobs-command-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.jobs-command-head h2,
.jobs-command-head p {
  margin: 0;
}

.jobs-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.jobs-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.jobs-quick-stats span {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 7px 9px;
}

.jobs-quick-stats small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.jobs-quick-stats strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.jobs-filter-card,
.jobs-settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 10px;
}

.jobs-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(130px, 1fr)) auto;
  gap: 8px;
}

.jobs-filter-bar input,
.jobs-filter-bar select {
  min-height: 34px;
}

.jobs-api-groups {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.jobs-api-groups p,
.jobs-api-groups strong {
  margin: 0;
}

.jobs-api-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jobs-api-chip {
  display: grid;
  gap: 2px;
  max-width: 280px;
  border: 1px solid color-mix(in srgb, var(--danger) 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger) 5%, var(--panel-solid));
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.jobs-api-chip span,
.jobs-api-chip em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.jobs-api-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.jobs-settings-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: center;
  gap: 10px;
}

.jobs-setting-select,
.jobs-setting-toggle {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.jobs-setting-toggle {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  color: var(--ink);
}

.jobs-setting-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
}

.jobs-setting-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jobs-retention-note {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.jobs-retention-note strong {
  font-size: 0.78rem;
}

.jobs-retention-note small {
  color: var(--muted);
  font-weight: 700;
}

.jobs-schedule-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 10px;
}

.jobs-schedule-head,
.jobs-schedule-controls,
.jobs-schedule-meta {
  display: grid;
  gap: 10px;
  align-items: center;
}

.jobs-schedule-head {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.jobs-schedule-head strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
}

.jobs-schedule-head small {
  color: var(--muted);
  font-weight: 700;
}

.jobs-schedule-controls {
  grid-template-columns: minmax(110px, 0.75fr) repeat(5, minmax(130px, 1fr));
}

.jobs-schedule-controls input,
.jobs-schedule-controls select {
  min-height: 32px;
}

.jobs-schedule-meta {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.jobs-schedule-meta span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 7px 9px;
}

.jobs-schedule-meta small,
.jobs-schedule-meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jobs-schedule-meta small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.jobs-schedule-meta strong {
  color: var(--ink);
  font-size: 0.8rem;
}

.worker-health-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-solid) 84%, var(--accent-soft));
  padding: 10px 12px;
}

.worker-health-card.needs-attention {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  background: color-mix(in srgb, var(--danger-soft) 36%, var(--panel-solid));
}

.worker-health-card > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.worker-health-card strong,
.worker-health-card span,
.worker-health-card code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-health-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.jobs-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 12px;
  align-items: start;
}

.export-notification-menu {
  position: relative;
}

.export-notification-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  color: var(--muted-strong);
}

.export-notification-button .app-icon {
  width: 16px;
  height: 16px;
}

.export-notification-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.export-notification-button strong {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 820;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bg);
}

.export-notification-popover {
  min-width: 300px;
  right: 0;
}

.notification-popover-head {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.notification-popover-head small,
.notification-export-row small {
  color: var(--muted);
  font-size: 0.72rem;
}

.notification-export-row {
  display: grid !important;
  gap: 3px;
  align-items: start;
  text-decoration: none;
}

.notification-export-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-profile-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.job-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.job-profile-head h3,
.job-profile-head p {
  margin: 0;
}

.job-id-code {
  display: inline-block;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--bg-soft, #f6f7fb);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.job-profile-actions,
.job-profile-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-profile-actions .button,
.job-profile-files .button {
  min-height: 34px;
}

.job-artifact-list {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 10px;
}

.job-artifact-list > strong {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.job-artifact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.job-artifact-row span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.job-artifact-row small,
.job-artifact-row em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.job-artifact-row b {
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.job-artifact-actions {
  display: flex;
  gap: 6px;
}

.job-artifact-actions .button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 0.76rem;
}

.job-profile-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
  color: var(--muted);
  padding: 9px 10px;
  font-size: 0.8rem;
  line-height: 1.35;
}

.job-progress {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.job-progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.job-progress-bar span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.job-progress.complete .job-progress-bar span {
  background: var(--success);
}

.job-progress-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.job-file-state {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-subdued);
  padding: 9px 10px;
}

.job-file-state strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.job-file-state span {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.job-file-state.ready {
  border-color: color-mix(in srgb, var(--success) 38%, var(--line));
  background: color-mix(in srgb, var(--success) 8%, var(--panel-solid));
}

.job-file-state.pending {
  border-color: color-mix(in srgb, var(--warning) 36%, var(--line));
  background: color-mix(in srgb, var(--warning) 8%, var(--panel-solid));
}

.job-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.job-profile-stats span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 9px 10px;
  min-width: 0;
}

.job-profile-stats small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.job-profile-stats strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-profile-message,
.job-profile-errors {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.job-profile-message p {
  margin: 0;
}

.job-profile-message strong,
.job-profile-errors strong {
  color: var(--ink);
}

.job-profile-errors span {
  border-radius: 6px;
  background: color-mix(in srgb, var(--danger) 8%, var(--panel-solid));
  color: var(--danger);
  padding: 6px 8px;
  font-size: 0.78rem;
}

.import-job-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  padding-left: 2px;
}

.import-job-errors summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.import-job-errors {
  grid-column: 1 / -1;
}

.import-job-errors div {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  max-height: 180px;
  overflow: auto;
}

.import-job-errors span {
  border-radius: 6px;
  background: color-mix(in srgb, var(--danger) 8%, var(--panel-solid));
  color: var(--danger);
  padding: 6px 8px;
  font-size: 0.78rem;
}

.catalog-change-page {
  display: grid;
  gap: 14px;
}

.catalog-change-status {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.catalog-change-status .danger-text {
  color: var(--danger);
  font-weight: 700;
}

.sku-change-view-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px;
}

.sku-change-view-button {
  display: grid;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--panel) 94%, var(--panel-subdued));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.sku-change-view-button strong {
  font-size: 0.86rem;
}

.sku-change-view-button small {
  color: var(--muted);
  font-size: 0.72rem;
}

.sku-change-view-button.active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 52%, var(--panel));
  color: var(--accent-strong);
}

.sku-change-view-button.active small {
  color: color-mix(in srgb, var(--accent-strong) 72%, var(--muted));
}

.sku-change-filters {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1.5fr) repeat(8, minmax(120px, 1fr)) auto auto;
}

.sku-change-filters label {
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 6px;
  text-transform: uppercase;
}

.sku-change-filters input,
.sku-change-filters select {
  text-transform: none;
}

.sku-change-filters .sku-change-include-untracked {
  align-content: center;
  min-height: var(--control-h);
  text-transform: none;
}

.sku-change-field-settings label {
  min-height: 34px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.metric-card small,
.metric-card span {
  color: var(--muted);
}

.metric-card strong {
  font-size: 24px;
}

.table-scroll {
  overflow: auto;
}

.data-table.compact-table td small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.product-editor-page.compact-product,
.product-editor-page {
  gap: 12px;
}

.product-editor-page .product-workspace-head {
  padding: 10px 12px;
  align-items: center;
}

.product-editor-page .product-workspace-title h2 {
  font-size: 1.12rem;
}

.product-editor-page .product-section-card,
.product-editor-page .product-image-panel,
.product-editor-page .product-panel {
  padding: 10px;
}

.product-editor-page .product-section-title {
  margin: -10px -10px 10px;
  padding: 8px 10px;
}

.product-editor-page .product-row-fields,
.product-editor-page .dimension-triplet,
.product-editor-page .dimension-weight-grid {
  gap: 8px;
}

.product-editor-page .product-row-fields input,
.product-editor-page .product-row-fields textarea,
.product-editor-page .product-row-fields select,
.product-editor-page .dimension-triplet input,
.product-editor-page .dimension-weight-grid input {
  padding: 8px 9px;
  min-height: 36px;
}

.product-editor-page .product-home-image {
  min-height: 180px;
}

.product-editor-page .product-workspace-tabs {
  padding: 0;
}

.product-editor-page .product-workspace-tab {
  padding: 8px 10px 7px;
}

.product-editor-page .product-editor-actions {
  gap: 6px;
  max-width: 720px;
}

.product-editor-page .product-editor-actions .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.product-editor-page .product-workspace-chips {
  gap: 5px;
}

.product-editor-page .product-workspace-chips > span,
.product-editor-page .status {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 0.74rem;
}

@media (max-width: 900px) {
  .product-export-modal-layout,
  .source-export-modal-layout,
  .export-column-grid {
    grid-template-columns: 1fr;
  }

  .product-editor-page .product-workspace-head {
    gap: 8px;
  }

  .product-editor-page .product-workspace-title {
    gap: 7px;
  }

  .product-editor-page .product-workspace-title h2 {
    margin-bottom: 4px;
    font-size: 1rem;
  }

  .product-editor-page .product-editor-actions {
    gap: 5px;
  }

  .product-editor-page .product-editor-actions .button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 0.76rem;
  }

  .system-settings-grid,
  .system-user-row,
  .settings-toggle-grid,
  .settings-shell,
  .settings-main-head,
  .settings-content-grid,
  .settings-shell .channel-settings-grid,
  .settings-shell .channel-settings-grid.account-grid,
  .settings-shell .channel-settings-grid.policy-grid,
  .settings-shell .channel-settings-grid.listing-grid,
  .settings-shell .channel-settings-aside,
  .channel-attribute-filter-bar,
  .channel-attribute-summary,
  .system-fields-toolbar,
  .system-fields-summary {
    grid-template-columns: 1fr;
  }

  .system-settings-card.span-2 {
    grid-column: auto;
  }

  .system-settings-hero {
    display: grid;
  }
}

@media (max-width: 1180px) {
  .sku-change-view-switcher,
  .sku-change-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-center-layout {
    grid-template-columns: 1fr;
  }

  .jobs-command-top,
  .jobs-filter-bar,
  .jobs-settings-card,
  .jobs-schedule-head,
  .jobs-schedule-controls,
  .jobs-schedule-meta,
  .channel-logo-editor,
  .channel-defaults-card .form-grid,
  .jobs-api-groups {
    grid-template-columns: 1fr;
  }

  .worker-health-card {
    grid-template-columns: 1fr;
  }

  .jobs-workspace {
    grid-template-columns: 1fr;
  }

  .job-profile-panel {
    position: static;
  }

  .import-section-menu,
  .import-queue-panel {
    position: static;
    max-height: none;
  }

  .import-job-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .import-job-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .import-action-row,
  .import-template-row,
  .import-job-main,
  .import-job-meta {
    display: grid;
    justify-content: stretch;
  }

  .import-template-actions,
  .import-template-actions .button,
  .import-template-actions .file-button {
    width: 100%;
    justify-content: center;
  }
}

body.about-page {
  min-height: 100vh;
  background: #f4f5f7;
  color: #202223;
}

.about-page a {
  color: inherit;
  text-decoration: none;
}

.about-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #d9dde3;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.about-header__top,
.about-main-nav,
.about-section,
.about-contact {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.about-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.about-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.about-brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #202223;
  color: #ffffff;
  font-weight: 850;
}

.about-brand small {
  display: block;
  margin-top: 2px;
  color: #68707a;
  font-size: 0.76rem;
}

.about-utility,
.about-main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-utility a,
.about-main-nav a {
  border-radius: 8px;
  color: #4f5864;
  font-size: 0.9rem;
  font-weight: 750;
}

.about-utility a {
  padding: 8px 10px;
}

.about-main-nav {
  overflow-x: auto;
  padding: 0 0 12px;
}

.about-main-nav a {
  flex: 0 0 auto;
  padding: 9px 12px;
  background: #eef1f4;
}

.about-utility a:hover,
.about-main-nav a:hover {
  background: #e2f1eb;
  color: #006e52;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 54px;
}

.about-hero__content {
  min-height: 430px;
  padding: 52px;
  border-radius: 8px;
  background:
    linear-gradient(105deg, rgba(18, 28, 38, 0.92), rgba(18, 28, 38, 0.78)),
    radial-gradient(circle at 82% 26%, rgba(0, 128, 96, 0.48), transparent 28%),
    linear-gradient(135deg, #263441, #111820);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 16px 40px rgba(26, 36, 46, 0.16);
}

.about-kicker {
  margin: 0 0 12px;
  color: #008060;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.about-hero .about-kicker {
  color: #82e0bf;
}

.about-hero h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.about-hero p:not(.about-kicker) {
  max-width: 700px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.65;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.about-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #cfd6dd;
  border-radius: 8px;
  background: #ffffff;
  color: #202223;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(26, 36, 46, 0.08);
}

.about-button--primary {
  border-color: #008060;
  background: #008060;
  color: #ffffff;
}

.about-hero__panel {
  display: grid;
  align-content: stretch;
  gap: 12px;
}

.about-hero__panel div {
  display: grid;
  align-content: center;
  min-height: 132px;
  padding: 22px;
  border: 1px solid #d9dde3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(26, 36, 46, 0.08);
}

.about-hero__panel span,
.about-stats span,
.about-card-grid p,
.about-review-grid p,
.about-copy p {
  color: #5f6772;
}

.about-hero__panel strong {
  margin-top: 8px;
  color: #202223;
  font-size: 2.45rem;
  line-height: 1;
}

.about-section {
  padding: 54px 0;
}

.about-story {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 44px;
  border-top: 1px solid #d9dde3;
}

.about-section h2,
.about-contact h2 {
  margin: 0;
  color: #202223;
  font-size: clamp(1.9rem, 3.6vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.about-copy {
  display: grid;
  gap: 18px;
}

.about-copy p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.75;
}

.about-trust {
  padding: 48px 32px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(26, 36, 46, 0.08);
}

.about-section__head {
  max-width: 760px;
  margin-bottom: 26px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #d9dde3;
  border-left: 1px solid #d9dde3;
}

.about-stats article {
  min-height: 150px;
  padding: 22px;
  border-right: 1px solid #d9dde3;
  border-bottom: 1px solid #d9dde3;
  background: #fbfcfd;
}

.about-stats strong {
  display: block;
  margin-bottom: 10px;
  color: #008060;
  font-size: 2.35rem;
  line-height: 1;
}

.about-card-grid,
.about-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.about-card-grid article,
.about-review-grid blockquote {
  margin: 0;
  padding: 24px;
  border: 1px solid #d9dde3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(26, 36, 46, 0.06);
}

.about-card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  border-radius: 8px;
  background: #e2f1eb;
  color: #006e52;
  font-weight: 850;
}

.about-card-grid h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.about-card-grid p,
.about-review-grid p {
  margin: 0;
  line-height: 1.6;
}

.about-reviews {
  border-top: 1px solid #d9dde3;
}

.about-review-grid blockquote {
  display: grid;
  gap: 18px;
}

.about-review-grid p {
  color: #30363d;
  font-size: 1.05rem;
}

.about-review-grid cite {
  color: #68707a;
  font-style: normal;
  font-weight: 800;
}

.about-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 54px;
  padding: 34px;
  border-radius: 8px;
  background: #202223;
  color: #ffffff;
}

.about-contact h2 {
  color: #ffffff;
}

.about-contact .about-kicker {
  color: #82e0bf;
}

@media (max-width: 900px) {
  .about-hero,
  .about-story,
  .about-stats,
  .about-card-grid,
  .about-review-grid {
    grid-template-columns: 1fr;
  }

  .about-hero {
    padding-top: 40px;
  }

  .about-hero__content {
    min-height: 380px;
    padding: 32px;
  }

  .about-contact,
  .about-header__top {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-utility {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .about-header__top,
  .about-main-nav,
  .about-section,
  .about-contact,
  .about-hero {
    width: min(100% - 20px, 1180px);
  }

  .about-hero__content,
  .about-trust,
  .about-contact {
    padding: 24px;
  }

  .about-hero h1 {
    font-size: 2.35rem;
  }

  .about-actions,
  .about-button {
    width: 100%;
  }
}
/* Product detail readability pass */
.product-editor-page {
  max-width: 1680px;
  margin: 0 auto;
  gap: 10px;
}

.product-editor-page .product-workspace-head {
  position: relative;
  top: auto;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.product-editor-page .product-workspace-title {
  align-items: center;
  gap: 12px;
}

.product-editor-page .product-workspace-title h2 {
  margin: 0 0 6px;
  max-width: 760px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.15rem;
  line-height: 1.15;
}

.product-editor-page .product-workspace-chips {
  gap: 5px;
}

.product-editor-page .product-workspace-chips > span {
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  line-height: 1.2;
}

.product-editor-page .product-editor-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: none;
}

.product-editor-page .product-editor-actions .button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.product-editor-page .product-workspace-tabs {
  position: sticky;
  top: 0;
  z-index: 7;
  gap: 4px;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 999px;
  padding: 4px;
  background: color-mix(in srgb, var(--panel-subdued) 88%, var(--panel));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.product-editor-page .product-workspace-tab {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.product-editor-page .product-workspace-tab.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.product-editor-page .product-home-grid {
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 10px;
}

.product-editor-page .product-home-main {
  grid-template-columns: minmax(390px, 1fr) minmax(320px, 0.62fr);
  gap: 10px;
}

.product-editor-page .product-home-side,
.product-editor-page .product-home-column {
  gap: 10px;
}

.product-editor-page .product-home-main > .product-home-column:last-child {
  position: sticky;
  top: 52px;
}

.product-editor-page .product-image-panel,
.product-editor-page .product-section-card,
.product-editor-page .product-panel {
  padding: 8px;
  border-color: color-mix(in srgb, var(--line) 84%, transparent);
  background: color-mix(in srgb, var(--panel) 96%, var(--panel-subdued));
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.product-editor-page .product-section-title {
  margin: -8px -8px 8px;
  padding: 7px 9px;
  min-height: 34px;
  background: color-mix(in srgb, var(--panel-subdued) 74%, var(--panel));
}

.product-editor-page .product-section-title strong {
  font-size: 0.82rem;
}

.product-editor-page .product-section-blue,
.product-editor-page .product-section-green,
.product-editor-page .product-section-orange,
.product-editor-page .product-section-purple,
.product-editor-page .product-section-teal {
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--accent) 70%, var(--line)), 0 8px 22px rgba(15, 23, 42, 0.045);
}

.product-editor-page .product-main-image {
  min-height: 210px;
  max-height: 260px;
}

.product-editor-page .product-main-image img {
  max-height: 250px;
}

.product-editor-page .product-main-image.is-empty {
  min-height: 112px;
  max-height: 132px;
}

.product-editor-page .product-main-image.is-empty .image-placeholder {
  min-height: 96px;
  color: var(--muted);
  font-weight: 760;
}

.product-editor-page .product-image-rail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: none;
}

.product-editor-page .product-image-thumb,
.product-editor-page .product-image-rail span {
  height: 58px;
}

.product-editor-page .product-row-fields,
.product-editor-page .product-form-grid,
.product-editor-page .product-price-grid,
.product-editor-page .dimension-triplet,
.product-editor-page .dimension-weight-grid {
  gap: 6px;
}

.product-editor-page .product-field-stack {
  gap: 8px;
}

.product-editor-page .product-row-fields label,
.product-editor-page .product-field-stack label,
.product-editor-page .product-form-grid label,
.product-editor-page .product-price-grid label,
.product-editor-page .dimension-triplet label,
.product-editor-page .dimension-weight-grid label {
  gap: 4px;
  font-size: 0.72rem;
}

.product-editor-page input,
.product-editor-page select,
.product-editor-page textarea {
  min-height: 31px;
  padding: 6px 8px;
  font-size: 0.82rem;
}

.product-editor-page textarea {
  line-height: 1.35;
}

.product-editor-page .product-home-descriptions textarea {
  min-height: 72px;
  max-height: 120px;
}

.product-editor-page .dimension-group {
  gap: 8px;
  padding: 9px;
}

.product-editor-page .dimension-group-title strong {
  font-size: 0.8rem;
}

.product-editor-page .dimension-source-badge {
  padding: 1px 5px;
  font-size: 0.58rem;
}

.product-editor-page .catalog-table {
  min-width: 720px;
  font-size: 0.8rem;
}

.product-editor-page .catalog-table th,
.product-editor-page .catalog-table td {
  padding: 7px 8px;
}

.product-editor-page .summary-grid {
  gap: 8px;
}

.product-editor-page .summary-grid span {
  padding: 8px;
  border-radius: 8px;
}

@media (max-width: 1500px) {
  .product-editor-page .product-workspace-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .product-editor-page .product-workspace-title {
    align-items: flex-start;
  }

  .product-editor-page .product-editor-actions {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 1320px) {
  .product-editor-page .product-home-grid,
  .product-editor-page .product-home-main {
    grid-template-columns: 1fr;
  }

  .product-editor-page .product-home-main > .product-home-column:last-child {
    position: static;
  }
}

@media (max-width: 980px) {
  .product-editor-page .product-workspace-head {
    position: static;
    grid-template-columns: 1fr;
  }

  .product-editor-page .product-workspace-tabs {
    position: static;
    border-radius: 8px;
  }

  .product-editor-page .product-editor-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* System UI revamp: compact iPad-style operations shell */
:root {
  --bg: #f2f4f7;
  --ink: #111827;
  --muted: #5f6b7a;
  --muted-strong: #354052;
  --line: #d8dee8;
  --panel: #ffffff;
  --panel-subdued: #f7f8fb;
  --panel-hover: #eef3fb;
  --sidebar: #f7f8fb;
  --input-bg: #ffffff;
  --nav-active: #e8f1ff;
  --accent: #0a84ff;
  --accent-strong: #0067d8;
  --accent-soft: #e8f2ff;
  --success: #1f9d55;
  --warning: #b7791f;
  --danger: #d92d20;
  --surface-soft: #f6f8fb;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 14px rgba(16, 24, 40, 0.06);
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --control-h: 32px;
}

:root[data-theme="dark"] {
  --bg: #111318;
  --ink: #f5f7fb;
  --muted: #a2acba;
  --muted-strong: #c8d0db;
  --line: #2b313b;
  --panel: #1a1d24;
  --panel-subdued: #20242d;
  --panel-hover: #272d38;
  --sidebar: #151820;
  --input-bg: #141820;
  --nav-active: #102f55;
  --accent: #409cff;
  --accent-strong: #6db3ff;
  --accent-soft: #102b4c;
  --success: #3ccb7f;
  --warning: #f0b85b;
  --danger: #ff776b;
  --surface-soft: #20242d;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 32px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 22px rgba(0, 0, 0, 0.22);
}

html {
  background: var(--bg);
  font-size: 15px;
  text-rendering: optimizeLegibility;
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, var(--panel)) 0, var(--bg) 260px),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

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

.sidebar {
  width: 244px;
  padding: 14px 10px 18px;
  border-right: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--sidebar) 92%, var(--panel));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.45);
}

.brand {
  gap: 9px;
  margin-bottom: 12px;
  padding: 4px 4px 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #111827;
  font-size: 0.82rem;
  letter-spacing: 0;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

.brand strong {
  font-size: 0.88rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
}

.menu-expand {
  min-width: 44px;
  height: 28px;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.72rem;
  background: color-mix(in srgb, var(--panel) 82%, var(--accent-soft));
}

nav,
.nav-group {
  gap: 3px;
}

.nav-section-label {
  margin: 13px 9px 4px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
}

.nav-item,
.nav-child {
  min-height: 32px;
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

.nav-child {
  margin-left: 12px;
  padding-left: 14px;
  border-left: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  font-size: 0.84rem;
}

.nav-item:hover,
.nav-child:hover {
  background: color-mix(in srgb, var(--nav-active) 70%, transparent);
  color: var(--ink);
}

.nav-item.active,
.nav-child.active {
  background: var(--nav-active);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}

.shell {
  margin-left: 244px;
  padding: 0 18px 24px;
  background: transparent;
}

.topbar {
  margin: 0 -18px 18px;
  padding: 14px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
}

.eyebrow {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

h1 {
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 760;
  letter-spacing: 0;
}

h2 {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 760;
  letter-spacing: 0;
}

h3,
.section-head h3,
.full-card h3,
.product-section-title strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 760;
}

p,
.muted,
small {
  color: var(--muted);
}

.quick-actions,
.toolbar,
.mapping-actions {
  gap: 8px;
}

.button,
.file-button {
  min-height: var(--control-h);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 760;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--accent) 22%, transparent), inset 0 -1px 0 rgba(0, 0, 0, 0.14);
}

.button:hover,
.file-button:hover {
  background: var(--accent-strong);
}

.secondary,
.button.secondary,
.file-button.secondary {
  border: 1px solid color-mix(in srgb, var(--line) 88%, var(--panel));
  background: color-mix(in srgb, var(--panel) 94%, var(--panel-subdued));
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.secondary:hover,
.button.secondary:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 54%, var(--panel));
  color: var(--accent);
}

.text-button {
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 760;
}

input,
select,
textarea {
  border: 1px solid color-mix(in srgb, var(--line) 88%, var(--panel));
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--ink);
  box-shadow: inset 0 1px 1px rgba(16, 24, 40, 0.03);
}

input,
select {
  min-height: var(--control-h);
  padding: 6px 10px;
}

textarea {
  padding: 8px 10px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
  outline: none;
}

::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.metric,
.stat-card,
.panel,
.table-wrap,
.connection-card,
.customer-card,
.vendor-card,
.full-card,
.po-table-wrap,
.timeline-card,
.order-list,
.order-detail,
.product-list,
.product-detail,
.mapping-template-card,
.import-center-card,
.product-section-card,
.product-image-panel,
.product-panel,
.product-workspace-head,
.catalog-toolbar,
.catalog-selection-bar,
.catalog-export-panel,
.catalog-filter-panel {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 96%, var(--panel-subdued));
  box-shadow: var(--shadow-soft);
}

.metric-grid,
.report-grid {
  gap: 10px;
  margin-bottom: 14px;
}

.metric,
.stat-card {
  padding: 12px;
}

.metric span,
.stat-card span,
.metric small,
.stat-card small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 720;
}

.metric strong,
.stat-card strong,
.metric-card strong {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 760;
  letter-spacing: 0;
}

.catalog-table-wrap,
.vendor-table-wrap,
.brand-table-wrap,
.table-scroll,
.table-wrap,
.po-table-wrap {
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

table,
.catalog-table,
.orders-table,
.data-table {
  color: var(--ink);
  font-size: 0.82rem;
}

th,
.catalog-table th,
.orders-table th,
.data-table th {
  background: color-mix(in srgb, var(--panel-subdued) 86%, var(--panel));
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

td,
.catalog-table td,
.orders-table td,
.data-table td {
  border-color: color-mix(in srgb, var(--line) 72%, transparent);
  color: var(--ink);
}

.catalog-table th,
.catalog-table td,
.orders-table th,
.orders-table td,
.data-table th,
.data-table td {
  padding: 8px 10px;
}

.catalog-table tbody tr:hover,
.orders-table tbody tr:hover,
.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
}

.status,
.pill,
.badge,
.product-workspace-chips > span,
.dimension-source-badge,
.mapping-card-flags span {
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--panel-subdued) 82%, var(--panel));
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 760;
}

.readiness-pill.ready,
.status.ready,
.success {
  color: var(--success);
}

.pill.success {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  background: color-mix(in srgb, var(--success) 18%, var(--panel));
  color: color-mix(in srgb, var(--success) 86%, var(--ink));
}

.pill.warning,
.pill.pending {
  border-color: color-mix(in srgb, var(--warning) 42%, var(--line));
  background: color-mix(in srgb, var(--warning) 18%, var(--panel));
  color: color-mix(in srgb, var(--warning) 86%, var(--ink));
}

.danger,
.status.danger {
  color: var(--danger);
}

.catalog-toolbar,
.catalog-selection-bar,
.catalog-export-panel,
.catalog-filter-panel,
.mapping-directory-head,
.import-center-head,
.section-head {
  padding: 10px 12px;
}

.catalog-filter-panel {
  gap: 8px;
}

.catalog-filter-panel select,
.catalog-filter-panel input,
.catalog-toolbar input,
.catalog-toolbar select {
  min-height: 34px;
}

.product-editor-page {
  max-width: 1660px;
  gap: 9px;
}

.product-editor-page .product-workspace-head {
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.product-editor-page .product-workspace-title h2 {
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 760;
}

.product-editor-page .product-workspace-tabs {
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-subdued) 78%, var(--panel));
}

.product-editor-page .product-workspace-tab {
  min-height: 28px;
  font-size: 0.76rem;
}

.product-editor-page .product-section-card,
.product-editor-page .product-image-panel,
.product-editor-page .product-panel {
  border-radius: var(--radius-md);
}

.product-editor-page .product-section-title {
  min-height: 32px;
  background: color-mix(in srgb, var(--panel-subdued) 78%, var(--panel));
}

.product-editor-page input,
.product-editor-page select,
.product-editor-page textarea {
  background: color-mix(in srgb, var(--input-bg) 86%, var(--panel-subdued));
}

.modal,
.dialog,
.export-modal,
.product-export-modal {
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(16, 24, 40, 0.24);
}

.modal-backdrop,
.overlay {
  background: rgba(17, 24, 39, 0.32);
  backdrop-filter: blur(8px);
}

@media (max-width: 980px) {
  .sidebar {
    width: 220px;
  }

  .shell {
    margin-left: 220px;
    padding-inline: 12px;
  }

  .topbar {
    margin-inline: -12px;
    padding-inline: 12px;
  }
}

.catalog-selection-toolbar.product-export-bar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.05fr) auto;
  align-items: center;
  gap: 10px;
  min-height: auto;
  margin-bottom: 10px;
  padding: 10px 12px;
}

.product-export-bar .selection-summary {
  min-width: 0;
  gap: 2px;
}

.product-export-bar .selection-summary strong {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.1;
}

.selection-kicker,
.export-control-label {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 820;
  text-transform: uppercase;
}

.product-selection-actions {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.product-inline-pagination {
  justify-content: flex-end;
  white-space: nowrap;
}

.selection-actions,
.alternate-actions,
.product-export-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.selection-actions,
.alternate-actions {
  flex-wrap: wrap;
}

.selection-actions .button,
.alternate-actions .button,
.product-export-controls .button {
  min-height: 30px;
  padding-inline: 9px;
  font-size: 0.76rem;
}

.auto-alternates-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 720;
  white-space: nowrap;
}

.auto-alternates-toggle input {
  min-height: auto;
}

.product-export-controls {
  justify-content: flex-end;
}

.product-export-controls select {
  min-width: 0;
  flex: 1 1 220px;
}

.catalog-source-summary.product-page-summary {
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--panel) 94%, var(--panel-subdued));
  box-shadow: var(--shadow-soft);
}

.catalog-source-summary.product-page-summary span {
  min-height: 44px;
  border-radius: 10px;
  padding: 7px 9px;
  background: color-mix(in srgb, var(--panel-subdued) 78%, var(--panel));
}

.catalog-source-summary.product-page-summary strong {
  font-size: 0.9rem;
}

.source-pagination .button {
  min-height: 30px;
}

@media (max-width: 900px) {
  .catalog-selection-toolbar.product-export-bar {
    grid-template-columns: 1fr;
  }

  .product-export-controls {
    justify-content: flex-start;
  }
}

.topbar-action-menu .system-action-button {
  min-width: 112px;
  justify-content: center;
}

.topbar-action-menu .system-action-button.has-selection {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--accent);
  color: #ffffff;
}

.topbar-action-menu .system-action-button.has-selection:hover {
  background: var(--accent-strong);
  color: #ffffff;
}

.action-popover {
  min-width: 230px;
  border-radius: 12px;
  padding: 7px;
}

.action-popover .menu-label {
  display: block;
  padding: 8px 10px 4px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.action-popover .source-maintenance-menu-button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 300px;
  padding: 9px 10px;
}

.source-maintenance-menu-icon {
  display: inline-grid;
  place-items: center;
  color: var(--accent);
}

.source-maintenance-menu-button > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.source-maintenance-menu-button strong {
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.1;
}

.source-maintenance-menu-button small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 720;
  line-height: 1.18;
}

.source-maintenance-menu-button:hover strong,
.source-maintenance-menu-button:hover small {
  color: inherit;
}

.action-menu-field {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
}

.action-menu-field span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
}

.action-menu-field select {
  width: 100%;
  min-height: 32px;
}

.catalog-action-summary {
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.05fr) auto;
}

@media (max-width: 1120px) {
  .catalog-action-summary {
    grid-template-columns: 1fr;
  }
}

#topbar-actions-slot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-actions-slot {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  pointer-events: none;
}

.floating-actions-slot .action-menu,
.floating-actions-slot .action-popover {
  pointer-events: auto;
}

.topbar-action-menu {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 35;
  order: 2;
}

.export-notification-menu {
  order: 1;
}

.topbar-action-menu .action-popover {
  top: auto;
  right: 0;
  bottom: calc(100% + 10px);
  max-height: min(62vh, 520px);
  overflow: auto;
  box-shadow: 0 22px 60px rgba(16, 24, 40, 0.22);
}

.topbar-action-menu .system-action-button.button {
  width: 52px;
  min-width: 52px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.2), 0 6px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

.topbar-action-menu .system-action-button.button > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.topbar-action-menu .system-action-button.button .app-icon {
  width: 20px;
  height: 20px;
}

.topbar-action-menu .system-action-button.has-selection.button {
  min-width: 178px;
  width: auto;
  padding-inline: 16px;
}

.topbar-action-menu .system-action-button.has-selection.button > span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}

.export-notification-button.button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
}

.export-notification-button.button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.export-notification-button.button strong {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-shadow: 0 0 0 2px var(--bg);
}

@media (max-width: 720px) {
  .floating-actions-slot {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .topbar-action-menu .system-action-button.button {
    width: 100%;
  }

  .topbar-action-menu .action-popover {
    left: 0;
    right: 0;
    min-width: 0;
  }
}

/* Navigation revamp */
.sidebar {
  width: 232px;
  padding: 12px 10px 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 42%, transparent), transparent 180px),
    color-mix(in srgb, var(--sidebar) 95%, var(--panel));
  border-right-color: color-mix(in srgb, var(--line) 72%, transparent);
  scrollbar-gutter: stable;
}

.shell {
  margin-left: 232px;
}

.brand {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -2px 0 10px;
  padding: 6px 4px 11px;
  background: color-mix(in srgb, var(--sidebar) 92%, transparent);
  backdrop-filter: blur(14px);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.brand strong {
  font-size: 0.9rem;
  font-weight: 780;
}

.brand small {
  font-size: 0.7rem;
}

.menu-expand {
  min-width: 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  padding: 0;
  color: var(--muted-strong);
  font-size: 0;
}

.menu-expand .app-icon {
  width: 15px;
  height: 15px;
  margin: 0;
}

.menu-expand:hover {
  color: var(--accent);
}

nav[aria-label="Primary"] {
  gap: 2px;
}

.nav-section-label {
  margin: 15px 8px 6px;
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-size: 0.61rem;
  font-weight: 840;
}

.nav-group {
  gap: 2px;
}

.nav-item,
.nav-child {
  position: relative;
  min-height: 31px;
  border-radius: 10px;
  padding: 6px 9px;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 720;
}

.nav-item .app-icon,
.nav-child .app-icon {
  width: 15px;
  height: 15px;
  margin-right: 8px;
  color: color-mix(in srgb, var(--muted) 78%, var(--ink));
}

.nav-item:hover,
.nav-child:hover {
  background: color-mix(in srgb, var(--panel) 82%, var(--accent-soft));
  color: var(--ink);
}

.nav-item.active,
.nav-child.active {
  background: color-mix(in srgb, var(--panel) 78%, var(--accent-soft));
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}

.nav-item.active::before,
.nav-child.active::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.nav-item.active .app-icon,
.nav-child.active .app-icon {
  color: var(--accent);
}

.nav-parent {
  font-weight: 780;
}

.nav-children {
  margin: 2px 0 4px;
  padding: 2px 0 2px 12px;
  border-left: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
}

.nav-group.active-group .nav-children {
  display: grid;
}

.nav-child {
  margin-left: 0;
  padding: 6px 8px;
  border-left: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.nav-child.active {
  border-left: 0;
}

@media (max-width: 980px) {
  .sidebar {
    width: 220px;
  }

  .shell {
    margin-left: 220px;
  }
}

body.sidebar-collapsed .sidebar {
  width: 68px;
  padding-inline: 8px;
  overflow-x: hidden;
}

body.sidebar-collapsed .shell {
  margin-left: 68px;
}

body.sidebar-collapsed .brand {
  display: grid;
  justify-content: center;
  justify-items: center;
  gap: 6px;
  padding-inline: 0;
}

body.sidebar-collapsed .brand > div,
body.sidebar-collapsed #menu-expand-toggle,
body.sidebar-collapsed .nav-section-label,
body.sidebar-collapsed .nav-children {
  display: none !important;
}

body.sidebar-collapsed .sidebar-collapse-toggle {
  position: static;
  min-width: 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  overflow: hidden;
  color: var(--accent);
}

body.sidebar-collapsed nav[aria-label="Primary"] {
  justify-items: center;
  gap: 6px;
}

body.sidebar-collapsed .nav-group,
body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .nav-child {
  width: 40px;
}

body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .nav-child {
  justify-content: center;
  min-height: 40px;
  padding: 0;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0;
  white-space: nowrap;
}

body.sidebar-collapsed .nav-item .app-icon,
body.sidebar-collapsed .nav-child .app-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  color: var(--muted-strong) !important;
  opacity: 1;
  stroke: currentColor;
}

body.sidebar-collapsed .nav-item .app-icon *,
body.sidebar-collapsed .nav-child .app-icon * {
  stroke: currentColor;
}

body.sidebar-collapsed .nav-item.active .app-icon,
body.sidebar-collapsed .nav-child.active .app-icon {
  color: var(--accent) !important;
}

body.sidebar-collapsed .nav-item.active,
body.sidebar-collapsed .nav-child.active {
  color: var(--accent);
}

body.sidebar-collapsed .nav-item.active::before,
body.sidebar-collapsed .nav-child.active::before {
  left: 0;
  top: 10px;
  bottom: 10px;
}

body.sidebar-collapsed .brand-mark {
  width: 36px;
  height: 36px;
}

@media (max-width: 980px) {
  body.sidebar-collapsed .sidebar {
    width: 64px;
  }

  body.sidebar-collapsed .shell {
    margin-left: 64px;
  }
}

.product-catalog-table-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(210px, auto) minmax(300px, auto) auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 94%, var(--panel-subdued));
  box-shadow: var(--shadow-soft);
}

.catalog-table-status,
.table-view-label {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.selection-summary-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inline-selection-action {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 820;
}

.inline-selection-action::before {
  content: "/";
  margin-right: 8px;
  color: var(--muted);
  font-weight: 650;
}

.inline-selection-action:hover {
  background: transparent;
  color: var(--accent-strong);
  text-decoration: underline;
}

.product-catalog-table-tools strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.product-catalog-table-tools small {
  color: var(--muted);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-catalog-table-tools .catalog-status-metric {
  color: var(--accent);
  font-weight: 820;
}

.catalog-table-view-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.alternate-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.table-view-label {
  min-width: 78px;
}

.catalog-table-tool-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.product-catalog-table-tools .product-inline-pagination {
  justify-content: flex-end;
}

.source-catalog-table-tools {
  grid-template-columns: minmax(260px, 1fr) minmax(260px, auto);
}

.source-table-status-actions {
  justify-content: flex-end;
}

.catalog-table-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 94%, var(--panel-subdued));
  box-shadow: var(--shadow-soft);
}

.catalog-table-bottom-actions .selection-actions,
.catalog-table-bottom-actions .source-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1280px) {
  .product-catalog-table-tools {
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1fr);
  }

  .catalog-table-view-actions,
  .product-catalog-table-tools .product-inline-pagination {
    justify-content: flex-start;
  }
}

.catalog-density-toggle {
  min-height: 31px;
}

.catalog-density-toggle button {
  min-height: 25px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.table-scroll-button {
  width: 31px;
  height: 31px;
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.table-scroll-button .app-icon {
  width: 15px;
  height: 15px;
}

.table-select-head {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.table-select-menu {
  position: relative;
}

.table-select-menu-button {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--muted);
  box-shadow: none;
}

.table-select-menu-button .app-icon {
  width: 13px;
  height: 13px;
}

.table-select-menu .action-popover {
  min-width: 190px;
}

.catalog-column-popover {
  min-width: 245px;
  max-height: 420px;
  overflow: auto;
}

.column-toggle-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 720;
  cursor: pointer;
}

.column-toggle-row:hover {
  background: color-mix(in srgb, var(--accent-soft) 56%, var(--panel));
}

.column-toggle-row input {
  min-height: auto;
}

.product-catalog-table-wrap,
.category-table-wrap {
  position: relative;
  max-width: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
}

.product-catalog-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.product-catalog-workspace.preview-open {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
}

.product-catalog-main {
  min-width: 0;
}

.catalog-preview-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 96%, var(--panel-subdued));
  box-shadow: var(--shadow-soft);
}

.catalog-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.catalog-preview-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

.catalog-preview-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.catalog-preview-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 10px;
  background: var(--input-bg);
  overflow: hidden;
}

.catalog-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-preview-media.empty {
  color: var(--muted);
}

.catalog-preview-media.empty .app-icon {
  width: 34px;
  height: 34px;
}

.catalog-preview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.catalog-preview-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel-subdued) 62%, var(--panel));
}

.catalog-preview-stats small,
.catalog-preview-section .section-label,
.catalog-preview-section dt {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.catalog-preview-stats strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.catalog-preview-section {
  display: grid;
  gap: 7px;
}

.catalog-preview-status-grid,
.catalog-preview-section dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.catalog-preview-status-grid > span,
.catalog-preview-section dl > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel-subdued) 58%, var(--panel));
}

.catalog-preview-status-grid strong,
.catalog-preview-section dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 740;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-preview-status-grid small {
  color: var(--muted);
  font-size: 0.7rem;
}

.catalog-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

@media (max-width: 1280px) {
  .product-catalog-workspace.preview-open {
    grid-template-columns: 1fr;
  }

  .catalog-preview-panel {
    position: static;
    max-height: none;
  }
}

.product-catalog-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 0.76rem;
}

.product-catalog-table th,
.product-catalog-table td {
  padding: 7px 9px;
  white-space: nowrap;
  vertical-align: middle;
}

.product-catalog-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: color-mix(in srgb, var(--panel-subdued) 94%, var(--panel));
}

.product-catalog-table td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.15;
}

.product-catalog-table .col-select {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  background: var(--panel);
  box-shadow: 1px 0 0 color-mix(in srgb, var(--line) 82%, transparent);
}

.product-catalog-table thead .col-select {
  z-index: 8;
  background: color-mix(in srgb, var(--panel-subdued) 94%, var(--panel));
}

.product-catalog-table .col-product {
  position: sticky;
  left: 38px;
  z-index: 5;
  width: 250px;
  min-width: 250px;
  max-width: 270px;
  white-space: normal;
  background: var(--panel);
  box-shadow: 1px 0 0 color-mix(in srgb, var(--line) 82%, transparent);
}

.product-catalog-table thead .col-product {
  z-index: 8;
  background: color-mix(in srgb, var(--panel-subdued) 94%, var(--panel));
}

.catalog-product-cell {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.catalog-product-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-subdued) 72%, var(--panel));
  overflow: hidden;
}

.catalog-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.catalog-product-thumb.empty {
  color: var(--muted);
}

.catalog-product-thumb.empty .app-icon {
  width: 16px;
  height: 16px;
}

.catalog-product-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.catalog-product-text .product-name-link,
.catalog-product-text small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-catalog-table .col-actions {
  position: sticky;
  right: 0;
  z-index: 6;
  width: 54px;
  min-width: 54px;
  text-align: center;
  background: var(--panel);
  box-shadow: -1px 0 0 color-mix(in srgb, var(--line) 82%, transparent);
}

.product-catalog-table thead .col-actions {
  z-index: 8;
  background: color-mix(in srgb, var(--panel-subdued) 94%, var(--panel));
}

.product-catalog-table tr.selected td {
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--panel));
}

.product-catalog-table .col-readiness {
  min-width: 112px;
}

.product-catalog-table .col-brand,
.product-catalog-table .col-manufacturer,
.product-catalog-table .col-vendorSku {
  min-width: 128px;
  max-width: 170px;
}

.product-catalog-table .col-category {
  min-width: 220px;
  max-width: 260px;
  white-space: normal;
}

.product-catalog-table .col-shopify,
.product-catalog-table .col-ebay {
  min-width: 118px;
}

.product-catalog-table .col-stock,
.product-catalog-table .col-price,
.product-catalog-table .col-images,
.product-catalog-table .col-shadows,
.product-catalog-table .col-status,
.product-catalog-table .col-updated {
  min-width: 82px;
}

.product-catalog-table .col-alternates {
  min-width: 110px;
}

.source-catalog-table .col-select {
  width: 58px;
  min-width: 58px;
}

.source-catalog-table .col-product {
  min-width: 340px;
}

.source-catalog-table .col-supplier,
.source-catalog-table .col-manufacturer,
.source-catalog-table .col-brand {
  min-width: 160px;
}

.source-catalog-table .col-price,
.source-catalog-table .col-stock {
  min-width: 110px;
}

.source-catalog-table .col-channels {
  min-width: 130px;
}

.source-catalog-table .col-actions {
  width: 72px;
  min-width: 72px;
  text-align: right;
}

.source-catalog-table thead .col-actions {
  text-align: right;
}

.inventory-table .col-sku,
.sku-change-table .col-sku {
  min-width: 150px;
}

.inventory-table .col-product {
  min-width: 260px;
}

.inventory-table .col-vendor,
.sku-change-table .col-supplier {
  min-width: 150px;
}

.sku-change-table .col-catalog {
  min-width: 120px;
}

.sku-change-table .col-catalog small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.inventory-table .col-reserved,
.inventory-table .col-available,
.inventory-table .col-reorder,
.sku-change-table .col-delta,
.sku-change-table .col-direction {
  min-width: 105px;
}

.sku-change-table .col-field {
  min-width: 130px;
}

.sku-change-table .col-before,
.sku-change-table .col-after {
  min-width: 155px;
  max-width: 240px;
}

.sku-change-table .col-before,
.sku-change-table .col-after,
.sku-change-table .col-sku {
  white-space: normal;
}

.category-table .col-category {
  min-width: 280px;
}

.category-table .col-count,
.category-table .col-status,
.category-table .col-missing {
  min-width: 95px;
}

.category-table .col-skus {
  min-width: 250px;
  max-width: 330px;
  white-space: normal;
}

.category-table .col-channels {
  min-width: 260px;
}

.product-catalog-table.compact-density {
  font-size: 0.72rem;
}

.product-catalog-table.compact-density th,
.product-catalog-table.compact-density td {
  padding: 5px 7px;
}

.product-catalog-table.compact-density .col-product {
  width: 220px;
  min-width: 220px;
  max-width: 235px;
}

.product-catalog-table.compact-density .catalog-product-cell {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 7px;
}

.product-catalog-table.compact-density .catalog-product-thumb {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.product-catalog-table.compact-density .col-readiness {
  min-width: 66px;
  text-align: center;
}

.product-catalog-table.compact-density .col-category {
  min-width: 132px;
  max-width: 160px;
}

.product-catalog-table.compact-density .col-shopify,
.product-catalog-table.compact-density .col-ebay {
  min-width: 86px;
}

.compact-metric-pill,
.compact-category-leaf,
.compact-shopify-status {
  max-width: 100%;
}

.compact-metric-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent);
}

.compact-metric-pill.active {
  background: rgba(52, 199, 89, 0.15);
  color: color-mix(in srgb, var(--success) 82%, #0f5132);
}

.compact-metric-pill.hold {
  background: rgba(255, 149, 0, 0.14);
  color: #b85d00;
}

.compact-metric-pill.canceled {
  background: rgba(255, 59, 48, 0.13);
  color: var(--danger);
}

.compact-category-leaf {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.compact-shopify-status {
  min-height: 23px;
  padding: 3px 8px;
  font-size: 0.7rem;
}

@media (max-width: 760px) {
  .product-catalog-table-tools {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .catalog-table-selection-actions,
  .catalog-table-view-actions {
    align-items: stretch;
  }

  .catalog-table-view-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .catalog-table-tool-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* Orders side-panel workflow */
.orders-workspace {
  gap: 10px;
  transition: grid-template-columns 180ms ease;
}

.orders-workspace.detail-open {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
}

.orders-table-wrap {
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.orders-table {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
}

.orders-table th,
.orders-table td {
  padding: 8px 10px;
  white-space: nowrap;
}

.orders-table th {
  height: 36px;
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-size: 0.7rem;
  font-weight: 820;
}

.orders-table td {
  height: 46px;
  color: var(--ink);
}

.orders-table td:nth-child(2) {
  min-width: 230px;
  white-space: normal;
}

.orders-table tbody tr {
  transition: background 140ms ease, box-shadow 140ms ease;
}

.orders-table tr.selected td {
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--panel));
}

.orders-table tr.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.order-primary-cell {
  display: grid;
  gap: 3px;
  align-content: center;
}

.order-id-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.order-id-line .order-link {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 820;
  text-decoration: none;
}

.order-id-line .order-link:hover {
  color: var(--accent);
}

.order-primary-meta {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 0 !important;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1;
}

.order-primary-meta .channel-logo,
.order-primary-meta .channel-logo-placeholder {
  width: 15px;
  height: 15px;
  border-radius: 5px;
  font-size: 0.58rem;
}

.order-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 6px;
  padding: 0 6px;
  background: color-mix(in srgb, var(--panel-subdued) 82%, var(--panel));
  color: var(--muted-strong);
  font-size: 0.66rem;
  font-weight: 820;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 140ms ease, transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.order-id-line:hover .order-detail-chip,
.order-id-line:focus-within .order-detail-chip {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.order-detail-chip:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--panel));
  color: var(--accent);
}

.order-detail-chip .app-icon {
  width: 13px;
  height: 13px;
}

.order-detail {
  position: sticky;
  top: 86px;
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 108px);
  min-height: 0;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius-md);
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 96%, var(--panel-subdued));
  box-shadow: 0 20px 54px rgba(16, 24, 40, 0.16);
  animation: orderPanelIn 160ms ease both;
}

@keyframes orderPanelIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.order-panel-head {
  align-items: center;
  margin: 0;
  padding-bottom: 10px;
}

.order-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.order-panel-head .muted {
  margin: 3px 0 0;
  font-size: 0.72rem;
}

.order-panel-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.order-panel-status-strip span,
.order-panel-money span {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 10px;
  padding: 8px;
  background: color-mix(in srgb, var(--panel-subdued) 78%, var(--panel));
}

.order-panel-status-strip small,
.order-panel-money small {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 820;
  text-transform: uppercase;
}

.order-panel-status-strip strong,
.order-panel-money strong {
  display: inline-flex;
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 820;
}

.order-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-panel-actions .button,
.order-panel-actions .status {
  min-height: 30px;
  padding-inline: 9px;
  font-size: 0.74rem;
}

.order-panel-section.detail-section {
  margin: 0;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 11px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel) 98%, var(--panel-subdued));
}

.order-panel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.order-panel-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 820;
  text-transform: none;
}

.order-panel-section-head span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 780;
}

.compact-detail-list {
  display: grid;
  grid-template-columns: minmax(86px, 0.42fr) minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
}

.compact-detail-list dt,
.compact-detail-list dd {
  margin: 0;
  line-height: 1.25;
}

.compact-detail-list dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 780;
}

.compact-detail-list dd {
  min-width: 0;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 680;
  overflow-wrap: anywhere;
}

.order-panel-timeline {
  display: grid;
  gap: 9px;
}

.order-panel-timeline div {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 0 8px;
  align-items: start;
}

.order-panel-timeline div::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: -9px;
  width: 1px;
  background: color-mix(in srgb, var(--line) 82%, transparent);
}

.order-panel-timeline div:last-child::before {
  display: none;
}

.order-panel-timeline span {
  grid-row: span 2;
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--success) 72%, var(--line));
  border-radius: 999px;
  background: var(--panel);
}

.order-panel-timeline strong {
  color: var(--ink);
  font-size: 0.76rem;
}

.order-panel-timeline small {
  color: var(--muted);
  font-size: 0.7rem;
}

.order-panel-timeline time {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.order-panel-items {
  display: grid;
  gap: 7px;
}

.order-panel-items div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px max-content;
  gap: 6px 8px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 9px;
  padding: 8px;
  background: color-mix(in srgb, var(--panel-subdued) 52%, var(--panel));
}

.order-panel-items strong,
.order-panel-items small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-panel-items strong {
  color: var(--ink);
  font-size: 0.76rem;
}

.order-panel-items small {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.68rem;
}

.order-panel-items span,
.order-panel-items b {
  grid-row: 1 / span 2;
  font-size: 0.76rem;
}

.order-panel-items span {
  grid-column: 2;
  color: var(--muted-strong);
  text-align: center;
}

.order-panel-items b {
  grid-column: 3;
  color: var(--ink);
}

.order-panel-money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

@media (max-width: 1180px) {
  .orders-workspace.detail-open {
    grid-template-columns: 1fr;
  }

  .order-detail {
    position: fixed;
    inset: 76px 16px 16px auto;
    z-index: 44;
    width: min(420px, calc(100vw - 32px));
    max-height: none;
  }
}

/* Nexora-inspired system revamp: dark, dense, table-first operating UI. */
:root {
  --bg: #eef2f6;
  --ink: #131820;
  --muted: #66717f;
  --muted-strong: #374151;
  --line: #d7dde6;
  --panel: #ffffff;
  --panel-subdued: #f6f8fb;
  --panel-hover: #eef3f8;
  --sidebar: #f7f9fc;
  --input-bg: #ffffff;
  --nav-active: #e9eef8;
  --accent: #7c5cff;
  --accent-strong: #6547ef;
  --accent-soft: #ece8ff;
  --success: #7ea13d;
  --warning: #d69b34;
  --danger: #e55f5f;
  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d0f;
  --ink: #eceff4;
  --muted: #818891;
  --muted-strong: #b3bac4;
  --line: #22272d;
  --panel: #111416;
  --panel-subdued: #15191d;
  --panel-hover: #1a1f24;
  --sidebar: #070809;
  --input-bg: #0d1012;
  --nav-active: #211b3a;
  --accent: #8f78ff;
  --accent-strong: #b5a7ff;
  --accent-soft: #211b3a;
  --success: #a0b35d;
  --warning: #d8aa44;
  --danger: #ef7777;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.32);
}

body {
  background:
    radial-gradient(circle at 20% -10%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 360px),
    var(--bg);
  font-size: 13px;
  letter-spacing: 0;
}

.shell {
  padding: 18px 20px 28px;
  background: transparent;
}

.topbar {
  min-height: 68px;
  margin: -18px -20px 18px;
  padding: 14px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: none;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 1.08rem;
  font-weight: 760;
  letter-spacing: 0;
}

.eyebrow,
.nav-section-label,
.selection-kicker,
.export-control-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar {
  width: 236px;
  padding: 13px 10px;
  border-right: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: var(--sidebar);
}

.shell {
  margin-left: 236px;
}

.brand {
  margin: -2px 0 12px;
  padding: 5px 4px 12px;
  border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--sidebar) 94%, transparent);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 30% 25%, #ff52cc, transparent 34%),
    radial-gradient(circle at 70% 70%, #45d6ff, transparent 34%),
    #22242a;
  color: #ffffff;
  font-size: 0.72rem;
}

:root[data-theme="dark"] .brand-mark {
  background:
    radial-gradient(circle at 30% 25%, #ff52cc, transparent 34%),
    radial-gradient(circle at 70% 70%, #45d6ff, transparent 34%),
    #22242a;
  color: #ffffff;
}

.brand strong {
  font-size: 0.86rem;
  font-weight: 760;
}

.brand small {
  color: var(--muted);
  font-size: 0.68rem;
}

.nav-item,
.nav-child {
  min-height: 31px;
  border-radius: 8px;
  padding: 6px 9px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 650;
}

.nav-item .app-icon,
.nav-child .app-icon {
  width: 14px;
  height: 14px;
  margin-right: 8px;
  color: var(--muted);
}

.nav-item.active,
.nav-child.active {
  background: var(--nav-active);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.nav-item:hover,
.nav-child:hover {
  background: color-mix(in srgb, var(--panel-hover) 74%, transparent);
  color: var(--ink);
}

.button,
button.button,
.subnav-item,
.order-queue-tab,
.status,
.pill,
.badge {
  border-radius: 999px;
}

.button,
button.button {
  min-height: 32px;
  padding: 0 12px;
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--panel-subdued) 68%, var(--panel));
  color: var(--ink);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 720;
}

.button.primary,
.button:not(.secondary):not(.danger) {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent);
  color: #ffffff;
}

.button.secondary {
  background: color-mix(in srgb, var(--panel-subdued) 78%, var(--panel));
}

.button:hover,
.subnav-item:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 64%, var(--panel));
  color: var(--accent-strong);
}

input,
select,
textarea {
  min-height: 32px;
  border-radius: 9px;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: var(--input-bg);
  color: var(--ink);
  font-size: 0.8rem;
}

.toolbar,
.orders-command,
.catalog-toolbar,
.catalog-filter-panel,
.catalog-selection-toolbar.product-export-bar,
.catalog-source-summary.product-page-summary,
.product-catalog-table-tools,
.bulk-bar,
.order-queue-tabs {
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 92%, var(--panel-subdued));
  box-shadow: var(--shadow-soft);
}

.legacy-filter-controls {
  display: none !important;
}

.catalog-hidden-inputs {
  display: none;
}

.smart-filter-bar {
  position: relative;
  z-index: 35;
  display: grid;
  grid-template-columns: minmax(260px, 360px) auto minmax(220px, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 92%, var(--panel-subdued));
  box-shadow: var(--shadow-soft);
}

.smart-filter-search-wrap {
  position: relative;
  min-width: 0;
}

.smart-filter-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--input-bg);
}

.smart-filter-search.has-command {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 58%, transparent);
}

.smart-filter-search.has-draft:not(.has-command) {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

.smart-filter-search .app-icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.smart-filter-search input {
  min-height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.smart-search-apply {
  min-height: 24px;
  border: 0;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}

.smart-search-apply:disabled {
  opacity: 0;
  pointer-events: none;
}

.smart-search-suggestions {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  width: min(420px, 100vw - 36px);
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-strong);
  padding: 8px;
}

.smart-search-suggestion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.smart-search-suggestion-head strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.smart-search-suggestion-list {
  display: grid;
  gap: 3px;
}

.smart-search-suggestion-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 31px;
  border: 0;
  border-radius: 8px;
  padding: 5px 7px;
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
}

.smart-search-suggestion-list button:hover {
  background: color-mix(in srgb, var(--accent-soft) 58%, transparent);
  color: var(--accent-strong);
}

.smart-search-suggestion-list button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-search-suggestion-list button small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 720;
}

.smart-filter-chip-row,
.smart-filter-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.smart-filter-actions {
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.smart-filter-chip-row {
  justify-content: flex-start;
}

.smart-filter-chip,
.smart-filter-suggestion,
.smart-filter-empty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 0.73rem;
  font-weight: 760;
  white-space: nowrap;
}

.smart-filter-chip {
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 62%, var(--panel));
  color: var(--accent);
}

.smart-filter-chip strong {
  font-size: 0.78rem;
  color: currentColor;
}

.smart-filter-suggestion {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--panel-subdued) 70%, var(--panel));
  color: var(--muted-strong);
}

.smart-filter-empty {
  color: var(--muted);
  background: transparent;
  padding-inline: 0;
}

.smart-filter-menu {
  position: relative;
}

.smart-filter-menu.open {
  z-index: 120;
}

.smart-saved-filter-menu {
  position: relative;
}

.smart-saved-filter-popover {
  min-width: 205px;
}

.smart-filter-popover {
  top: calc(100% + 8px);
  right: auto;
  left: 0;
  z-index: 120;
  width: min(380px, calc(100vw - 32px));
  max-height: min(70vh, 620px);
  min-width: min(320px, calc(100vw - 32px));
  overflow: auto;
  padding: 10px;
  display: none;
  gap: 8px;
}

.smart-filter-menu.open .smart-filter-popover {
  display: grid;
}

.smart-filter-popover label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.smart-filter-value-picker {
  display: grid;
  gap: 7px;
}

.smart-filter-number-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.smart-filter-number-values input:only-child {
  grid-column: 1 / -1;
}

.smart-filter-value-search {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 9px;
  padding: 0 8px;
  background: var(--input-bg);
}

.smart-filter-value-search .app-icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.smart-filter-value-search input {
  min-height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.smart-filter-value-list {
  display: grid;
  gap: 2px;
  max-height: 210px;
  overflow: auto;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-subdued) 58%, var(--panel));
}

.smart-filter-value-option {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  align-items: center;
  gap: 8px !important;
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 7px;
  color: var(--ink) !important;
  font-size: 0.76rem !important;
  font-weight: 650 !important;
  cursor: pointer;
}

.smart-filter-value-option:hover {
  background: color-mix(in srgb, var(--accent-soft) 54%, transparent);
}

.smart-filter-value-option input {
  min-height: 0;
  width: 14px;
  height: 14px;
  margin: 0;
}

.smart-filter-value-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-filter-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.smart-filter-popover-actions button {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
}

.smart-filter-popover-actions .primary-action {
  background: var(--accent);
  color: #fff;
}

#customer-smart-filters {
  flex: 1 1 100%;
}

#customers #customer-search {
  display: none;
}

@media (max-width: 1180px) {
  .smart-filter-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .smart-filter-actions {
    justify-content: flex-start;
  }
}

.metric,
.stat-card,
.panel,
.full-card,
.shopify-card,
.product-section-card,
.product-image-panel,
.product-panel,
.order-detail,
.product-detail,
.orders-table-wrap,
.catalog-table-wrap,
.customer-table-wrap,
.vendor-table-wrap,
.brand-table-wrap,
.po-table-wrap,
.modal-card {
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 96%, var(--panel-subdued));
  box-shadow: var(--shadow-soft);
}

.metric,
.stat-card {
  padding: 12px;
}

.metric strong,
.stat-card strong {
  color: var(--ink);
  font-size: 1.28rem;
  font-weight: 740;
}

.metric span,
.stat-card span,
.metric small,
.stat-card small {
  color: var(--muted);
  font-size: 0.7rem;
}

table,
.orders-table,
.catalog-table,
.customer-table,
.po-table,
.vendor-table,
.brand-table,
.data-table {
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  font-size: 0.83rem;
}

th,
.orders-table th,
.catalog-table th,
.data-table th {
  height: 34px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--panel-subdued) 74%, var(--panel));
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

td,
.orders-table td,
.catalog-table td,
.data-table td {
  height: 44px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  color: var(--ink);
}

th,
td,
.orders-table th,
.orders-table td,
.catalog-table th,
.catalog-table td,
.data-table th,
.data-table td {
  padding: 7px 10px;
}

tbody tr:hover td,
.orders-table tbody tr:hover td,
.catalog-table tbody tr:hover td,
.data-table tbody tr:hover td {
  background: color-mix(in srgb, var(--panel-hover) 86%, var(--panel));
}

.orders-table-wrap,
.catalog-table-wrap,
.product-catalog-table-wrap {
  border-radius: 14px;
  overflow: auto;
}

.orders-table tr.selected td,
.catalog-table tr.selected td {
  background: color-mix(in srgb, var(--accent-soft) 62%, var(--panel));
}

.order-link,
.product-name-link,
.customer-name-link {
  color: var(--ink);
  font-weight: 780;
  text-decoration: none;
}

.order-link:hover,
.product-name-link:hover,
.customer-name-link:hover {
  color: var(--accent-strong);
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
  min-height: 22px;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

.table-sort-button span {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font-size: 0.68rem;
  line-height: 1;
}

.table-sort-button:hover {
  color: var(--ink);
}

.table-sort-button:hover span,
.table-sort-button.active span {
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--panel));
  color: var(--accent-strong);
}

.table-sort-button.active {
  color: var(--ink);
}

.status {
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--panel-subdued) 72%, var(--panel));
  color: var(--muted-strong);
  font-size: 0.66rem;
  font-weight: 760;
}

.status.confirmed,
.status.active,
.status.ready,
.readiness-pill.ready {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  background: color-mix(in srgb, var(--success) 22%, var(--panel));
  color: color-mix(in srgb, var(--success) 86%, var(--ink));
}

.status.hold,
.status.pending,
.status.draft {
  border-color: color-mix(in srgb, var(--warning) 42%, var(--line));
  background: color-mix(in srgb, var(--warning) 18%, var(--panel));
  color: color-mix(in srgb, var(--warning) 86%, var(--ink));
}

.status.canceled,
.status.danger,
.danger {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  background: color-mix(in srgb, var(--danger) 18%, var(--panel));
  color: color-mix(in srgb, var(--danger) 88%, var(--ink));
}

.action-popover {
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 98%, var(--panel-subdued));
  box-shadow: var(--shadow);
}

.action-popover button,
.action-popover a {
  min-height: 30px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.78rem;
}

.order-detail {
  background: color-mix(in srgb, var(--panel) 96%, #000000);
}

.order-panel-status-strip span,
.order-panel-money span,
.order-panel-section.detail-section,
.order-panel-items div {
  border-color: color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--panel-subdued) 80%, var(--panel));
}

body.sidebar-collapsed .sidebar {
  width: 64px;
}

body.sidebar-collapsed .shell {
  margin-left: 64px;
}

@media (max-width: 980px) {
  .sidebar,
  body.sidebar-collapsed .sidebar {
    width: 64px;
  }

  .shell,
  body.sidebar-collapsed .shell {
    margin-left: 64px;
    padding-inline: 12px;
  }
}

/* Visual hierarchy layer: clearer section color coding across the app */
:root {
  --module-blue: #0a84ff;
  --module-indigo: #5856d6;
  --module-purple: #7c5cff;
  --module-teal: #00a47c;
  --module-green: #30a46c;
  --module-amber: #f59e0b;
  --module-rose: #e11d48;
  --module-sky-soft: #e8f2ff;
  --module-indigo-soft: #eeedff;
  --module-purple-soft: #f0ebff;
  --module-teal-soft: #e4f7f1;
  --module-green-soft: #e8f7ee;
  --module-amber-soft: #fff4d6;
  --module-rose-soft: #ffe8ee;
}

:root[data-theme="dark"] {
  --module-sky-soft: #102b4c;
  --module-indigo-soft: #1d1b43;
  --module-purple-soft: #211b3a;
  --module-teal-soft: #10362d;
  --module-green-soft: #102d20;
  --module-amber-soft: #39260a;
  --module-rose-soft: #3a111d;
}

.shell-header {
  border-bottom-color: color-mix(in srgb, var(--line) 72%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--module-sky-soft) 72%, transparent), color-mix(in srgb, var(--module-purple-soft) 48%, transparent) 52%, color-mix(in srgb, var(--module-teal-soft) 54%, transparent)),
    color-mix(in srgb, var(--bg) 88%, var(--panel));
}

#page-title,
.detail-head h2,
.category-detail-head h2,
.order-panel-head h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#page-title::before,
.detail-head h2::before,
.category-detail-head h2::before,
.order-panel-head h2::before {
  content: "";
  width: 8px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--module-blue), var(--module-purple));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--module-blue) 22%, transparent);
}

.section-head,
.product-section-head,
.order-panel-section-head,
.source-manager-section-head,
.channel-settings-head,
.manual-order-section-head,
.vendor-section-head,
.category-coverage-head,
.category-table-head,
.category-list-head,
.category-detail-head {
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--module-blue) 16%, var(--line));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--module-sky-soft) 82%, var(--panel)), color-mix(in srgb, var(--panel) 94%, transparent)),
    var(--panel);
  padding: 10px 12px;
}

.section-head h3,
.product-section-head h3,
.order-panel-section-head h3,
.source-manager-section-head strong,
.vendor-section-head h3,
.category-coverage-head h3,
.category-table-head strong,
.category-list-head strong,
.category-settings-card h3,
.category-map-card h4 {
  color: color-mix(in srgb, var(--ink) 90%, var(--module-indigo));
}

.full-card > h3,
.full-card > h4,
.category-settings-card > h3,
.category-map-card > h4 {
  margin: -2px -2px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--module-indigo-soft) 86%, var(--panel)), color-mix(in srgb, var(--panel) 96%, transparent));
  padding: 9px 10px;
}

.full-card,
.category-settings-card,
.category-map-card,
.category-coverage,
.category-table-shell,
.category-detail-page,
.category-list-panel {
  border-color: color-mix(in srgb, var(--line) 72%, transparent);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 10px 24px rgba(16, 24, 40, 0.07);
}

.category-coverage {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--module-sky-soft) 56%, var(--panel)) 0, var(--panel) 88px),
    var(--panel);
}

.category-coverage-grid span:nth-child(6n + 1) {
  border-color: color-mix(in srgb, var(--module-blue) 22%, var(--line));
  background: color-mix(in srgb, var(--module-sky-soft) 58%, var(--panel));
}

.category-coverage-grid span:nth-child(6n + 2) {
  border-color: color-mix(in srgb, var(--module-purple) 22%, var(--line));
  background: color-mix(in srgb, var(--module-purple-soft) 58%, var(--panel));
}

.category-coverage-grid span:nth-child(6n + 3) {
  border-color: color-mix(in srgb, var(--module-teal) 22%, var(--line));
  background: color-mix(in srgb, var(--module-teal-soft) 58%, var(--panel));
}

.category-coverage-grid span:nth-child(6n + 4) {
  border-color: color-mix(in srgb, var(--module-amber) 24%, var(--line));
  background: color-mix(in srgb, var(--module-amber-soft) 58%, var(--panel));
}

.category-coverage-grid span:nth-child(6n + 5) {
  border-color: color-mix(in srgb, var(--module-green) 22%, var(--line));
  background: color-mix(in srgb, var(--module-green-soft) 58%, var(--panel));
}

.category-coverage-grid span:nth-child(6n + 6) {
  border-color: color-mix(in srgb, var(--module-rose) 18%, var(--line));
  background: color-mix(in srgb, var(--module-rose-soft) 48%, var(--panel));
}

.category-settings-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--module-teal-soft) 42%, transparent), transparent 120px),
    var(--panel);
}

.category-settings-card:nth-of-type(2n) {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--module-indigo-soft) 44%, transparent), transparent 120px),
    var(--panel);
}

.category-map-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--module-purple-soft) 44%, transparent), transparent 130px),
    var(--panel);
}

.category-map-card .section-head,
.shopify-mapped-attributes .section-head,
.smart-collection-profile .section-head {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--module-purple-soft) 82%, var(--panel)), color-mix(in srgb, var(--panel) 95%, transparent)),
    var(--panel);
  border-color: color-mix(in srgb, var(--module-purple) 18%, var(--line));
}

.category-channel-tabs {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--module-sky-soft) 64%, var(--panel)), color-mix(in srgb, var(--module-teal-soft) 48%, var(--panel)));
}

.category-subtabs {
  background: color-mix(in srgb, var(--module-purple-soft) 58%, var(--panel));
}

.category-channel-tabs button.active,
.category-subtabs button.active,
.category-scope-tabs button.active {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1), inset 0 -2px 0 color-mix(in srgb, var(--module-purple) 76%, transparent);
}

.category-table-head,
.category-list-head {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--module-indigo-soft) 74%, var(--panel)), color-mix(in srgb, var(--panel) 95%, transparent)),
    var(--panel);
}

th,
.orders-table th,
.catalog-table th,
.data-table th {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--module-sky-soft) 54%, var(--panel)), color-mix(in srgb, var(--panel-subdued) 86%, var(--panel)));
  color: color-mix(in srgb, var(--muted-strong) 86%, var(--module-indigo));
}

.metric:nth-of-type(4n + 1),
.stat-card:nth-of-type(4n + 1) {
  background: color-mix(in srgb, var(--module-sky-soft) 58%, var(--panel));
}

.metric:nth-of-type(4n + 2),
.stat-card:nth-of-type(4n + 2) {
  background: color-mix(in srgb, var(--module-teal-soft) 54%, var(--panel));
}

.metric:nth-of-type(4n + 3),
.stat-card:nth-of-type(4n + 3) {
  background: color-mix(in srgb, var(--module-amber-soft) 48%, var(--panel));
}

.metric:nth-of-type(4n + 4),
.stat-card:nth-of-type(4n + 4) {
  background: color-mix(in srgb, var(--module-purple-soft) 54%, var(--panel));
}

/* Apple-inspired liquid glass treatment: depth without sacrificing dense data readability */
:root {
  --glass-bg: color-mix(in srgb, var(--panel) 72%, transparent);
  --glass-bg-strong: color-mix(in srgb, var(--panel) 86%, transparent);
  --glass-bg-soft: color-mix(in srgb, var(--panel-subdued) 62%, transparent);
  --glass-stroke: color-mix(in srgb, #ffffff 58%, var(--line));
  --glass-stroke-strong: color-mix(in srgb, #ffffff 72%, var(--line));
  --glass-shadow: 0 18px 42px rgba(16, 24, 40, 0.12), 0 5px 14px rgba(16, 24, 40, 0.08);
  --glass-shadow-soft: 0 10px 26px rgba(16, 24, 40, 0.09), 0 2px 8px rgba(16, 24, 40, 0.06);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.72), inset 0 -1px 0 rgba(255, 255, 255, 0.22);
}

:root[data-theme="dark"] {
  --glass-bg: color-mix(in srgb, var(--panel) 78%, transparent);
  --glass-bg-strong: color-mix(in srgb, var(--panel) 90%, transparent);
  --glass-bg-soft: color-mix(in srgb, var(--panel-subdued) 72%, transparent);
  --glass-stroke: color-mix(in srgb, #ffffff 16%, var(--line));
  --glass-stroke-strong: color-mix(in srgb, #ffffff 24%, var(--line));
  --glass-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 5px 14px rgba(0, 0, 0, 0.22);
  --glass-shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.26), 0 2px 8px rgba(0, 0, 0, 0.2);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

body {
  background:
    radial-gradient(circle at 16% -8%, color-mix(in srgb, var(--module-blue) 12%, transparent), transparent 340px),
    radial-gradient(circle at 88% 0%, color-mix(in srgb, var(--module-purple) 10%, transparent), transparent 360px),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, var(--panel)) 0, var(--bg) 300px),
    var(--bg);
}

.sidebar,
.shell-header,
.catalog-tabs,
.category-coverage,
.category-table-shell,
.category-detail-page,
.category-list-panel,
.category-settings-card,
.category-map-card,
.full-card,
.metric,
.stat-card,
.panel,
.shopify-card,
.product-section-card,
.product-image-panel,
.product-panel,
.order-detail,
.product-detail,
.orders-table-wrap,
.catalog-table-wrap,
.customer-table-wrap,
.vendor-table-wrap,
.brand-table-wrap,
.po-table-wrap,
.modal-card,
.action-popover,
.smart-filter-popover,
.smart-filter-bar,
.matrixify-readiness,
.smart-collection-profile,
.shopify-mapped-attributes {
  border-color: var(--glass-stroke);
  background-color: var(--glass-bg-strong);
  box-shadow: var(--glass-highlight), var(--glass-shadow-soft);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar,
  .shell-header,
  .catalog-tabs,
  .category-coverage,
  .category-table-shell,
  .category-detail-page,
  .category-list-panel,
  .category-settings-card,
  .category-map-card,
  .full-card,
  .metric,
  .stat-card,
  .panel,
  .shopify-card,
  .product-section-card,
  .product-image-panel,
  .product-panel,
  .order-detail,
  .product-detail,
  .modal-card,
  .action-popover,
  .smart-filter-popover,
  .smart-filter-bar,
  .matrixify-readiness,
  .smart-collection-profile,
  .shopify-mapped-attributes {
    background-color: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(1.22);
    backdrop-filter: blur(20px) saturate(1.22);
  }

  .orders-table-wrap,
  .catalog-table-wrap,
  .customer-table-wrap,
  .vendor-table-wrap,
  .brand-table-wrap,
  .po-table-wrap {
    background-color: color-mix(in srgb, var(--panel) 92%, transparent);
    -webkit-backdrop-filter: blur(12px) saturate(1.08);
    backdrop-filter: blur(12px) saturate(1.08);
  }
}

.shell-header {
  box-shadow: var(--glass-highlight), 0 12px 30px rgba(16, 24, 40, 0.08);
}

.sidebar {
  box-shadow: inset -1px 0 0 var(--glass-stroke), 10px 0 28px rgba(16, 24, 40, 0.06);
}

.section-head,
.product-section-head,
.order-panel-section-head,
.source-manager-section-head,
.channel-settings-head,
.manual-order-section-head,
.vendor-section-head,
.category-coverage-head,
.category-table-head,
.category-list-head,
.category-detail-head {
  border-color: var(--glass-stroke-strong);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.64), color-mix(in srgb, var(--module-sky-soft) 64%, transparent) 46%, color-mix(in srgb, var(--module-purple-soft) 38%, transparent)),
    var(--glass-bg-soft);
  box-shadow: var(--glass-highlight), 0 8px 22px rgba(16, 24, 40, 0.055);
}

:root[data-theme="dark"] .section-head,
:root[data-theme="dark"] .product-section-head,
:root[data-theme="dark"] .order-panel-section-head,
:root[data-theme="dark"] .source-manager-section-head,
:root[data-theme="dark"] .channel-settings-head,
:root[data-theme="dark"] .manual-order-section-head,
:root[data-theme="dark"] .vendor-section-head,
:root[data-theme="dark"] .category-coverage-head,
:root[data-theme="dark"] .category-table-head,
:root[data-theme="dark"] .category-list-head,
:root[data-theme="dark"] .category-detail-head {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.06), color-mix(in srgb, var(--module-sky-soft) 50%, transparent) 46%, color-mix(in srgb, var(--module-purple-soft) 44%, transparent)),
    var(--glass-bg-soft);
}

.category-coverage-grid span,
.attribute-taxonomy-context span,
.pricing-value-card,
.pricing-feedback div,
.shopify-price-compare article,
.matrixify-readiness span,
.system-fields-summary span,
.channel-attribute-summary span {
  border-color: var(--glass-stroke);
  box-shadow: var(--glass-highlight), 0 4px 12px rgba(16, 24, 40, 0.045);
}

.category-channel-tabs,
.category-subtabs,
.category-scope-tabs,
.product-editor-page .product-workspace-tabs {
  border-color: var(--glass-stroke);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.54), color-mix(in srgb, var(--module-indigo-soft) 48%, transparent), color-mix(in srgb, var(--module-teal-soft) 34%, transparent)),
    var(--glass-bg-soft);
  box-shadow: var(--glass-highlight), 0 8px 20px rgba(16, 24, 40, 0.06);
}

.category-channel-tabs button.active,
.category-subtabs button.active,
.category-scope-tabs button.active,
.catalog-tabs button.active,
.product-editor-page .product-workspace-tabs button.active {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border-color: var(--glass-stroke-strong);
  box-shadow: var(--glass-highlight), 0 8px 18px rgba(16, 24, 40, 0.09), inset 0 -2px 0 color-mix(in srgb, var(--module-purple) 74%, transparent);
}

.button,
.file-button,
.floating-action,
.primary-action {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 24px color-mix(in srgb, var(--accent) 24%, transparent);
}

.secondary,
.button.secondary,
.file-button.secondary,
.coverage-actions a,
.category-view-skus-link,
.category-row-actions button {
  border-color: var(--glass-stroke);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  box-shadow: var(--glass-highlight), 0 4px 12px rgba(16, 24, 40, 0.045);
}

th,
.orders-table th,
.catalog-table th,
.data-table th {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

td,
.orders-table td,
.catalog-table td,
.data-table td {
  background: color-mix(in srgb, var(--panel) 97%, transparent);
}

/* iPad-style sidebar polish and thin scroll rails */
:root {
  --sidebar-float-width: 284px;
  --sidebar-float-gap: 16px;
  --sidebar-radius: 26px;
  --scrollbar-size: 6px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 28%, transparent) transparent;
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 24%, transparent);
}

*::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--muted) 42%, transparent);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

.sidebar {
  top: var(--sidebar-float-gap);
  left: var(--sidebar-float-gap);
  bottom: var(--sidebar-float-gap);
  width: var(--sidebar-float-width);
  height: auto;
  padding: 22px 20px 22px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: var(--sidebar-radius);
  background: color-mix(in srgb, var(--sidebar) 88%, var(--panel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

:root[data-theme="dark"] .sidebar {
  background: color-mix(in srgb, var(--sidebar) 92%, var(--panel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.shell {
  margin-left: calc(var(--sidebar-float-width) + (var(--sidebar-float-gap) * 2));
}

.brand {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  column-gap: 13px;
  row-gap: 0;
  margin: 0 0 18px;
  padding: 4px 0 10px;
  border-bottom: 0;
  background: transparent;
}

.brand-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-top: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background:
    linear-gradient(135deg, #061a3d 0 48%, #ffffff 49% 53%, #061a3d 54% 100%);
  color: transparent;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 12px 26px rgba(6, 26, 61, 0.2);
}

.brand strong {
  color: #081a34;
  font-size: 1.34rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
}

.brand small {
  display: none;
  margin-top: 5px;
  color: color-mix(in srgb, var(--muted) 84%, var(--ink));
  font-size: 0.78rem;
  font-weight: 640;
  letter-spacing: 0;
}

.brand-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: fit-content;
  gap: 4px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--glass-stroke) 82%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 42%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

:root[data-theme="dark"] .brand strong {
  color: var(--ink);
}

.menu-expand {
  width: 27px;
  min-width: 27px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #081a34;
  box-shadow: none;
}

.menu-expand:hover {
  border-color: var(--glass-stroke);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--accent-strong);
}

nav,
.nav-group {
  gap: 5px;
}

.nav-section-label {
  margin: 18px 4px 8px;
  color: #081a34;
  font-size: 0.94rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

.nav-section-label:first-of-type {
  margin-top: 0;
}

.nav-item,
.nav-child {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 8px 11px;
  background: transparent;
  color: #0d1b2f;
  font-size: 0.9rem;
  font-weight: 680;
  line-height: 1.15;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.nav-item .app-icon,
.nav-child .app-icon {
  width: 18px;
  height: 18px;
  margin-right: 11px;
  color: #0d1b2f;
  stroke-width: 2;
}

.nav-item:hover,
.nav-child:hover {
  border-color: color-mix(in srgb, var(--glass-stroke) 72%, transparent);
  background: rgba(255, 255, 255, 0.46);
  color: #061a3d;
}

.nav-item.active,
.nav-child.active {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--glass-stroke));
  background: color-mix(in srgb, var(--accent-soft) 48%, rgba(255, 255, 255, 0.68));
  color: #061a3d;
  box-shadow:
    inset 4px 0 0 var(--accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 10px 24px rgba(10, 132, 255, 0.08);
}

.nav-item.active .app-icon,
.nav-child.active .app-icon {
  color: var(--accent);
}

.nav-child {
  margin-left: 15px;
  padding-left: 15px;
  border-left: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  color: color-mix(in srgb, #0d1b2f 76%, var(--muted));
  font-size: 0.84rem;
}

.nav-child .app-icon {
  width: 17px;
  height: 17px;
}

:root[data-theme="dark"] .nav-section-label,
:root[data-theme="dark"] .nav-item,
:root[data-theme="dark"] .nav-child,
:root[data-theme="dark"] .nav-item .app-icon,
:root[data-theme="dark"] .nav-child .app-icon,
:root[data-theme="dark"] .menu-expand {
  color: var(--ink);
}

:root[data-theme="dark"] .nav-child {
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
}

:root[data-theme="dark"] .nav-item:hover,
:root[data-theme="dark"] .nav-child:hover {
  background: rgba(255, 255, 255, 0.07);
}

:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .nav-child.active {
  background: color-mix(in srgb, var(--accent-soft) 48%, rgba(255, 255, 255, 0.08));
  color: var(--ink);
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 18%, transparent);
}

.orders-table-wrap::-webkit-scrollbar,
.catalog-table-wrap::-webkit-scrollbar,
.product-catalog-table-wrap::-webkit-scrollbar,
.category-table-wrap::-webkit-scrollbar,
.category-list-scroll::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

body.sidebar-collapsed .sidebar {
  width: 72px;
  padding: 22px 12px;
  border-radius: 24px;
}

body.sidebar-collapsed .shell {
  margin-left: calc(72px + (var(--sidebar-float-gap) * 2));
}

body.sidebar-collapsed .brand {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
}

body.sidebar-collapsed .brand > .brand-main {
  display: grid !important;
  justify-items: center;
  padding-top: 0;
}

body.sidebar-collapsed .brand > .brand-main strong,
body.sidebar-collapsed #menu-expand-toggle {
  display: none;
}

body.sidebar-collapsed .brand > .brand-main .brand-actions {
  display: inline-flex;
  padding: 3px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.sidebar-collapsed .sidebar-collapse-toggle {
  display: inline-flex !important;
}

body.sidebar-collapsed .brand-mark {
  width: 44px;
  height: 44px;
}

@media (max-width: 980px) {
  :root {
    --sidebar-float-gap: 10px;
  }

  .sidebar,
  body.sidebar-collapsed .sidebar {
    width: 72px;
    padding: 18px 10px;
    border-radius: 22px;
  }

  .shell,
  body.sidebar-collapsed .shell {
    margin-left: calc(72px + (var(--sidebar-float-gap) * 2));
  }
}

/* Shared page header and tab polish */
.subnav,
.product-editor-page .product-workspace-tabs,
.product-workspace-tabs,
.order-queue-tabs,
.catalog-tabs,
.category-scope-tabs,
.category-channel-tabs,
.category-subtabs,
.vendor-profile-tabs,
.vendor-settings-subtabs {
  --header-scroll-fade: 20px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  max-width: 100%;
  min-height: 34px;
  margin: 0 0 10px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-subdued) 78%, var(--panel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 35%, transparent) transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 16px 0 14px -18px color-mix(in srgb, var(--accent) 48%, transparent),
    inset -16px 0 14px -18px color-mix(in srgb, var(--accent) 48%, transparent);
  touch-action: pan-x;
  cursor: grab;
}

.subnav:active,
.product-editor-page .product-workspace-tabs:active,
.product-workspace-tabs:active,
.order-queue-tabs:active,
.catalog-tabs:active,
.category-scope-tabs:active,
.category-channel-tabs:active,
.category-subtabs:active,
.vendor-profile-tabs:active,
.vendor-settings-subtabs:active {
  cursor: grabbing;
}

.subnav::-webkit-scrollbar,
.product-workspace-tabs::-webkit-scrollbar,
.order-queue-tabs::-webkit-scrollbar,
.catalog-tabs::-webkit-scrollbar,
.category-scope-tabs::-webkit-scrollbar,
.category-channel-tabs::-webkit-scrollbar,
.category-subtabs::-webkit-scrollbar,
.vendor-profile-tabs::-webkit-scrollbar,
.vendor-settings-subtabs::-webkit-scrollbar {
  height: 4px;
}

.subnav::-webkit-scrollbar-track,
.product-workspace-tabs::-webkit-scrollbar-track,
.order-queue-tabs::-webkit-scrollbar-track,
.catalog-tabs::-webkit-scrollbar-track,
.category-scope-tabs::-webkit-scrollbar-track,
.category-channel-tabs::-webkit-scrollbar-track,
.category-subtabs::-webkit-scrollbar-track,
.vendor-profile-tabs::-webkit-scrollbar-track,
.vendor-settings-subtabs::-webkit-scrollbar-track {
  background: transparent;
}

.subnav::-webkit-scrollbar-thumb,
.product-workspace-tabs::-webkit-scrollbar-thumb,
.order-queue-tabs::-webkit-scrollbar-thumb,
.catalog-tabs::-webkit-scrollbar-thumb,
.category-scope-tabs::-webkit-scrollbar-thumb,
.category-channel-tabs::-webkit-scrollbar-thumb,
.category-subtabs::-webkit-scrollbar-thumb,
.vendor-profile-tabs::-webkit-scrollbar-thumb,
.vendor-settings-subtabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 32%, transparent);
}

.subnav:hover::-webkit-scrollbar-thumb,
.product-workspace-tabs:hover::-webkit-scrollbar-thumb,
.order-queue-tabs:hover::-webkit-scrollbar-thumb,
.catalog-tabs:hover::-webkit-scrollbar-thumb,
.category-scope-tabs:hover::-webkit-scrollbar-thumb,
.category-channel-tabs:hover::-webkit-scrollbar-thumb,
.category-subtabs:hover::-webkit-scrollbar-thumb,
.vendor-profile-tabs:hover::-webkit-scrollbar-thumb,
.vendor-settings-subtabs:hover::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 48%, transparent);
}

.subnav-item,
.product-editor-page .product-workspace-tab,
.product-workspace-tab,
.order-queue-tab,
.catalog-tabs button,
.category-scope-tabs button,
.category-channel-tabs button,
.category-subtabs button,
.vendor-profile-tab,
.vendor-settings-subtab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 999px !important;
  padding: 0 9px;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
  font-size: 0.76rem;
  font-weight: 720;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: none;
  text-transform: none;
}

.subnav-item .app-icon,
.product-workspace-tab .app-icon,
.order-queue-tab .app-icon,
.order-queue-tab svg,
.vendor-setting-icon .app-icon,
.button .app-icon,
.text-button .app-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  stroke-width: 2;
  vertical-align: middle;
}

.subnav-item.active,
.product-editor-page .product-workspace-tab.active,
.product-workspace-tab.active,
.catalog-tabs button.active,
.category-scope-tabs button.active,
.category-channel-tabs button.active,
.category-subtabs button.active,
.vendor-profile-tab.active,
.vendor-settings-subtab.active {
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.order-queue-tab.active {
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
}

.subnav-item:hover,
.product-editor-page .product-workspace-tab:hover,
.product-workspace-tab:hover,
.catalog-tabs button:hover,
.category-scope-tabs button:hover,
.category-channel-tabs button:hover,
.category-subtabs button:hover,
.vendor-profile-tab:hover,
.vendor-settings-subtab:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  transform: none;
}

.subnav-item.active .app-icon,
.product-workspace-tab.active .app-icon,
.vendor-profile-tab.active .app-icon,
.vendor-settings-subtab.active .app-icon {
  color: var(--accent);
}

.category-channel-tabs button small {
  display: inline;
  margin-left: 4px;
  font-size: 0.68rem;
  line-height: 1;
}

.toolbar,
.catalog-filters,
.smart-filter-bar {
  min-height: 44px;
  border-radius: 8px;
}

.toolbar {
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: none;
}

.toolbar input[type="search"],
.smart-filter-search input,
.smart-filter-value-search input {
  font-size: 0.82rem;
  font-weight: 560;
}

.catalog-table-tools,
.product-catalog-table-tools,
.source-catalog-table-tools {
  align-items: center;
  min-height: 40px;
  padding-block: 5px;
}

.catalog-table-status strong,
.product-catalog-table-tools strong {
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.1;
}

.catalog-table-status small,
.product-catalog-table-tools small {
  font-size: 0.72rem;
  font-weight: 620;
}

.product-editor-page .product-workspace-head {
  align-items: center;
  min-height: 58px;
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: none;
}

.product-editor-page .product-workspace-title {
  align-items: center;
  gap: 12px;
}

.product-editor-page .product-workspace-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 760;
  line-height: 1.2;
}

.product-editor-page .text-button[data-view-jump="catalog"] {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 740;
  white-space: nowrap;
}

.product-editor-page .product-workspace-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-top: 4px;
  max-width: 100%;
  overflow-x: auto;
  scroll-padding-inline: 8px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 30%, transparent) transparent;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
}

.product-editor-page .product-workspace-chips::-webkit-scrollbar {
  height: 3px;
}

.product-editor-page .product-workspace-chips::-webkit-scrollbar-track {
  background: transparent;
}

.product-editor-page .product-workspace-chips::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.product-editor-page .product-workspace-chips > span,
.product-editor-page .status {
  flex: 0 0 auto;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 760;
  line-height: 1.1;
}

.product-editor-page .product-editor-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  max-width: 100%;
  overflow-x: auto;
  scroll-padding-inline: 8px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 28%, transparent) transparent;
}

.product-editor-page .product-editor-actions::-webkit-scrollbar {
  height: 3px;
}

.product-editor-page .product-editor-actions::-webkit-scrollbar-track {
  background: transparent;
}

.product-editor-page .product-editor-actions::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.product-editor-page .product-editor-actions .button {
  min-height: 32px;
  padding: 0 11px;
  font-size: 0.78rem;
  font-weight: 740;
}

.product-editor-page .product-workspace-tabs {
  position: sticky;
  top: 0;
  z-index: 7;
  margin-bottom: 10px;
}

.product-editor-page .product-section-title,
.section-head,
.product-section-head {
  min-height: 34px;
}

.product-editor-page .product-section-title strong,
.section-head h3,
.product-section-head h3 {
  font-size: 0.82rem;
  font-weight: 760;
}

@media (min-width: 760px) {
  .product-editor-page .product-workspace-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .product-editor-page .product-workspace-title {
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .product-editor-page .product-workspace-title > div {
    min-width: 0;
  }

  .product-editor-page .product-editor-actions {
    justify-content: flex-end;
    padding-bottom: 0;
  }
}

@media (max-width: 759px) {
  .product-editor-page .product-workspace-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .product-editor-page .product-editor-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  .sidebar,
  body.sidebar-collapsed .sidebar {
    width: 72px;
    padding: 18px 10px;
    border-radius: 22px;
  }

  .shell,
  body.sidebar-collapsed .shell {
    margin-left: calc(72px + (var(--sidebar-float-gap) * 2));
    padding-inline: 12px;
  }

  .topbar {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .brand {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }

  .brand > .brand-main,
  .brand > .brand-main strong,
  .nav-section-label,
  .nav-item span,
  .nav-child span,
  #menu-expand-toggle {
    display: none;
  }

  .sidebar-collapse-toggle {
    display: inline-flex !important;
  }

  nav[aria-label="Primary"] {
    align-items: center;
  }

  .nav-group,
  .nav-item,
  .nav-child {
    width: 44px;
  }

  .nav-item,
  .nav-child {
    justify-content: center;
    padding: 10px;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
  }

  .nav-child {
    margin-left: 0;
    border-left: 0;
  }

  .nav-children {
    justify-items: center;
  }

  .nav-item .app-icon,
  .nav-child .app-icon {
    width: 19px;
    height: 19px;
  }

  .nav-item:hover,
  .nav-child:hover,
  .nav-item.active,
  .nav-child.active,
  body.sidebar-collapsed .nav-item.active,
  body.sidebar-collapsed .nav-child.active {
    background: transparent;
    box-shadow: none;
  }

  .nav-item.active .app-icon,
  .nav-child.active .app-icon,
  body.sidebar-collapsed .nav-item.active .app-icon,
  body.sidebar-collapsed .nav-child.active .app-icon {
    color: var(--ink);
  }

  .product-editor-page .product-workspace-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .product-editor-page .product-workspace-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
  }

  .product-editor-page .product-editor-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 759px) {
  :root {
    --mobile-dock-height: 66px;
    --mobile-dock-gap: 10px;
  }

  .sidebar,
  body.sidebar-collapsed .sidebar {
    position: fixed;
    top: auto;
    right: var(--mobile-dock-gap);
    bottom: var(--mobile-dock-gap);
    left: var(--mobile-dock-gap);
    width: auto;
    height: var(--mobile-dock-height);
    max-height: var(--mobile-dock-height);
    padding: 7px;
    border-radius: 22px;
    overflow: hidden;
    z-index: 40;
  }

  .brand,
  body.sidebar-collapsed .brand {
    display: none;
  }

  .shell,
  body.sidebar-collapsed .shell {
    margin-left: 0;
    min-height: 100vh;
    padding: 0 10px calc(var(--mobile-dock-height) + 28px);
  }

  .topbar {
    margin: 0 -10px 14px;
    padding: 10px;
  }

  .topbar h1 {
    font-size: 1.08rem;
  }

  .quick-actions {
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .quick-actions::-webkit-scrollbar {
    display: none;
  }

  nav[aria-label="Primary"] {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  nav[aria-label="Primary"]::-webkit-scrollbar {
    display: none;
  }

  .nav-section-label {
    display: none !important;
  }

  .nav-group,
  .nav-children {
    display: contents !important;
  }

  .nav-item,
  .nav-child,
  body.sidebar-collapsed .nav-item,
  body.sidebar-collapsed .nav-child {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    min-height: 48px;
    justify-content: center;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
  }

  .nav-item span,
  .nav-child span,
  body.sidebar-collapsed .nav-item span,
  body.sidebar-collapsed .nav-child span {
    display: none;
  }

  .nav-child {
    margin-left: 0;
    border-left: 0;
  }

  .nav-item .app-icon,
  .nav-child .app-icon,
  body.sidebar-collapsed .nav-item .app-icon,
  body.sidebar-collapsed .nav-child .app-icon {
    width: 20px;
    height: 20px;
  }

  .nav-item.active,
  .nav-child.active {
    background: transparent;
    box-shadow: none;
  }
}

.category-created-date {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--panel-subdued) 82%, var(--panel));
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 760;
  white-space: nowrap;
}

.category-created-date.missing {
  color: var(--muted);
  background: transparent;
}
