:root {
  --ink: #26343b;
  --muted: #66757d;
  --line: #dce7eb;
  --page: #f4f8fb;
  --surface: #ffffff;
  --soft-blue: #e8f3ff;
  --blue: #2e78c7;
  --blue-dark: #1d5d9e;
  --coral: #cf6e5e;
  --green: #3f9371;
  --warning: #a46a1d;
  --danger: #b34c55;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  min-width: 320px;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(46, 120, 199, .28);
  outline-offset: 2px;
}

.app-shell {
  width: 100%;
  min-height: 100dvh;
  background: var(--surface);
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  padding: max(14px, env(safe-area-inset-top)) 18px 12px;
}

.brand-row, .section-heading, .job-meta, .candidate-actions, .source-row, .history-meta, .inline-actions, .status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-kicker {
  margin: 0 0 2px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 20px; line-height: 1.2; }
h2 { margin-bottom: 0; font-size: 17px; line-height: 1.3; }
h3 { margin-bottom: 0; font-size: 14px; line-height: 1.35; }

.account-mark, .status-badge, .source-kind, .count-chip, .mini-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.account-mark { background: var(--soft-blue); color: var(--blue-dark); }
.status-badge { background: #edf4ef; color: var(--green); }
.status-badge.waiting { background: #fff5e6; color: var(--warning); }
.status-badge.partial { background: #e8f3ff; color: var(--blue-dark); }
.status-badge.failed { background: #fff0f1; color: var(--danger); }
.source-kind, .count-chip { background: #f0f4f5; color: var(--muted); }
.mini-label { background: #fbefeb; color: var(--coral); }

.top-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.top-tabs.owner-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.top-tabs.ops-console-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.top-tab {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #fff;
  font-weight: 700;
}
.top-tab.active { border-color: var(--blue); background: var(--soft-blue); color: var(--blue-dark); }

.content { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.band { padding: 20px 18px; border-bottom: 1px solid var(--line); }
.band.soft { background: #fbfdfe; }
.subcopy { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.caption { color: var(--muted); font-size: 12px; line-height: 1.45; }

.adapter-note {
  margin: 8px 18px 0;
  padding: 7px 10px;
  border: 1px solid #edf0ee;
  background: #fbfcfb;
  color: #7a8589;
  font-size: 11px;
  line-height: 1.4;
}

.primary-button, .secondary-button, .quiet-button, .danger-button {
  border-radius: var(--radius);
  min-height: 44px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
}
.primary-button { width: 100%; background: var(--blue); color: #fff; }
.full-width-button { width: 100%; margin-top: 16px; }
.primary-button:hover { background: var(--blue-dark); }
.primary-button:disabled { cursor: not-allowed; background: #a8bdc9; }
.secondary-button { background: #fff; border-color: #b8ced9; color: var(--ink); }
.secondary-button:disabled, .quiet-button:disabled { cursor: not-allowed; color: #94a3a8; border-color: #d8e2e7; background: #f3f6f8; }
.quiet-button { min-height: 34px; padding: 0 8px; color: var(--blue-dark); background: transparent; }
.home-return { margin-bottom: 12px; padding: 0 0; font-weight: 800; }
.danger-button { background: #fff; border-color: #f1c4c8; color: var(--danger); }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.button-row .primary-button { grid-column: 1 / -1; }

.new-task {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0 4px;
}
.new-task-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius); background: var(--soft-blue); color: var(--blue-dark); font-size: 24px; }
.new-task p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.entry-list { display: grid; gap: 0; }
.entry-row { width: 100%; background: transparent; border: 0; border-top: 1px solid var(--line); min-height: 62px; text-align: left; display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.entry-row strong { display: block; font-size: 14px; }
.entry-row span { color: var(--muted); font-size: 12px; }
.entry-arrow { color: var(--blue); font-size: 18px; }

.internal-panel { background: #f7fbfc; }
.internal-panel .secondary-button { min-width: 86px; }
.smoke-grid { display: grid; gap: 8px; margin: 14px 0 0; }
.smoke-grid div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.smoke-grid dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.smoke-grid dd { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.muted-text { color: var(--muted); }
.error-text { color: var(--danger); }
code { display: inline-block; max-width: 100%; padding: 1px 5px; border: 1px solid #e2e9ec; border-radius: 5px; background: #fff; color: #4d5f67; font-size: 11px; overflow-wrap: anywhere; }
.contract-summary { margin-top: 12px; }
.contract-task-list { display: grid; gap: 8px; margin-top: 12px; }
.contract-task { padding: 10px; border: 1px solid var(--line); background: #fff; }
.contract-task-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.contract-task-head span { color: var(--muted); }
.contract-task p { display: grid; gap: 4px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.evidence-list { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }
.evidence-list strong { color: var(--ink); }

.owner-shell {
  min-width: 0;
  background: #f5f7f8;
}
.owner-shell * { min-width: 0; }
.owner-shell .app-top {
  border-bottom-color: #dde6e9;
  background: rgba(255, 255, 255, .98);
}
.owner-shell .content {
  width: min(100%, 1180px);
  margin: 0 auto;
}
.owner-shell .band {
  background: #fff;
}
.owner-shell .band.soft {
  background: #f8faf9;
}
.owner-page-head {
  display: grid;
  gap: 16px;
  align-items: start;
}
.owner-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef6f1;
  color: #27684f;
  font-size: 12px;
  font-weight: 800;
}
.owner-page-head h2 {
  font-size: 24px;
  line-height: 1.25;
}
.owner-primary-action {
  width: 100%;
}
.owner-metrics,
.inventory-summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.owner-metric {
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.owner-metric span,
.owner-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.owner-metric strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.inventory-size-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfa;
}

.inventory-tool-grid::-webkit-scrollbar {
  display: none;
}

.inventory-tool-grid {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.inventory-tool {
  display: grid;
  flex: 0 0 150px;
  gap: 4px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.inventory-tool.selected {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.inventory-tool strong {
  font-size: 14px;
  line-height: 1.25;
}

.inventory-tool span,
.inventory-tool em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-tool em {
  color: var(--blue-dark);
}

.inventory-panel-section {
  display: grid;
  gap: 14px;
}

.inventory-filter-panel {
  display: grid;
  gap: 10px;
}

.inventory-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.inventory-filter-toggle strong {
  font-size: 13px;
}

.inventory-filter-toggle span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-breakdown-top,
.inventory-breakdown-active-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inventory-breakdown-top h3 {
  margin: 0;
  font-size: 16px;
}

.inventory-breakdown-season-filter,
.inventory-breakdown-filter {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 4px 0;
}

.inventory-breakdown-season-filter > strong,
.inventory-breakdown-filter > strong {
  color: var(--muted);
  font-size: 13px;
}

.inventory-breakdown-season-filter .segmented,
.inventory-breakdown-filter .segmented {
  margin-top: 0;
}

.inventory-breakdown-role-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 6px;
}

.inventory-breakdown-role,
.inventory-breakdown-size {
  display: grid;
  gap: 2px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 9px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.inventory-breakdown-role:disabled {
  opacity: .45;
}

.inventory-breakdown-role.selected,
.inventory-breakdown-size.selected {
  border-color: var(--blue);
  background: #e9f3ff;
}

.inventory-breakdown-role strong,
.inventory-breakdown-size strong,
.inventory-breakdown-active-head strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.inventory-breakdown-role span,
.inventory-breakdown-size span,
.inventory-breakdown-active-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.inventory-breakdown-size-scroll {
  display: flex;
  gap: 8px;
  margin: 0 -12px;
  overflow-x: auto;
  padding: 0 12px 2px;
  scrollbar-width: none;
}

.inventory-breakdown-size-scroll::-webkit-scrollbar {
  display: none;
}

.inventory-breakdown-size {
  flex: 0 0 auto;
  min-width: 86px;
}

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

.inventory-duplicate-notice {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border: 1px solid #ead8b7;
  border-radius: 14px;
  padding: 11px 12px;
  background: #fffaf0;
}

.inventory-duplicate-notice span,
.inventory-duplicate-notice strong,
.inventory-duplicate-notice small {
  display: block;
}

.inventory-duplicate-notice strong {
  color: #7b5a1f;
  font-size: 13px;
}

.inventory-duplicate-notice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.inventory-duplicate-notice button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid #cfaa64;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: #7b5a1f;
  font-size: 11px;
  font-weight: 800;
}

.inventory-breakdown-tile {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.inventory-breakdown-open {
  display: grid;
  min-width: 0;
  border: 0;
  padding: 0 0 34px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.inventory-breakdown-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #eef3f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.inventory-breakdown-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-breakdown-tile strong,
.inventory-breakdown-tile small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-breakdown-tile strong {
  padding: 7px 7px 0;
  font-size: 12px;
  line-height: 1.25;
}

.inventory-breakdown-tile small {
  padding: 2px 7px 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.inventory-breakdown-tile em {
  position: absolute;
  top: 6px;
  right: 6px;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(237, 244, 239, .94);
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-breakdown-delete {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  min-height: 26px;
  border: 1px solid #e6b7b7;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 247, 247, .96);
  color: #a94444;
  font-size: 11px;
  font-weight: 800;
}

.inventory-breakdown-delete:active {
  background: #f8dddd;
}

.inventory-delete-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(20, 30, 35, .48);
}

.inventory-delete-dialog-card {
  width: min(100%, 360px);
  border-radius: 20px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(20, 30, 35, .22);
}

.inventory-delete-dialog-card > strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.inventory-delete-dialog-card > p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.inventory-delete-dialog-card > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inventory-delete-dialog-card button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-weight: 800;
}
.owner-metric.success { border-color: #b8d5c0; background: #f3faf5; }
.owner-metric.warning { border-color: #ead8b7; background: #fffaf0; }
.owner-dashboard-grid,
.owner-split-section {
  display: grid;
  gap: 18px;
}
.owner-task-list,
.owner-quick-actions,
.owner-latest-preview {
  min-width: 0;
}
.owner-task-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.owner-task-item:first-of-type { border-top: 0; }
.owner-task-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}
.owner-task-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.owner-task-item.warning strong { color: #805a20; }
.owner-task-item.success strong { color: var(--green); }
.owner-open-job-list { display: grid; gap: 0; }
.owner-action-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.owner-action-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.owner-action-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}
.owner-action-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.owner-action-card .secondary-button {
  width: auto;
  min-width: 96px;
}
.owner-action-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef6f1;
  color: #27684f;
  font-size: 11px;
  font-weight: 800;
}
.owner-action-card:has(.owner-action-badge) {
  padding-top: 30px;
}
.owner-mobile-priority,
.owner-mobile-more,
.owner-mobile-folded-status {
  display: block;
}
.owner-desktop-dashboard {
  display: none;
}
.owner-mobile-focus-card {
  padding: 16px;
  border: 1px solid #cfe0d5;
  border-radius: var(--radius);
  background: #fbfdfb;
}
.owner-mobile-focus-card.warning {
  border-color: #ead8b7;
  background: #fffaf0;
}
.owner-mobile-focus-card.success {
  border-color: #b8d5c0;
  background: #f3faf5;
}
.owner-mobile-focus-card h2 {
  font-size: 22px;
  line-height: 1.25;
}
.owner-mobile-main-button {
  margin-top: 14px;
  min-height: 48px;
}
.owner-mobile-quick3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.owner-mobile-quick-action {
  min-height: 96px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.owner-mobile-quick-action strong,
.owner-mobile-quick-action span,
.owner-mobile-quick-action em {
  display: block;
}
.owner-mobile-quick-action strong {
  font-size: 13px;
  line-height: 1.25;
}
.owner-mobile-quick-action span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.owner-mobile-quick-action em {
  margin-top: 8px;
  color: var(--blue-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.owner-mobile-task-list {
  margin-top: 16px;
}
.owner-mobile-secondary-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.owner-mobile-folded-status details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.owner-mobile-folded-status summary {
  min-height: 46px;
  padding: 13px 14px;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.owner-candidate-summary {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.owner-candidate-summary .candidate-preview-trigger,
.owner-candidate-summary .candidate-preview-trigger img,
.owner-candidate-summary > div:first-child {
  width: 96px;
  aspect-ratio: 3 / 4;
}
.owner-candidate-summary strong {
  display: block;
  font-size: 14px;
}
.owner-candidate-summary p {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.owner-inventory-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.owner-inventory-stats span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.owner-inventory-stats strong { color: var(--ink); }
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.workflow-steps span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.workflow-steps em {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef3f5;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.workflow-steps .active {
  border-color: var(--blue);
  background: var(--soft-blue);
  color: var(--blue-dark);
}
.workflow-steps .active em {
  background: var(--blue);
  color: #fff;
}
.owner-note-list {
  display: grid;
  gap: 12px;
}
.owner-note-list strong {
  display: block;
  font-size: 14px;
}
.generation-submit-note {
  margin: 16px 0 10px;
  padding: 10px;
  border: 1px solid #d7e7db;
  border-radius: var(--radius);
  background: #f3faf5;
  color: #27684f;
  font-size: 12px;
  line-height: 1.5;
}
.generation-submit-note.warning {
  border-color: #ead8b7;
  background: #fffaf0;
  color: #805a20;
}
.candidate-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.ops-shell {
  min-width: 0;
  background: #f6f8fa;
  color: #1f2937;
}
.ops-shell * { min-width: 0; }
.ops-shell .app-top {
  border-bottom-color: #e5e7eb;
  background: rgba(255, 255, 255, .98);
}
.ops-shell .top-tabs { max-width: 520px; }
.ops-shell .content {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 20px 16px 36px;
}
.ops-shell .band {
  padding: 24px 0;
  border-bottom: 1px solid #e5e7eb;
  background: transparent;
}
.ops-shell .band:first-child { padding-top: 0; }
.ops-shell .section-heading {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
}
.ops-shell .section-heading .secondary-button { width: auto; }
.ops-shell h2 { font-size: 20px; line-height: 1.3; }
.ops-shell h3 { font-size: 14px; }
.ops-shell .subcopy { color: #6b7280; }
.ops-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
}
.ops-status.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}
.ops-status.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.ops-status-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 800;
}
.ops-status strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}
.ops-status p {
  margin: 7px 0 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.55;
}
.ops-status small {
  display: block;
  margin-top: 9px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}
.ops-status-action {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.ops-status-action small {
  max-width: 180px;
  margin: 0;
  text-align: right;
}
.ops-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.ops-metric {
  min-height: 112px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.ops-metric span,
.ops-metric small {
  display: block;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}
.ops-metric strong {
  display: block;
  margin: 8px 0 4px;
  color: #111827;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.ops-rule-list {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
}
.ops-rule-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #e5e7eb;
}
.ops-rule-list dt {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}
.ops-rule-list dd {
  margin: 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.ops-disclosure {
  margin-top: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.ops-disclosure summary {
  min-height: 44px;
  padding: 12px 14px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.ops-disclosure > div {
  padding: 0 14px 14px;
}
.ops-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.ops-reasons span {
  padding: 7px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}
.ops-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.ops-split > div,
.ops-analysis {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.ops-split h3,
.ops-analysis h3 {
  margin: 0 0 10px;
  font-size: 14px;
}
.ops-list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
}
.ops-list-row:first-of-type { border-top: 0; }
.ops-list-row span { color: #6b7280; overflow-wrap: anywhere; }
.ops-list-row strong { color: #111827; }
.ops-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: #6b7280;
  font-size: 12px;
}
.ops-chart-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: -1px;
  background: currentColor;
}
.ops-chart-legend .visitor { color: #2563eb; }
.ops-chart-legend .view { color: #16a34a; }
.ops-chart-legend .share { color: #d97706; }
.ops-chart-legend .contact { color: #dc2626; }
.ops-trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.ops-trend-day {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.ops-trend-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  height: 118px;
  padding-top: 10px;
  border-bottom: 1px solid #e5e7eb;
}
.ops-trend-bars span {
  display: block;
  border-radius: 3px 3px 0 0;
}
.ops-trend-bars .visitor { background: #2563eb; }
.ops-trend-bars .view { background: #16a34a; }
.ops-trend-bars .share { background: #d97706; }
.ops-trend-bars .contact { background: #dc2626; }
.ops-trend-day strong { font-size: 13px; }
.ops-trend-day span { color: #6b7280; font-size: 12px; line-height: 1.4; }
.ops-funnel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.ops-funnel-row {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.ops-funnel-row strong,
.ops-funnel-row span {
  display: block;
  font-size: 13px;
}
.ops-funnel-row span { color: #6b7280; margin-top: 3px; }
.ops-funnel-bar {
  height: 9px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.ops-funnel-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}
.ops-analysis {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.ops-analysis p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
}
.ops-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.ops-table-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ops-table-toolbar > div > span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}
.ops-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ops-chip {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}
.ops-chip.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}
.ops-table-wrap {
  max-width: 100%;
  margin-top: 12px;
  overflow-x: auto;
}
.ops-account-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}
.ops-account-table th,
.ops-account-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}
.ops-account-table th {
  color: #6b7280;
  background: #f9fafb;
  font-size: 12px;
}
.ops-table-tag {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
}
.ops-account-cards {
  display: none;
  gap: 10px;
  margin-top: 12px;
}
.ops-account-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.ops-account-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ops-account-card span {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}
.ops-account-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.ops-account-card dt {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}
.ops-account-card dd {
  margin: 3px 0 0;
  color: #111827;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ops-job-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.ops-job {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.ops-job-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: #16a34a;
}
.ops-job.queued .ops-job-dot,
.ops-job.generating .ops-job-dot,
.ops-job.partial .ops-job-dot { background: #d97706; }
.ops-job.failed .ops-job-dot { background: #dc2626; }
.ops-job strong { font-size: 14px; }
.ops-job span,
.ops-job small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}
.ops-empty-load {
  min-height: 280px;
  display: grid;
  align-content: center;
}
.empty.tight { padding: 12px 0 0; }

.segmented { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.segment { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: #fff; font-weight: 700; }
.segment.selected { border-color: var(--blue); background: var(--soft-blue); color: var(--blue-dark); }
.fit-profile-editor { display: grid; gap: 10px; min-width: 0; }
.fit-profile-truth-note { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.fit-profile-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
}
.fit-profile-row > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.fit-profile-row .segmented { margin: 0; }
.fit-profile-row .segment { min-height: 40px; padding: 4px 7px; font-size: 12px; }
.inventory-meta > .fit-profile-editor { grid-template-columns: minmax(0, 1fr); }
.inventory-meta .fit-profile-row { grid-template-columns: 64px minmax(0, 1fr); }
.single-product-meta > .fit-profile-editor { gap: 12px; }
.single-product-meta .fit-profile-row { grid-template-columns: 44px minmax(0, 1fr); }
.construction-profile-editor {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding-top: 2px;
}
.inventory-meta > .construction-profile-editor { grid-template-columns: minmax(0, 1fr); }
.construction-profile-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.construction-profile-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.construction-profile-heading > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}
.construction-profile-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}
.construction-profile-tags .segment {
  min-width: 0;
  min-height: 42px;
  height: auto;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.3;
}
.construction-profile-editor > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.garment-length-line .segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin-top: 0;
}
.garment-length-line .segment { min-width: 0; padding: 0 5px; }

@media (min-width: 760px) {
  .construction-profile-tags { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.single-reference-grid,
.single-upload-grid { grid-template-columns: minmax(0, 1fr); }
.upload-slot { border: 1px dashed #99b7c8; min-height: 190px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 12px; text-align: center; background: #fbfdfe; }
.upload-slot img { width: 100%; height: 148px; object-fit: contain; background: #eef4f5; }
.upload-slot h3 { margin-top: 9px; }
.upload-slot p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.upload-slot .button-row {
  width: 100%;
  margin-top: 14px;
}
.upload-slot .secondary-button {
  min-height: 44px;
}
.single-source-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.single-source-switch .segment {
  min-height: 46px;
  width: 100%;
}
.single-inventory-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.single-inventory-summary strong {
  color: var(--ink);
}

.single-replacement-screen {
  overflow: hidden;
}
.single-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.single-page-head .owner-eyebrow { margin-bottom: 6px; }
.single-page-head .status-badge { flex: 0 0 auto; margin-top: 3px; }
.single-flow-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 18px 0 14px;
}
.single-flow-progress span {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
}
.single-flow-progress em {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #242b31;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}
.single-flow-progress .active {
  border-color: var(--blue);
  color: var(--blue-dark);
  background: var(--soft-blue);
}
.single-flow-progress .active em { color: #fff; background: var(--blue); }
.single-flow-progress .done { color: var(--green); }
.single-flow-progress .done em { color: #fff; background: var(--green); }
.single-flow {
  display: grid;
  gap: 12px;
}
.single-step-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: #101315;
}
.single-step-card.active { border-color: #3a72aa; }
.single-step-card.complete { border-color: #2b5c49; }
.single-step-title {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}
.single-step-title > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #91bff2;
  background: #1b2a39;
  font-size: 13px;
  font-weight: 900;
}
.single-step-title h3 { font-size: 15px; }
.single-step-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.single-photo-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px dashed #46515a;
  border-radius: var(--radius);
  background: #0d0f11;
}
.single-photo-preview {
  display: grid;
  place-items: center;
  gap: 5px;
  width: 82px;
  height: 104px;
  overflow: hidden;
  border-radius: 6px;
  color: var(--muted);
  background: #181d21;
  font-size: 11px;
}
.single-photo-preview .ui-icon { width: 24px; height: 24px; }
.single-photo-preview img:not(.ui-icon) { display: block; width: 100%; height: 100%; object-fit: contain; }
.single-photo-copy h3 { font-size: 14px; }
.single-photo-copy > p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.single-photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.single-photo-actions .secondary-button {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  font-size: 12px;
}
.single-photo-actions .ui-icon { width: 15px; height: 15px; }
.single-role-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.single-role-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #46515a;
  border-radius: var(--radius);
  color: var(--ink);
  background: #0f1113;
  font-weight: 800;
}
.single-role-button.selected { border-color: var(--blue); color: #82b8f5; background: var(--soft-blue); }
.single-source-panel { margin-top: 12px; }
.single-product-meta {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d0f11;
}
.single-meta-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.single-meta-row > span,
.single-size-heading > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.single-meta-row .segmented { margin-top: 0; flex-wrap: nowrap; }
.single-meta-row .segment { flex: 1 1 0; padding: 0 8px; }
.single-size-block { min-width: 0; }
.single-size-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.single-size-heading small { color: var(--green); font-size: 11px; }
.single-size-block .draft-size-grid { margin-top: 9px; }
.single-size-block > p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.single-size-block .draft-stock-table { margin-top: 10px; }
.single-stock-row { grid-template-columns: minmax(42px, 1fr) 38px 38px 38px 20px; }
.single-ready-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}
.single-ready-summary span {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.single-ready-summary em {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #242b31;
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}
.single-ready-summary em.ready { color: #fff; background: var(--green); }
.single-reminder {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.single-reminder input { width: 18px; height: 18px; accent-color: var(--blue); }
.single-confirm-card .pair-generation-actions { margin-top: 10px; }

@media (min-width: 760px) {
  .single-replacement-screen { max-width: 760px; margin: 0 auto; }
}

@media (max-width: 380px) {
  .single-photo-card { grid-template-columns: 72px minmax(0, 1fr); }
  .single-photo-preview { width: 72px; height: 96px; }
  .single-photo-actions .secondary-button { font-size: 11px; }
  .single-flow-progress span { gap: 4px; font-size: 11px; }
}

.outfit-replacement-screen .single-page-head .subcopy {
  max-width: 560px;
  margin: 5px 0 0;
}
.outfit-flow-progress {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.outfit-flatlay-card .single-photo-preview {
  background: #f4f2ec;
}
.outfit-flatlay-card .single-photo-preview img:not(.ui-icon) {
  object-fit: contain;
}
.outfit-label-editor {
  display: grid;
  gap: 14px;
}
.outfit-label-editor > .single-meta-row,
.outfit-role-section,
.outfit-garment-label-card,
.outfit-accessory-section {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d0f11;
}
.outfit-label-editor > .single-meta-row {
  grid-template-columns: 44px minmax(0, 1fr);
  padding-block: 10px;
}
.outfit-role-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.outfit-role-heading strong {
  font-size: 13px;
}
.outfit-role-heading small {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}
.outfit-garment-label-card .fit-profile-editor {
  margin-top: 0;
}
.outfit-garment-label-card .garment-length-line {
  margin-bottom: 10px;
}
.outfit-accessory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.outfit-accessory-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #46515a;
  border-radius: var(--radius);
  color: var(--ink);
  background: #101315;
  font-size: 12px;
  font-weight: 800;
}
.outfit-accessory-button span {
  color: var(--muted);
  font-size: 13px;
}
.outfit-accessory-button.selected {
  border-color: var(--blue);
  color: #82b8f5;
  background: var(--soft-blue);
}
.outfit-accessory-button.selected span {
  color: #82b8f5;
}
.outfit-accessory-section > p,
.outfit-reference-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.outfit-reference-note {
  margin: 0 0 8px;
  padding: 10px;
  border-radius: var(--radius);
  background: #171b1e;
}

@media (max-width: 520px) {
  .outfit-accessory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .outfit-role-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .outfit-role-heading small {
    text-align: left;
  }
}

.owned-outfit-photo {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  min-height: 280px;
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed #99b7c8;
  border-radius: var(--radius);
  background: #fbfdfe;
  color: var(--ink);
  text-align: center;
}
.owned-outfit-photo img {
  display: block;
  width: 100%;
  max-height: 420px;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #eef4f5;
}
.owned-outfit-photo span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.owned-outfit-stock-card {
  padding: 14px 18px 16px;
}
.owned-outfit-stock-card .compact-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.owned-outfit-stock-card .compact-heading h2 {
  font-size: 15px;
}
.owned-outfit-stock-card .compact-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}
.owned-outfit-stock-card .inventory-size-grid {
  gap: 6px;
  margin-top: 10px;
}
.owned-outfit-stock-card .inventory-size {
  min-height: 34px;
  font-size: 14px;
}
.owned-outfit-stock-card .inventory-stock-table {
  margin-top: 10px;
}
.owned-outfit-stock-card .inventory-stock-row {
  grid-template-columns: 42px 34px 62px 34px 24px;
  gap: 7px;
  min-height: 44px;
}
.owned-outfit-stock-card .inventory-stock-row button,
.owned-outfit-stock-card .inventory-stock-row input {
  height: 34px;
}
.owned-outfit-stock-card .inventory-stock-row strong {
  font-size: 14px;
}

.source-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.source-preview { margin: 0; }
.source-preview img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #eef3f5; border: 1px solid var(--line); }
.source-preview figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; font-size: 12px; color: var(--muted); }

.setting-group + .setting-group { margin-top: 22px; }
.setting-label { margin: 0; font-weight: 700; font-size: 14px; }
.notice-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.switch { position: relative; width: 46px; height: 28px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; inset: 0; border-radius: 14px; background: #c6d4d9; transition: .15s; }
.switch-track::after { content: ""; position: absolute; width: 22px; height: 22px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }

.link-row { display: flex; gap: 18px; margin-top: 18px; }
.text-link { border: 0; background: transparent; color: var(--blue-dark); padding: 0; font-weight: 700; }

.progress-strip { height: 8px; overflow: hidden; background: #e8eff1; border-radius: 6px; margin: 16px 0 10px; }
.progress-strip > span { display: block; height: 100%; background: var(--green); transition: width .3s; }
.source-trace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fbfdfe;
}
.source-trace-bar strong { display: block; font-size: 13px; }
.source-trace-bar p { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.source-trace-list { display: flex; gap: 8px; flex: 0 0 auto; }
.source-trace-item { display: grid; gap: 4px; justify-items: center; color: var(--muted); font-size: 10px; line-height: 1.2; }
.source-trace-item img, .source-trace-empty { width: 42px; height: 42px; object-fit: contain; border: 1px solid var(--line); background: #eef3f5; }
.source-image-preview-trigger {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 0;
  cursor: zoom-in;
  -webkit-tap-highlight-color: rgba(51, 96, 169, .16);
}
.source-image-preview-trigger:active { transform: scale(.96); }
.source-image-preview-trigger:focus-visible { outline: 3px solid rgba(51, 96, 169, .38); outline-offset: 2px; }
.source-trace-item .source-image-preview-trigger { width: 42px; height: 42px; }
.source-preview > .source-image-preview-trigger { width: 100%; }
.candidate-heading { margin-top: 18px; }
.job-result-ready { margin-top: 16px; padding: 16px; border: 1px solid #b8d5c0; background: #edf4ef; border-radius: var(--radius); display: grid; gap: 8px; }
.job-result-ready.waiting { border-color: #d7c7a0; background: #f7f0df; }
.job-result-ready.failed { border-color: #e4b8b0; background: #fff0ed; }
.job-result-ready.partial-ready { border-color: #ead8b7; background: #fffaf0; }
.job-result-ready .primary-button { width: 100%; }
.job-result-ready.pair-continuation { border-color: #b9d5ef; background: var(--soft-blue); }
.compact-button-row { margin-top: 4px; }
.compact-button-row .primary-button { grid-column: auto; }
.history-candidate-status { margin: 10px 0 0; }

.candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.candidate-card { min-width: 0; }
.candidate-image { width: 100%; aspect-ratio: 3 / 4; background: #eff4f5; border: 1px solid var(--line); overflow: hidden; }
.candidate-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.candidate-preview-trigger { display: block; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: zoom-in; }
.candidate-preview-trigger img { display: block; width: 100%; height: 100%; object-fit: contain; }
.candidate-image.placeholder { display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 8px; }
.candidate-actions { margin-top: 8px; align-items: flex-start; }
.candidate-actions .button-pair { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.candidate-actions .secondary-button { min-height: 32px; padding: 0 8px; font-size: 12px; }
.candidate-actions .favorite-active { border-color: #dfa29a; color: var(--coral); background: #fff7f4; }
.candidate-actions .publish-button { border-color: #9ab8c2; color: var(--blue-dark); background: var(--soft-blue); }
.candidate-actions .catalog-published { border-color: #b8d5c0; color: var(--green); background: #edf4ef; opacity: 1; }
.candidate-actions .unpublish-button { border-color: #d9c49a; color: #80602a; background: #fff8e8; }
.candidate-actions .reject-button { border-color: #ead0d2; color: var(--danger); background: #fff; }
.candidate-actions .reject-active { border-color: #e2a5aa; color: #8d2f38; background: #fff0f1; }
.candidate-quality-note { margin: 8px 0 0; color: var(--danger); font-size: 11px; font-weight: 800; line-height: 1.45; }
.candidate-reject-panel { margin-top: 8px; padding: 8px; border: 1px solid #ead0d2; background: #fff8f8; }
.candidate-reject-panel.compact { width: min(100%, 560px); border-color: rgba(255, 255, 255, .22); background: rgba(32, 13, 17, .72); }
.reject-reason-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.reject-reason-grid .secondary-button { min-height: 34px; padding: 0 8px; font-size: 12px; white-space: normal; line-height: 1.2; }
.reject-reason-grid .reject-reason-selected { border-color: #db777f; color: #8d2f38; background: #ffe4e6; box-shadow: inset 0 0 0 1px rgba(141, 47, 56, .16); }
.candidate-reject-panel.compact .reject-reason-selected { border-color: rgba(255, 179, 186, .82); color: #ffd9de; background: rgba(129, 47, 57, .92); box-shadow: inset 0 0 0 1px rgba(255, 217, 222, .22); }
.reject-confirm-button { width: 100%; min-height: 36px; margin-top: 8px; font-size: 12px; }
.reject-confirm-button:disabled { opacity: .45; cursor: not-allowed; }
.candidate-failure-note { margin: 8px 0 0; padding: 8px; border: 1px solid #e4b8b0; background: #fff0ed; color: #7f3a2f; font-size: 11px; line-height: 1.45; }

.history-list { display: grid; gap: 0; }
.history-item { padding: 18px 0; border-top: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 520px; }
.history-item:first-child { border-top: 0; }
.history-source { width: 52px; height: 52px; object-fit: contain; border: 1px solid var(--line); background: #edf3f5; }
.history-source-pair { display: flex; gap: 6px; flex: 0 0 auto; }
.history-source-pair .history-source { width: 46px; height: 58px; }
.history-source-pair .history-source-preview-trigger { width: 46px; height: 58px; }
.history-meta { align-items: flex-start; }
.history-meta p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.history-candidates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.history-candidates img, .history-candidates div, .history-candidates .candidate-preview-trigger { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #edf3f5; border: 1px solid var(--line); }
.history-candidates div { display: grid; place-items: center; color: var(--muted); font-size: 10px; text-align: center; padding: 4px; }
.history-load-sentinel {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.history-load-sentinel.loading::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(51, 96, 169, .18);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: history-load-spin .7s linear infinite;
}
.history-load-sentinel.error { color: var(--danger); }
.history-load-complete { margin: 18px 0 4px; color: var(--muted); font-size: 12px; text-align: center; }
@keyframes history-load-spin { to { transform: rotate(360deg); } }

body.preview-open { overflow: hidden; }
.image-preview-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background: rgba(6, 13, 18, .82);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.image-preview-dialog {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(100%, 860px);
  height: min(100%, 92dvh);
  margin: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.image-preview-dialog img {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #11191d;
}
.image-preview-dialog figcaption {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 10px 4px max(10px, env(safe-area-inset-bottom));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.source-image-preview-dialog { overflow: hidden; }
.source-image-preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #11191d;
}
.source-image-preview-stage .source-image-preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.source-image-preview-stage .source-image-preview-image.high-resolution-ready { animation: source-image-sharpen .16s ease-out; }
.source-image-preview-loading {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(6, 13, 18, .7);
  color: rgba(255, 255, 255, .92);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transform: translateX(-50%);
  white-space: nowrap;
}
@keyframes source-image-sharpen {
  from { opacity: .86; }
  to { opacity: 1; }
}
.candidate-reject-panel.compact .reject-confirm-button {
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.image-preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.image-preview-actions .secondary-button {
  min-width: 68px;
  min-height: 38px;
  padding: 0 12px;
  border-color: rgba(226, 238, 245, .7);
  background: rgba(13, 22, 27, .82);
  color: #f2fbff;
  font-size: 13px;
}
.image-preview-actions .publish-button {
  min-width: 100px;
  border-color: rgba(127, 178, 255, .68);
  background: rgba(35, 81, 125, .74);
  color: #8bbcff;
}
.image-preview-actions .unpublish-button {
  min-width: 82px;
  border-color: rgba(238, 201, 126, .72);
  background: rgba(86, 64, 26, .78);
  color: #ffd98c;
}
.image-preview-actions .reject-button {
  border-color: rgba(255, 179, 186, .6);
  background: rgba(85, 36, 42, .72);
  color: #ffbdc3;
}
.image-preview-actions .favorite-active,
.image-preview-actions .catalog-published {
  border-color: rgba(75, 166, 122, .56);
  background: rgba(28, 62, 47, .72);
  color: #6fd8a4;
}
.image-preview-actions .reject-active {
  border-color: rgba(255, 179, 186, .72);
  background: rgba(105, 42, 48, .84);
  color: #ffd3d7;
}
.image-preview-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 8px;
  background: rgba(12, 20, 24, .66);
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
}
.image-preview-prev { left: 8px; }
.image-preview-next { right: 8px; }
.image-preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(12, 20, 24, .72);
  color: #fff;
  font-weight: 800;
}

.feedback-form { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.feedback-form textarea { width: 100%; min-height: 78px; resize: vertical; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }

.inventory-filters {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.inventory-action-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.inventory-filter-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: start;
}

.inventory-filter-row > span,
.inventory-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 38px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.inventory-table-wrap {
  display: none;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  font-size: 13px;
}

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

.inventory-table th {
  color: var(--muted);
  background: #f8faf9;
  font-size: 12px;
}

.inventory-table-product {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.inventory-table-product strong,
.inventory-table-product small {
  display: block;
}

.inventory-table-product small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.inventory-table-thumb {
  display: grid;
  place-items: center;
  width: 54px;
  height: 72px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #eef3f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.inventory-table-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-status-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f0f4f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.inventory-status-chip.success {
  background: #edf4ef;
  color: var(--green);
}

.inventory-status-chip.warning {
  background: #fff5e6;
  color: var(--warning);
}

.inventory-status-chip.danger {
  background: #fff0f1;
  color: var(--danger);
}

.inventory-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-row-actions .secondary-button,
.inventory-row-actions .danger-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.inventory-card,
.linked-inventory {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.inventory-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  padding: 8px;
}

.inventory-thumb-wrap {
  position: relative;
}

.inventory-card-open,
.inventory-card-body {
  width: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.inventory-delete-button {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: var(--radius);
  padding: 0 9px;
  background: rgba(28, 35, 39, .74);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.inventory-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: #eef3f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-thumb.image-missing {
  border: 1px dashed rgba(148, 166, 176, .56);
  background: #1d2428;
  color: #9fb0ba;
  text-align: center;
}

.inventory-main-photo.image-missing,
.linked-inventory.image-missing {
  border: 1px dashed rgba(148, 166, 176, .56);
  background: #1d2428;
  color: #9fb0ba;
}

.image-missing-label {
  display: grid;
  place-items: center;
  min-height: 54px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.inventory-thumb img,
.inventory-main-photo img,
.linked-inventory img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.inventory-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inventory-card-head strong {
  color: #8a6a2a;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-card-head em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e5f4f1;
  color: #11645f;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.inventory-card-status {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.inventory-meta {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius);
  background: #f7fbfa;
}

.inventory-meta > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
}

.inventory-editor-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.inventory-editor-media.two-up {
  grid-template-columns: 1fr 1fr;
}

.inventory-photo-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inventory-photo-actions .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
}

.inventory-photo-actions .ui-icon {
  width: 20px;
  height: 20px;
}

.inventory-main-photo {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3f5;
  color: var(--muted);
  font-weight: 800;
}

.inventory-main-photo:disabled {
  cursor: default;
}

.inventory-main-photo em {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(38, 52, 59, .72);
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.linked-inventory {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  background: #f7fbfa;
}

.linked-inventory img {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background: #eef3f5;
}

.linked-inventory strong,
.linked-inventory small {
  display: block;
}

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

.inventory-size-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.inventory-size {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.inventory-size.selected {
  border-color: #1f7a75;
  background: #e5f4f1;
  color: #11645f;
}

.inventory-stock-table {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.inventory-stock-row {
  display: grid;
  grid-template-columns: 54px 42px 74px 42px 30px;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.inventory-stock-row strong {
  font-size: 15px;
}

.inventory-stock-row button,
.hand-stepper button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #11645f;
  font-weight: 900;
}

.inventory-stock-row input,
.hand-stepper input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: center;
  font-weight: 800;
}

.inventory-stock-row span,
.hand-stepper span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hand-stepper {
  display: grid;
  grid-template-columns: 38px 60px 38px 24px;
  gap: 6px;
  align-items: center;
}

.pair-selected-grid,
.pair-recommendation-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.pair-selected,
.pair-product,
.pair-recommendation {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.pair-selected {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
}

.pair-selected .inventory-thumb {
  width: 58px;
  height: 78px;
  aspect-ratio: auto;
}

.pair-selected strong,
.pair-product strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.pair-selected small,
.pair-product small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.pair-selected.empty-slot {
  min-height: 92px;
  grid-template-columns: 1fr;
  align-content: center;
  color: var(--muted);
}

.pair-meta {
  margin-top: 14px;
}

.pair-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.pair-choice {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.pair-choice.active,
.pair-choice:focus-visible {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.pair-choice strong {
  font-size: 15px;
  line-height: 1.25;
}

.pair-choice span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pair-picker-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.compact-heading h3 {
  margin: 0;
  font-size: 16px;
}

.pair-subtitle {
  margin: 18px 0 10px;
  color: var(--muted);
}

.pair-product-list,
.pair-recommendation-list {
  display: grid;
  gap: 10px;
}

.pair-recommendation-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 12px 0;
}

.pair-recommendation-toolbar button {
  min-height: 44px;
  padding-inline: 14px;
}

.pair-recommendation-filters {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.pair-filter-note,
.pair-active-plan-note {
  margin: 8px 0 0;
}

.pair-active-plan-note {
  color: var(--green);
  font-weight: 700;
}

.pair-product-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.pair-product {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  width: 100%;
  min-height: 0;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  content-visibility: auto;
  contain-intrinsic-size: 260px;
}

.pair-product:active {
  border-color: var(--blue);
  background: var(--soft-blue);
  transform: scale(.985);
}

.pair-product .inventory-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
}

.pair-product em {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #edf4ef;
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.pair-product.selected {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.pair-recommendation {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.pair-recommendation.selected {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.pair-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--blue-dark);
}

.pair-score strong {
  font-size: 24px;
  line-height: 1;
}

.pair-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pair-recommendation-products {
  margin-top: 0;
}

.pair-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pair-reasons span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf4ef;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}
.pair-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.pair-mode {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.pair-mode.active {
  border-color: var(--blue);
  background: var(--soft-blue);
}
.pair-mode strong {
  font-size: 14px;
}
.pair-mode span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.pair-generate-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.pair-generation-actions {
  margin-top: 0;
}
.pair-generation-actions .primary-button {
  grid-column: auto;
}

@media (min-width: 640px) {
  .inventory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .owner-shell .app-top {
    padding-left: 32px;
    padding-right: 32px;
  }
  .owner-shell .brand-row,
  .owner-shell .top-tabs {
    width: min(100%, 1180px);
    margin-left: auto;
    margin-right: auto;
  }
  .owner-shell .content {
    padding: 22px 32px 42px;
  }
  .owner-shell .band {
    padding: 24px 0;
    background: transparent;
  }
  .owner-shell .band:first-child {
    padding-top: 0;
  }
  .owner-shell h2 {
    font-size: 20px;
  }
  .owner-page-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
  .owner-primary-action {
    width: auto;
    min-width: 180px;
  }
  .owner-mobile-priority,
  .owner-mobile-more,
  .owner-mobile-folded-status {
    display: none;
  }
  .owner-desktop-dashboard {
    display: block;
  }
  .owner-dashboard-grid.owner-desktop-dashboard {
    display: grid;
  }
  .owner-metrics,
  .inventory-summary-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .owner-dashboard-grid {
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
  }
  .owner-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .owner-split-section {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  }
  .owner-shell .candidate-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .inventory-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .inventory-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inventory-tool-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
  }
  .inventory-tool {
    min-width: 0;
  }
  .inventory-breakdown-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .inventory-table-wrap {
    display: block;
    max-width: 100%;
    margin-top: 16px;
    overflow-x: auto;
  }
  .inventory-mobile-grid {
    display: none;
  }
  .pair-product-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pair-recommendation {
    grid-template-columns: 72px minmax(0, 1fr) minmax(180px, .55fr) auto;
    align-items: center;
  }
  .pair-recommendation-products {
    margin-top: 0;
  }
  .upload-grid {
    gap: 14px;
  }
}

@media (max-width: 760px) {
  .owner-shell .app-top { padding-left: 16px; padding-right: 16px; }
  .owner-shell .content { padding-bottom: 30px; }
  .owner-shell .band { padding-left: 16px; padding-right: 16px; }
  .owner-page-head h2 { font-size: 21px; }
  .owner-metrics,
  .inventory-summary-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .inventory-breakdown-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .inventory-breakdown-role-tabs {
    width: 100%;
  }
  .owner-task-item,
  .owner-action-card,
  .owner-candidate-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .owner-action-card .secondary-button,
  .owner-task-item .quiet-button,
  .owner-candidate-summary .secondary-button {
    width: 100%;
  }
  .owner-candidate-summary .candidate-preview-trigger,
  .owner-candidate-summary .candidate-preview-trigger img,
  .owner-candidate-summary > div:first-child {
    width: 100%;
  }
  .workflow-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .owner-shell .upload-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .owner-shell .upload-slot {
    min-height: 220px;
    padding: 16px;
    align-items: stretch;
  }
  .owner-shell .upload-slot .new-task-icon {
    align-self: center;
  }
  .owner-shell .upload-slot .button-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }
  .owner-shell .upload-slot .secondary-button {
    min-height: 48px;
    padding: 0 10px;
    white-space: nowrap;
  }
  .candidate-toolbar {
    display: grid;
  }
  .inventory-action-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .inventory-table-wrap {
    display: none;
  }
  .inventory-mobile-grid {
    display: grid;
  }
  .inventory-meta > div {
    grid-template-columns: 46px minmax(0, 1fr);
  }
  .inventory-main-photo {
    min-height: 220px;
  }
  .inventory-size-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }
  .inventory-stock-row {
    grid-template-columns: 44px 38px minmax(56px, 1fr) 38px 22px;
    gap: 6px;
  }
  .inventory-stock-row button,
  .inventory-stock-row input,
  .hand-stepper button,
  .hand-stepper input {
    height: 42px;
  }
  .hand-stepper {
    grid-template-columns: 42px 64px 42px 24px;
  }
  .owned-outfit-stock-card .inventory-stock-row {
    grid-template-columns: 42px 36px minmax(56px, 1fr) 36px 22px;
  }
  .top-tabs.owner-tabs {
    gap: 6px;
  }
  .top-tabs.owner-tabs .top-tab {
    padding: 0 6px;
    font-size: 13px;
  }
  .ops-shell .app-top { padding-left: 16px; padding-right: 16px; }
  .ops-shell .content { padding: 16px 14px 30px; }
  .ops-shell .top-tabs { max-width: none; }
  .ops-status {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .ops-status-action {
    justify-items: stretch;
  }
  .ops-status-action small {
    max-width: none;
    text-align: left;
  }
  .ops-rule-list div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .ops-table-wrap { display: none; }
  .ops-account-cards { display: grid; }
  .ops-account-card dl { grid-template-columns: minmax(0, 1fr); }
  .ops-trend-chart { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
}

.auth-shell { width: min(100%, 480px); margin: 0 auto; min-height: 100dvh; padding: max(34px, env(safe-area-inset-top)) 24px 32px; display: flex; flex-direction: column; justify-content: center; background: #fff; }
.auth-symbol { width: 58px; height: 58px; display: grid; place-items: center; border-radius: var(--radius); background: var(--soft-blue); color: var(--blue-dark); font-size: 28px; margin-bottom: 24px; }
.auth-shell h1 { font-size: 25px; }
.auth-shell input { width: 100%; height: 46px; margin-top: 22px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.service-recovery-shell .primary-button { margin-top: 22px; }
.local-hint { margin: 14px 0 0; padding: 10px; color: #805a20; background: #fff8ea; font-size: 12px; line-height: 1.5; }

.empty { padding: 26px 0; color: var(--muted); font-size: 14px; text-align: center; }
.toast-region { position: fixed; right: 16px; left: 16px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 20; pointer-events: none; }
.toast { max-width: 480px; margin: auto; padding: 12px 14px; color: #fff; background: var(--ink); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(38, 52, 59, .18); font-size: 13px; }
.visually-hidden-file { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@media (min-width: 680px) {
  body { background: #dcecf1; }
  .app-shell { width: 520px; margin: 0 auto; min-height: 100dvh; box-shadow: 0 0 0 1px rgba(87, 120, 134, .13), 0 18px 48px rgba(38, 52, 59, .13); }
  .app-shell.owner-shell { width: 100%; background: #f5f7f8; box-shadow: none; }
  .app-shell.ops-shell { width: 100%; background: #f6f8fa; box-shadow: none; }
  .ops-shell .app-top { padding-left: 32px; padding-right: 32px; }
  .ops-shell .content { padding-left: 32px; padding-right: 32px; }
  .auth-shell { min-height: 100dvh; box-shadow: 0 0 0 1px rgba(87, 120, 134, .13), 0 18px 48px rgba(38, 52, 59, .13); }
}

/* D-079 mobile owner workspace: compact dark system shared by home, generation and inventory. */
.owner-shell {
  --ink: #f2f6fa;
  --muted: #94a3ad;
  --line: #30373d;
  --page: #0d0f11;
  --surface: #0f1113;
  --soft-blue: #1b2a39;
  --blue: #438bde;
  --blue-dark: #7bb1f4;
  --green: #47bd86;
  --warning: #d8a654;
  --danger: #ef7b84;
  color: var(--ink);
  color-scheme: dark;
  background: var(--surface);
}

.owner-shell .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  filter: invert(83%) sepia(11%) saturate(282%) hue-rotate(159deg) brightness(92%) contrast(91%);
}

.owner-shell .app-top {
  border-bottom-color: var(--line);
  background: rgba(15, 17, 19, .98);
}

.owner-shell .brand-kicker,
.owner-shell .owner-eyebrow {
  color: #62a5ed;
}

.owner-shell .account-mark,
.owner-shell .count-chip,
.owner-shell .source-kind,
.owner-shell .mini-label {
  background: #1c252e;
  color: #9ec4ef;
}

.owner-shell .top-tab,
.owner-shell .segment,
.owner-shell .secondary-button,
.owner-shell .danger-button,
.owner-shell input,
.owner-shell textarea,
.owner-shell select {
  border-color: #46515a;
  background: #0f1113;
  color: var(--ink);
}

.owner-shell .top-tab.active,
.owner-shell .segment.selected,
.owner-shell .inventory-tool.selected {
  border-color: var(--blue);
  background: var(--soft-blue);
  color: #82b8f5;
}

.owner-shell .workflow-steps span {
  border-color: var(--line);
  background: #111416;
  color: var(--muted);
}

.owner-shell .workflow-steps em {
  background: #242b31;
  color: var(--muted);
}

.owner-shell .workflow-steps .active {
  border-color: var(--blue);
  background: var(--soft-blue);
  color: #82b8f5;
}

.owner-shell .workflow-steps .active em {
  background: var(--blue);
  color: #fff;
}

.owner-shell .band,
.owner-shell .band.soft {
  border-bottom-color: var(--line);
  background: var(--surface);
}

.owner-shell .primary-button {
  background: var(--blue);
  color: #fff;
}

.owner-shell .primary-button:hover { background: #3478c3; }
.owner-shell .primary-button:disabled { background: #27313a; color: #77838d; }

.owner-shell .status-badge,
.owner-shell .inventory-status-chip.success {
  background: #14271f;
  color: #5dd09a;
}

.owner-shell .status-badge.waiting,
.owner-shell .inventory-status-chip.warning {
  background: #2b251b;
  color: #e4b765;
}

.owner-shell .inventory-status-chip,
.owner-shell .inventory-card-head em {
  background: #192523;
  color: #69c7ad;
}

.owner-mobile-workbench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.owner-mobile-workbench-head h2 { font-size: 20px; }
.owner-mobile-workbench-head span { color: var(--muted); font-size: 12px; }

.owner-mobile-task-queue {
  display: grid;
  gap: 8px;
}

.owner-mobile-task-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #121518;
  color: var(--ink);
  text-align: left;
}

.owner-mobile-task-row.primary {
  border-color: #426b98;
  background: #14202b;
}

.owner-mobile-task-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #1d252c;
}

.owner-mobile-task-row.primary .owner-mobile-task-icon { background: #18385a; }
.owner-mobile-task-row.primary .owner-mobile-task-icon .ui-icon,
.owner-mobile-sticky-action .primary-button .ui-icon {
  filter: brightness(0) invert(1);
}

.owner-mobile-task-copy strong,
.owner-mobile-task-copy small {
  display: block;
}

.owner-mobile-task-copy strong { font-size: 14px; line-height: 1.35; }
.owner-mobile-task-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.owner-mobile-task-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #80b5f3;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.owner-mobile-task-link .ui-icon { width: 15px; height: 15px; }

.owner-mobile-tools,
.owner-photo-guide {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101315;
}

.owner-mobile-tools summary,
.owner-photo-guide summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 13px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.owner-mobile-tools summary::-webkit-details-marker,
.owner-photo-guide summary::-webkit-details-marker,
.inventory-mobile-tools summary::-webkit-details-marker,
.inventory-card-menu summary::-webkit-details-marker { display: none; }

.owner-mobile-tools summary span,
.owner-photo-guide summary span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.owner-mobile-tool-list { border-top: 1px solid var(--line); }

.owner-mobile-tool-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid #252b30;
  padding: 0 13px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.owner-mobile-tool-row:last-child { border-bottom: 0; }

.owner-mobile-sticky-action,
.inventory-mobile-sticky-action {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  padding: 9px 16px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(15, 17, 19, .98);
}

.owner-mobile-sticky-action p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
}

.owner-mobile-sticky-action p .ui-icon { width: 14px; height: 14px; }
.owner-mobile-sticky-action .primary-button,
.inventory-mobile-sticky-action .primary-button { min-height: 50px; }

.owner-mobile-sticky-action .primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.owner-safety-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  padding: 9px 11px;
  border: 1px solid #244a3a;
  border-radius: var(--radius);
  background: #11241d;
  color: #62d09b;
  font-size: 12px;
  font-weight: 700;
}

.owner-safety-note .ui-icon {
  filter: invert(68%) sepia(50%) saturate(479%) hue-rotate(99deg) brightness(95%) contrast(91%);
}

.owner-upload-heading { margin-bottom: 12px; }
.owner-upload-list { display: grid; gap: 10px; }

.owner-upload-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #121518;
}

.owner-upload-row.has-image { border-color: #3b6f9d; }

.owner-upload-preview {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  width: 82px;
  height: 102px;
  overflow: hidden;
  border: 1px dashed #4c5b65;
  border-radius: var(--radius);
  background: #191e22;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.owner-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.owner-upload-preview .ui-icon { width: 24px; height: 24px; }
.owner-upload-copy h3 { font-size: 15px; }
.owner-upload-copy p { margin: 5px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.owner-upload-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.owner-upload-actions .secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 8px;
  font-size: 12px;
}

.owner-upload-actions .ui-icon { width: 16px; height: 16px; }
.owner-photo-guide p { margin: 0; padding: 0 13px 13px; color: var(--muted); font-size: 12px; }

.owner-garment-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111416;
}

.owner-garment-card.has-image { border-color: #3b6f9d; }
.owner-garment-card .owner-upload-row { border: 0; border-radius: 0; background: transparent; }

.draft-garment-meta {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px;
  background: #0e1113;
}

.draft-meta-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.draft-meta-line > span,
.draft-size-block > span {
  color: #cbd5dc;
  font-size: 12px;
  font-weight: 800;
}

.draft-meta-line .segmented { margin: 0; }
.draft-meta-line .segment { min-height: 38px; padding: 0 6px; font-size: 12px; }

.draft-size-block { display: grid; gap: 9px; }
.draft-size-block p { margin: 0; color: var(--muted); font-size: 11px; }

.draft-size-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.owner-shell .draft-size-grid .inventory-size {
  min-height: 40px;
  border-color: #46515a;
  background: #111416;
  color: #cbd5dc;
}

.owner-shell .draft-size-grid .inventory-size.selected {
  border-color: var(--blue);
  background: var(--soft-blue);
  color: #82b8f5;
}

.draft-stock-table { display: grid; gap: 7px; }
.draft-stock-empty { color: var(--muted); font-size: 12px; }

.draft-stock-row {
  display: grid;
  grid-template-columns: minmax(54px, 1fr) 38px 34px 38px 24px;
  gap: 7px;
  align-items: center;
  min-height: 42px;
}

.draft-stock-row strong { font-size: 13px; }
.draft-stock-row span { text-align: center; font-size: 14px; font-weight: 900; }
.draft-stock-row em { color: var(--muted); font-size: 11px; font-style: normal; }

.draft-stock-row button {
  height: 36px;
  border: 1px solid #46515a;
  border-radius: var(--radius);
  background: #171b1e;
  color: #82b8f5;
  font-size: 18px;
  font-weight: 900;
}

.draft-submit-summary {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  border: 1px solid #285c49;
  border-radius: var(--radius);
  padding: 11px 12px;
  background: #10231c;
}

.draft-submit-summary.warning { border-color: #6b542e; background: #241d12; }
.draft-submit-summary strong { color: #72d6a7; font-size: 13px; }
.draft-submit-summary.warning strong { color: #e0b86e; }
.draft-submit-summary p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.draft-submit-actions {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 8px;
}

.draft-submit-actions button { min-height: 48px; }

.garment-snapshot-bar {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  background: #111416;
}

.garment-snapshot-bar > p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; }
.garment-snapshot-bar > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.garment-snapshot-item {
  display: grid;
  gap: 3px;
  border: 1px solid #293036;
  border-radius: 8px;
  padding: 9px;
  background: #0d1012;
}

.garment-snapshot-item strong { color: #d4a95f; font-size: 12px; }
.garment-snapshot-item span { color: #cbd5dc; font-size: 11px; }
.garment-snapshot-item em { color: #66c69a; font-size: 11px; font-style: normal; }

.result-source-correction {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid #b9d5ef;
  border-radius: var(--radius);
  padding: 12px;
  background: var(--soft-blue);
}

.result-source-correction-head strong,
.result-source-editor-head strong {
  display: block;
  font-size: 14px;
}

.result-source-correction-head p,
.result-source-editor-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.result-source-correction-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.result-source-editor {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(51, 96, 169, .22);
  padding-top: 12px;
}

.result-source-editor-head,
.result-source-editor-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.result-source-editor-product {
  justify-content: flex-start;
}

.result-source-editor-product .inventory-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 76px;
}

.result-source-editor-product strong,
.result-source-editor-product small {
  display: block;
}

.result-source-editor-product small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.result-source-meta {
  margin-top: 0;
}

.result-source-replay {
  min-height: 48px;
}

.inventory-mobile-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.inventory-mobile-tools > button,
.inventory-mobile-tools > details > summary {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: #111416;
  color: var(--ink);
  text-align: left;
}

.inventory-mobile-tools > button.selected {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.inventory-mobile-tools strong,
.inventory-mobile-tools small { display: block; }
.inventory-mobile-tools strong { font-size: 12px; line-height: 1.25; }
.inventory-mobile-tools small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.inventory-mobile-tools > details { position: relative; }

.inventory-mobile-tools > details > div {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  width: 210px;
  overflow: hidden;
  border: 1px solid #46515a;
  border-radius: var(--radius);
  background: #171a1d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .32);
}

.inventory-mobile-tools > details > div button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.inventory-mobile-tools > details > div button:last-child { border-bottom: 0; }
.inventory-mobile-filter-area { display: grid; gap: 10px; }

.inventory-mobile-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.inventory-mobile-search label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 11px;
  background: #101315;
}

.inventory-mobile-search input {
  width: 100%;
  min-height: 40px;
  border: 0;
  padding: 0;
  background: transparent;
  outline: 0;
}

.inventory-mobile-search > button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #101315;
  color: var(--ink);
  font-weight: 800;
}

.inventory-mobile-role-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.inventory-mobile-role-chips::-webkit-scrollbar { display: none; }
.inventory-mobile-role-chips button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #111416;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-mobile-role-chips button.selected {
  border-color: #3d6d9d;
  background: #17283a;
  color: #80b5f3;
}

.owner-shell .inventory-card,
.owner-shell .inventory-table,
.owner-shell .inventory-filter-toggle,
.owner-shell .inventory-tool,
.owner-shell .inventory-size-breakdown,
.owner-shell .linked-inventory,
.owner-shell .inventory-meta {
  border-color: var(--line);
  background: #111416;
}

.owner-shell .inventory-table th { background: #171a1d; }

.inventory-card { gap: 8px; border-radius: 10px; }
.inventory-card[hidden] { display: none; }
.inventory-card-head strong { color: #d2a459; }
.inventory-card-status { flex-wrap: nowrap; overflow: hidden; }
.inventory-card-status .inventory-status-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

.inventory-card-menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}

.inventory-card-menu summary {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(15, 17, 19, .82);
  cursor: pointer;
  list-style: none;
}

.inventory-card-menu summary .ui-icon { filter: brightness(0) invert(1); }

.inventory-card-menu > div {
  position: absolute;
  top: 42px;
  right: 0;
  width: 112px;
  overflow: hidden;
  border: 1px solid #46515a;
  border-radius: var(--radius);
  background: #171a1d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .36);
}

.inventory-card-menu > div button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.inventory-card-menu > div button:last-child { border-bottom: 0; }
.inventory-card-menu > div button.danger { color: var(--danger); }
.inventory-search-empty[hidden] { display: none; }

.inventory-mobile-sticky-action {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
}

.inventory-mobile-pair-action {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  min-height: 50px;
  border: 1px solid #46515a;
  border-radius: var(--radius);
  background: #101315;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.inventory-mobile-pair-action .ui-icon { width: 17px; height: 17px; }
.inventory-mobile-sticky-action .primary-button { display: flex; align-items: center; justify-content: center; gap: 8px; }
.inventory-mobile-sticky-action .primary-button .ui-icon { filter: brightness(0) invert(1); }

@media (max-width: 899px) {
  .app-shell.owner-shell { background: var(--surface); }
  .owner-shell .owner-desktop-dashboard { display: none !important; }
  .owner-shell .app-top { padding: max(12px, env(safe-area-inset-top)) 16px 10px; }
  .owner-shell .content { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .owner-shell .band { padding: 16px; }
  .owner-shell .brand-kicker { font-size: 11px; }
  .owner-shell h1 { font-size: 24px; }
  .owner-shell .top-tabs { margin-top: 12px; }
  .owner-shell .top-tab { min-height: 46px; height: 46px; }
  .owner-shell .workflow-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .owner-shell .workflow-steps span { justify-content: center; min-height: 42px; padding: 5px; }
  .owner-shell .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-shell .inventory-thumb { aspect-ratio: 3 / 4; }
  .owner-shell .inventory-panel-section { gap: 12px; }
  .inventory-desktop-tools,
  .inventory-desktop-filter,
  .inventory-desktop-heading { display: none; }
}

@media (min-width: 900px) {
  .owner-mobile-task-queue,
  .owner-mobile-tools,
  .owner-mobile-sticky-action,
  .inventory-mobile-tools,
  .inventory-mobile-filter-area,
  .inventory-mobile-sticky-action { display: none; }
  .owner-shell .content { padding-bottom: 42px; }
  .owner-shell .band,
  .owner-shell .band.soft { background: transparent; }
  .owner-upload-screen { max-width: 760px; margin: 0 auto; }
  .owner-upload-row { grid-template-columns: 120px minmax(0, 1fr); }
  .owner-upload-preview { width: 120px; height: 150px; }
}

/* D-082 owner workflow: warm light workspace with Safari-safe mobile navigation. */
.owner-shell {
  --ink: #182235;
  --muted: #687386;
  --line: #e2e6ec;
  --page: #f7f5ef;
  --surface: #fbfaf6;
  --soft-blue: #edf2ff;
  --blue: #456ed0;
  --blue-dark: #3155ad;
  --green: #5b9270;
  --warning: #9c7430;
  --danger: #b54e5c;
  --radius: 12px;
  color: var(--ink);
  color-scheme: light;
  background: var(--page);
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
}

.owner-shell .content { flex: 1 0 auto; }

.owner-shell .app-top {
  border-bottom-color: #ece8df;
  background: rgba(251, 250, 246, .96);
  backdrop-filter: saturate(150%) blur(14px);
}

.owner-shell .brand-kicker,
.owner-shell .owner-eyebrow { color: var(--blue); }

.owner-shell .account-mark,
.owner-shell .count-chip,
.owner-shell .source-kind,
.owner-shell .mini-label {
  background: #f0eee8;
  color: #586171;
}

.owner-shell .ui-icon {
  filter: invert(37%) sepia(9%) saturate(584%) hue-rotate(176deg) brightness(91%) contrast(88%);
}

.owner-shell .top-tab,
.owner-shell .segment,
.owner-shell .secondary-button,
.owner-shell .danger-button,
.owner-shell input,
.owner-shell textarea,
.owner-shell select {
  border-color: #d9dde5;
  background: #fffefa;
  color: var(--ink);
}

.owner-shell .top-tab.active,
.owner-shell .segment.selected,
.owner-shell .inventory-tool.selected {
  border-color: var(--blue);
  background: var(--soft-blue);
  color: var(--blue-dark);
}

.owner-shell .workflow-steps span {
  border-color: var(--line);
  background: #fffefa;
  color: var(--muted);
}

.owner-shell .workflow-steps em { background: #edf0f4; color: #616d7e; }
.owner-shell .workflow-steps .active { border-color: #9cb3ec; background: var(--soft-blue); color: var(--blue-dark); }
.owner-shell .workflow-steps .active em { background: var(--blue); color: #fff; }

.owner-shell .band,
.owner-shell .band.soft { border-bottom-color: #ece8df; background: var(--surface); }
.owner-shell .band.soft { background: #f6f6f2; }
.owner-shell .primary-button { background: var(--blue); color: #fff; }
.owner-shell .primary-button:hover { background: var(--blue-dark); }
.owner-shell .primary-button:disabled { background: #d9dee8; color: #818b9a; }

.owner-shell .status-badge,
.owner-shell .inventory-status-chip.success { background: #e9f4ed; color: #407759; }
.owner-shell .status-badge.waiting,
.owner-shell .inventory-status-chip.warning { background: #faf0d9; color: #886626; }
.owner-shell .inventory-status-chip,
.owner-shell .inventory-card-head em { background: #edf5f0; color: #497b60; }

.generation-landing { min-height: 0; }
.generation-landing-head,
.effects-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.generation-landing-head h2,
.effects-head h2 { font-size: clamp(25px, 5vw, 34px); letter-spacing: -.035em; }
.draft-chip {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #d9deea;
  border-radius: 999px;
  background: #fffefa;
  color: #697487;
  font-size: 11px;
  font-weight: 800;
}

.generation-flow-list {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}

.generation-flow-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 20px;
  gap: 6px 14px;
  align-items: center;
  width: 100%;
  min-height: 92px;
  border: 1px solid #dfe4ed;
  border-radius: 16px;
  padding: 20px;
  background: #fffefa;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(50, 58, 76, .055);
  text-align: left;
}

.generation-flow-card.sage { border-color: #dce8df; background: #fbfdf9; }
.generation-flow-card.sand { border-color: #e8dfcf; background: #fffdf8; }
.generation-flow-card:active { transform: translateY(1px); }
.generation-flow-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: #eaf0ff;
}
.generation-flow-card.sage .generation-flow-icon { background: #e9f3ec; }
.generation-flow-card.sand .generation-flow-icon { background: #f7eddc; }
.generation-flow-icon .ui-icon { width: 26px; height: 26px; filter: invert(38%) sepia(53%) saturate(1060%) hue-rotate(189deg) brightness(91%) contrast(91%); }
.generation-flow-card.sage .generation-flow-icon .ui-icon { filter: invert(51%) sepia(20%) saturate(697%) hue-rotate(91deg) brightness(92%) contrast(87%); }
.generation-flow-card.sand .generation-flow-icon .ui-icon { filter: invert(50%) sepia(26%) saturate(776%) hue-rotate(359deg) brightness(90%) contrast(86%); }
.generation-flow-copy strong { display: block; }
.generation-flow-copy strong { font-size: 19px; line-height: 1.25; }
.generation-flow-arrow { display: grid; place-items: center; }
.generation-flow-arrow .ui-icon { width: 18px; height: 18px; }
.generation-flow-steps {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #edf0f3;
}
.generation-flow-steps > span { display: flex; align-items: center; gap: 5px; color: #717b8d; font-size: 10px; white-space: nowrap; }
.generation-flow-steps em { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 999px; background: #edf1f8; color: #52637d; font-style: normal; font-weight: 900; }

.generation-queue-notice {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  width: min(100%, 760px);
  min-height: 72px;
  margin: 18px auto 0;
  border: 1px solid #dce6de;
  border-radius: 14px;
  padding: 12px 14px;
  background: #f4f9f5;
  color: var(--ink);
  text-align: left;
}
.generation-queue-notice.quiet { grid-template-columns: 40px minmax(0, 1fr); }
.generation-queue-notice > span:first-child { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #e5f1e8; }
.generation-queue-notice strong,
.generation-queue-notice small { display: block; }
.generation-queue-notice strong { font-size: 13px; }
.generation-queue-notice small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.effects-landing { padding-bottom: 16px; }
.effects-head { justify-content: flex-end; }
.effects-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.effects-head-actions .secondary-button { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.effects-favorite-button { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.effects-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 760px; margin: 20px auto 0; }
.effects-summary span { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; color: var(--muted); font-size: 12px; }
.effects-summary strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 23px; }
.effects-section { max-width: 100%; }
.effects-section > .section-heading,
.effects-section > .history-list,
.effects-section > .owner-open-job-list { width: min(100%, 920px); margin-right: auto; margin-left: auto; }

.catalog-manager-page { min-height: 60vh; }
.catalog-manager-heading { align-items: center; }
.catalog-manager-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 920px);
  margin: 18px auto 0;
}
.catalog-manager-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
}
.catalog-manager-card.selected { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(55, 105, 214, .12); }
.catalog-manager-select { position: relative; display: block; width: 100%; border: 0; padding: 0; background: #eef1f4; }
.catalog-manager-select img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.catalog-manager-check {
  position: absolute;
  z-index: 1;
  top: 9px;
  left: 9px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgba(29, 38, 53, .68);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 2px 7px rgba(20, 28, 40, .2);
}
.catalog-manager-card.selected .catalog-manager-check { background: var(--blue); }
.catalog-manager-missing { display: grid; place-items: center; aspect-ratio: 3 / 4; color: var(--muted); }
.catalog-manager-meta { display: grid; gap: 3px; padding: 11px 12px 7px; }
.catalog-manager-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.catalog-manager-meta span { color: var(--muted); font-size: 11px; }
.catalog-manager-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px 12px; }
.catalog-manager-card-actions button { min-height: 40px; }
.catalog-manager-bulk-bar {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 920px);
  margin: 18px auto 0;
  border: 1px solid #d7deea;
  border-radius: 14px;
  padding: 12px 14px;
  background: #f3f6fb;
}
.catalog-manager-bulk-bar > div { display: flex; gap: 8px; }

@media (max-width: 699px) {
  .catalog-manager-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .catalog-manager-card-actions { gap: 6px; padding: 7px 8px 9px; }
  .catalog-manager-card-actions button { min-width: 0; padding-right: 7px; padding-left: 7px; }
  .catalog-manager-meta { padding-right: 9px; padding-left: 9px; }
  .catalog-manager-bulk-bar { align-items: stretch; flex-direction: column; }
  .catalog-manager-bulk-bar > div { display: grid; grid-template-columns: 1fr 1fr; }
}

.owner-primary-nav {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 68px;
  margin: 9px -16px -9px;
  border-top: 1px solid #dde1e7;
  background: #fffefa;
}
.owner-primary-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 68px;
  border: 0;
  background: transparent;
  color: #7a8494;
  font-size: 11px;
  font-weight: 800;
}
.owner-primary-nav button.active { color: var(--blue-dark); }
.owner-primary-nav button.active .ui-icon { filter: invert(35%) sepia(66%) saturate(970%) hue-rotate(190deg) brightness(88%) contrast(91%); }
.owner-primary-nav .ui-icon { width: 21px; height: 21px; }
.safari-bottom-clearance { display: none; }

.inventory-home { display: grid; align-content: start; }
.inventory-home-actions {
  display: grid;
  gap: 14px;
  width: min(100%, 760px);
  margin: 0 auto;
}
.inventory-home-action {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fffefa;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 24px rgba(50, 58, 76, .045);
}
.inventory-home-action:active { transform: translateY(1px); }
.inventory-home-action-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--soft-blue);
}
.inventory-home-action-icon .ui-icon { width: 24px; height: 24px; }
.inventory-home-action > strong { font-size: 18px; }
.inventory-home-action > .ui-icon { width: 18px; height: 18px; }
.inventory-breakdown-page > .home-return { margin-bottom: 18px; }

.quick-stock-page { max-width: 980px; margin: 0 auto; }
.quick-stock-flow-note {
  display: grid;
  gap: 4px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #d7e4da;
  border-radius: 14px;
  background: #f2f8f4;
  color: #355f47;
}
.quick-stock-flow-note span { font-size: 13px; line-height: 1.6; }
.quick-stock-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 16px 0 12px;
  padding: 0 14px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.quick-stock-search .ui-icon { width: 20px; height: 20px; }
.quick-stock-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.quick-stock-role-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.quick-stock-list { display: grid; gap: 14px; margin-top: 16px; }
.quick-stock-product { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fffefa; content-visibility: auto; contain-intrinsic-size: 190px; }
.quick-stock-product-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; }
.quick-stock-product-head > span:last-child { display: grid; gap: 3px; }
.quick-stock-product-head small { color: var(--muted); font-size: 12px; }
.quick-stock-thumb { display: block; width: 72px; height: 88px; overflow: hidden; border-radius: 12px; background: #f0f1ee; }
.quick-stock-thumb img { width: 100%; height: 100%; object-fit: cover; }
.quick-stock-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin-top: 12px; }
.quick-stock-size { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; min-height: 58px; padding: 9px 12px; border: 1px solid #cfd7e4; border-radius: 12px; background: #fff; color: var(--ink); text-align: left; }
.quick-stock-size strong { grid-row: 1 / 3; font-size: 16px; }
.quick-stock-size span { font-size: 11px; color: var(--muted); }
.quick-stock-size em { grid-column: 2; grid-row: 1 / 3; color: var(--blue); font-size: 20px; font-style: normal; font-weight: 900; }
.quick-stock-success { display: grid; justify-items: center; gap: 14px; max-width: 680px; margin: 0 auto; text-align: center; }
.quick-stock-success-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #e3f2e8; color: #2e7a4d; font-size: 30px; font-weight: 900; }
.quick-stock-success h2 { margin: 0 0 5px; }
.quick-stock-success p { margin: 0; color: var(--muted); }
.quick-stock-success .button-row { width: 100%; justify-content: center; flex-wrap: wrap; }
.pair-common-sizes { margin: 0; color: #2f7450; font-size: 13px; }

.owner-shell .owner-mobile-sticky-action,
.owner-shell .inventory-mobile-sticky-action {
  position: static;
  margin: 18px 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
}
.owner-shell .owner-upload-sticky { margin: 18px 0 0; }
.owner-shell .owner-mobile-sticky-action p { color: var(--muted); }

.owner-shell .owner-upload-row,
.owner-shell .owner-garment-card,
.owner-shell .draft-garment-meta,
.owner-shell .garment-snapshot-bar,
.owner-shell .garment-snapshot-item,
.owner-shell .owner-mobile-tools,
.owner-shell .owner-photo-guide,
.owner-shell .inventory-mobile-tools > button,
.owner-shell .inventory-mobile-tools > details > summary,
.owner-shell .inventory-mobile-search label,
.owner-shell .inventory-mobile-search > button,
.owner-shell .inventory-card,
.owner-shell .inventory-table,
.owner-shell .inventory-filter-toggle,
.owner-shell .inventory-tool,
.owner-shell .inventory-size-breakdown,
.owner-shell .linked-inventory,
.owner-shell .inventory-meta {
  border-color: var(--line);
  background: #fffefa;
  color: var(--ink);
}
.owner-shell .owner-upload-preview { border-color: #cbd2dd; background: #f5f5f1; color: var(--muted); }
.owner-shell .draft-garment-meta { border-top-color: var(--line); background: #faf9f5; }
.owner-shell .draft-meta-line > span,
.owner-shell .draft-size-block > span { color: #445064; }
.owner-shell .draft-submit-summary { border-color: #cfe2d6; background: #f1f7f3; }
.owner-shell .draft-submit-summary.warning { border-color: #e7d6b5; background: #fbf5e8; }
.owner-shell .draft-submit-summary strong { color: #407758; }
.owner-shell .draft-submit-summary.warning strong { color: #8b6625; }
.owner-shell .garment-snapshot-item { border-color: #e2e6ec; background: #f8f7f3; }
.owner-shell .garment-snapshot-item strong { color: #916d2d; }
.owner-shell .garment-snapshot-item span { color: #49566a; }
.owner-shell .garment-snapshot-item em { color: #4d8564; }
.owner-shell .owner-safety-note { border-color: #d5e4da; background: #f1f7f3; color: #3f7757; }
.owner-shell .owner-safety-note .ui-icon { filter: invert(47%) sepia(20%) saturate(743%) hue-rotate(91deg) brightness(89%) contrast(89%); }

.owner-shell .inventory-size,
.owner-shell .draft-size-grid .inventory-size {
  min-height: 44px;
  border: 1px solid #cfd5df;
  background: #fffefa;
  color: #273449;
  font-weight: 850;
  opacity: 1;
}
.owner-shell .inventory-size.selected,
.owner-shell .draft-size-grid .inventory-size.selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.owner-shell .inventory-size:disabled { border-color: #e2e5ea; background: #f1f2f3; color: #8992a0; }
.owner-shell .draft-stock-row button,
.owner-shell .inventory-stock-row button,
.owner-shell .hand-stepper button { border-color: #cfd5df; background: #fffefa; color: var(--blue-dark); }

.owner-shell .inventory-mobile-role-chips button { border-color: var(--line); background: #fffefa; color: #586477; }
.owner-shell .inventory-mobile-role-chips button.selected { border-color: #9cb3ec; background: var(--soft-blue); color: var(--blue-dark); }
.owner-shell .inventory-table th { background: #f2f2ee; }
.owner-shell .inventory-card-head strong { color: #8a6729; }
.owner-shell .inventory-card-menu > div,
.owner-shell .inventory-mobile-tools > details > div { border-color: var(--line); background: #fffefa; box-shadow: 0 12px 30px rgba(50, 58, 76, .15); }
.owner-shell .inventory-card-menu > div button,
.owner-shell .inventory-mobile-tools > details > div button { border-bottom-color: var(--line); color: var(--ink); }
.owner-shell .inventory-mobile-pair-action { border-color: #cfd5df; background: #fffefa; color: var(--ink); }

@media (max-width: 899px) {
  .owner-shell .app-top {
    position: sticky;
    top: 0;
    z-index: 10;
    flex: 0 0 auto;
    padding: max(10px, env(safe-area-inset-top)) 16px 9px;
  }
  .owner-shell .brand-kicker { display: none; }
  .owner-shell .brand-row h1 { font-size: 19px; }
  .owner-shell .account-mark { min-height: 24px; padding: 3px 8px; font-size: 10px; }
  .owner-shell .top-tabs { display: none; }
  .owner-shell .content { padding-bottom: 0; }
  .owner-shell .band { padding: 20px 18px; }
  .owner-shell .inventory-mobile-sticky-action { margin-right: 18px; margin-left: 18px; }
  .owner-shell .generation-landing { padding: 18px 16px; }
  .generation-landing-head { gap: 10px; }
  .generation-landing-head .owner-eyebrow { margin-bottom: 5px; padding: 3px 7px; font-size: 10px; }
  .generation-landing-head h2 { font-size: 23px; }
  .generation-landing-head .subcopy { margin-top: 5px; font-size: 11px; line-height: 1.45; }
  .draft-chip { padding: 4px 7px; font-size: 9px; }
  .generation-flow-list { gap: 12px; margin-top: 0; }
  .generation-flow-card { grid-template-columns: 46px minmax(0, 1fr) 18px; gap: 11px; min-height: 78px; padding: 14px; border-radius: 14px; }
  .generation-flow-icon { width: 46px; height: 46px; border-radius: 13px; }
  .generation-flow-icon .ui-icon { width: 23px; height: 23px; }
  .generation-flow-copy strong { font-size: 16px; }
  .inventory-home { padding-top: 18px; padding-bottom: 18px; }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 899px) {
    .owner-shell { --safari-browser-toolbar-clearance: 78px; }
    .owner-shell .content { padding-bottom: 0; }
    .owner-shell .generation-landing { min-height: 0; }
    .safari-bottom-clearance { display: block; height: calc(var(--safari-browser-toolbar-clearance) + env(safe-area-inset-bottom)); }
    .image-preview-layer {
      place-items: start center;
      padding-bottom: calc(96px + env(safe-area-inset-bottom));
    }
    .image-preview-dialog { height: calc(100dvh - 116px - env(safe-area-inset-bottom)); }
  }
  @media (display-mode: standalone) and (max-width: 899px) {
    .owner-shell { --safari-browser-toolbar-clearance: 0px; }
    .image-preview-layer { place-items: center; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
    .image-preview-dialog { height: min(100%, 92dvh); }
  }
}

@media (min-width: 900px) {
  .owner-primary-nav,
  .safari-bottom-clearance { display: none; }
  .generation-flow-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1120px; }
  .generation-flow-card { grid-template-columns: 54px minmax(0, 1fr) 20px; min-height: 112px; }
  .generation-landing-head,
  .generation-queue-notice { max-width: 1120px; }
  .inventory-home-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1120px; }
}

/* D-128 replacement flows: match the warm light owner workspace without changing layout or behavior. */
.owner-shell .single-replacement-screen .single-flow-progress em {
  background: #edf0f4;
  color: #616d7e;
}

.owner-shell .single-replacement-screen .single-flow-progress .active {
  border-color: #9cb3ec;
  background: var(--soft-blue);
  color: var(--blue-dark);
}

.owner-shell .single-replacement-screen .single-flow-progress .active em {
  background: var(--blue);
  color: #fff;
}

.owner-shell .single-replacement-screen .single-flow-progress .done {
  color: #407759;
}

.owner-shell .single-replacement-screen .single-flow-progress .done em {
  background: var(--green);
  color: #fff;
}

.owner-shell .single-replacement-screen .single-step-card {
  border-color: #dfe4ed;
  background: #fffefa;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(50, 58, 76, .045);
}

.owner-shell .single-replacement-screen .single-step-card.active {
  border-color: #9cb3ec;
}

.owner-shell .single-replacement-screen .single-step-card.complete {
  border-color: #cfe2d6;
}

.owner-shell .single-replacement-screen .single-step-title > span {
  background: #eaf0ff;
  color: var(--blue-dark);
}

.owner-shell .single-replacement-screen .single-step-title h3,
.owner-shell .single-replacement-screen .single-photo-copy h3,
.owner-shell .single-replacement-screen .outfit-role-heading strong {
  color: var(--ink);
}

.owner-shell .single-replacement-screen .single-photo-card {
  border-color: #cbd2dd;
  background: #faf9f5;
}

.owner-shell .single-replacement-screen .single-photo-card.has-image {
  border-color: #9cb3ec;
}

.owner-shell .single-replacement-screen .single-photo-preview,
.owner-shell .single-replacement-screen .outfit-flatlay-card .single-photo-preview {
  background: #f0f1ee;
  color: #5f6b7d;
}

.owner-shell .single-replacement-screen .single-role-button,
.owner-shell .single-replacement-screen .outfit-accessory-button {
  border-color: #d9dde5;
  background: #fffefa;
  color: var(--ink);
}

.owner-shell .single-replacement-screen .single-role-button.selected,
.owner-shell .single-replacement-screen .outfit-accessory-button.selected {
  border-color: var(--blue);
  background: var(--soft-blue);
  color: var(--blue-dark);
}

.owner-shell .single-replacement-screen .outfit-accessory-button.selected span {
  color: var(--blue-dark);
}

.owner-shell .single-replacement-screen .single-product-meta,
.owner-shell .single-replacement-screen .outfit-label-editor > .single-meta-row,
.owner-shell .single-replacement-screen .outfit-role-section,
.owner-shell .single-replacement-screen .outfit-garment-label-card,
.owner-shell .single-replacement-screen .outfit-accessory-section {
  border-color: var(--line);
  background: #faf9f5;
  color: var(--ink);
}

.owner-shell .single-replacement-screen .outfit-reference-note {
  border: 1px solid #e1e4ea;
  background: #f3f4f7;
  color: #5f6b7d;
}

.owner-shell .single-replacement-screen .single-ready-summary em {
  background: #edf0f4;
  color: #616d7e;
}

.owner-shell .single-replacement-screen .single-ready-summary em.ready {
  background: var(--green);
  color: #fff;
}

/* D-152 shoes inventory: reuse the owner inventory language and keep every product image at 3:4. */
.shoe-inventory-page,
.shoe-editor-page { display: grid; gap: 16px; }

.shoe-season-filter { margin: 0; }
.shoe-season-filter > div { display: flex; flex-wrap: wrap; gap: 8px; }

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

.shoe-inventory-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefa;
  color: var(--ink);
  text-align: left;
}

.shoe-inventory-card > .ui-icon { width: 18px; height: 18px; opacity: .6; }

.shoe-inventory-photo {
  display: grid;
  place-items: center;
  width: 82px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 9px;
  background: #f3f7f6;
  color: var(--muted);
}

.shoe-inventory-photo img { width: 100%; height: 100%; object-fit: cover; }
.shoe-inventory-photo em { font-size: 11px; font-style: normal; }

.shoe-inventory-copy { display: grid; gap: 5px; min-width: 0; }
.shoe-inventory-copy strong { font-size: 15px; }
.shoe-inventory-copy small { color: var(--muted); font-size: 12px; line-height: 1.35; }

.shoe-season-first { margin-top: 4px; }
.shoe-editor-media { margin-top: 0; }
.shoe-main-photo { aspect-ratio: 3 / 4; min-height: 280px; height: auto; background: #f3f7f6; }
.shoe-main-photo img { width: 100%; height: 100%; object-fit: cover; }
.shoe-photo-rule { margin: -6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.shoe-size-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }

@media (max-width: 640px) {
  .shoe-inventory-grid { grid-template-columns: 1fr; }
  .shoe-inventory-card { grid-template-columns: 74px minmax(0, 1fr) 18px; }
  .shoe-inventory-photo { width: 74px; }
  .shoe-size-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shoe-main-photo { min-height: 320px; }
}

@media (min-width: 900px) {
  .shoe-inventory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shoe-editor-page { max-width: 760px; margin: 0 auto; }
}
