:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: rgba(255, 255, 255, .72);
  --line: rgba(120, 130, 145, .18);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #2f6f68;
  --accent-strong: #1d514c;
  --warn: #a15c00;
  --danger: #b3261e;
  --ok: #1f7a3f;
  --blue: #285a9f;
  --shadow: 0 18px 48px rgba(25, 32, 44, .09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -10%, rgba(190, 216, 229, .55), transparent 32%),
    radial-gradient(circle at 88% 0%, rgba(221, 209, 193, .42), transparent 28%),
    linear-gradient(180deg, #f9fafb 0%, var(--bg) 48%, #eff2f4 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: block;
  padding: 18px 24px 12px;
  background: rgba(250, 251, 252, .78);
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(24px) saturate(1.35);
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 22px;
  font-weight: 750;
}

h2 {
  font-size: 17px;
  font-weight: 720;
}

#syncStatus,
.panel-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.tabs {
  display: grid;
  grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
  align-items: center;
  gap: 16px;
  width: 100%;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-left {
  justify-content: flex-start;
}

.nav-center {
  justify-content: center;
}

.nav-right {
  justify-content: flex-end;
}

.header-date {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.sr-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ui-temporarily-hidden {
  display: none !important;
}

button,
select,
input {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  min-height: 34px;
}

button {
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 650;
}

button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.tab.active,
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.undo-btn {
  min-width: 34px;
  width: 34px;
  padding: 0;
  background: #efe9de;
  color: #51483d;
  font-size: 18px;
}

.undo-btn:disabled {
  background: #f4f5f5;
  color: #9aa3a8;
}

main {
  padding: 22px 24px 36px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 18px;
  background: rgba(255, 255, 255, .48);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.28);
}

.metric-group {
  padding: 4px 6px;
  background: transparent;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}

.metric-group h2 {
  margin: 0 0 8px 2px;
  color: #6d747b;
  font-size: 13px;
}

.metric-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 8px;
}

.metric {
  min-height: 58px;
  padding: 9px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.metric:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(232,239,241,.58));
  border-color: rgba(255, 255, 255, .76);
}

.metric .label {
  color: var(--muted);
  font-size: 13px;
}

.metric .value {
  margin-top: 3px;
  font-size: 22px;
  font-weight: 780;
}

.daily-panel {
  margin-bottom: 16px;
}

.daily-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  padding: 14px 16px 16px;
}

.daily-item {
  display: block;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .54);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .58), rgba(228, 239, 244, .38));
  box-shadow: 0 16px 34px rgba(31, 43, 55, .08), inset 0 1px 0 rgba(255, 255, 255, .62);
  backdrop-filter: blur(18px) saturate(1.24);
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.daily-item:hover,
.daily-item.active {
  transform: translateY(-2px);
  border-color: rgba(67, 120, 96, .2);
  background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(221,238,238,.52));
  box-shadow: 0 20px 38px rgba(31, 43, 55, .12), inset 0 1px 0 rgba(255, 255, 255, .68);
}

.daily-item label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 750;
}

.daily-item.done label span {
  color: var(--muted);
  text-decoration: line-through;
}

.daily-item-title {
  text-align: center;
  font-weight: 800;
  color: var(--text);
}

.daily-item-main {
  display: grid;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.daily-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 10px;
}

.daily-item-shipping .daily-metrics {
  grid-template-columns: repeat(3, minmax(80px, 1fr));
}

.daily-metric {
  appearance: none;
  min-height: 82px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .52), rgba(220, 236, 243, .34));
  box-shadow: 0 12px 24px rgba(31, 43, 55, .08), inset 0 1px 0 rgba(255, 255, 255, .72);
  backdrop-filter: blur(16px) saturate(1.28);
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.daily-metric:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(255, 255, 255, .7), rgba(222, 240, 244, .5));
  border-color: rgba(67, 120, 96, .22);
  box-shadow: 0 16px 28px rgba(31, 43, 55, .11), inset 0 1px 0 rgba(255, 255, 255, .78);
}

.daily-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.daily-metric strong {
  display: block;
  margin-top: 6px;
  color: var(--accent-strong);
  font-size: 24px;
  line-height: 1.1;
}

.daily-metric.danger strong,
.daily-metric.danger span {
  color: var(--danger);
}

.note-icon {
  min-width: 34px;
  padding: 4px 8px;
  border-color: #d8d7d0;
  background: #f4f0e7;
}

.work-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid #dedbd2;
  border-radius: 8px;
  background: #fbfaf5;
}

.work-note span {
  font-weight: 750;
}

.work-note small {
  color: var(--muted);
}

.reshipment-panel {
  margin-bottom: 16px;
}

.fourpx-sync-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.fourpx-sync-head {
  align-items: flex-start;
  padding: 15px 16px 12px;
}

.fourpx-sync-head h2 {
  margin: 0;
}

.fourpx-sync-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.fourpx-sync-status {
  margin: 0 16px 12px;
  padding: 10px 12px;
  border: 1px solid #dce4e2;
  border-radius: 8px;
  background: #f5f9f8;
  color: #38524d;
  font-size: 13px;
}

.fourpx-review-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fourpx-review-summary span {
  color: var(--muted);
}

.fourpx-review-summary button {
  margin-left: auto;
}

.fourpx-sync-items {
  max-height: 440px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.fourpx-sync-items input,
.fourpx-sync-items select {
  min-width: 132px;
}

.fourpx-sync-items input[type="checkbox"] {
  min-width: 16px;
}

.fourpx-change {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

.fourpx-change.ship {
  color: #315d4c;
  background: #e1eee7;
}

.fourpx-change.revert {
  color: #79533f;
  background: #f2e7dd;
}

.fourpx-history {
  border-top: 1px solid var(--line);
}

.fourpx-history > summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 750;
}

.fourpx-batch-list {
  border-top: 1px solid var(--line);
}

.fourpx-batch-row {
  display: grid;
  grid-template-columns: 145px 80px 92px minmax(180px, 1fr) 58px;
  width: 100%;
  min-height: 42px;
  padding: 8px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.fourpx-batch-row:hover {
  background: rgba(226, 236, 233, .45);
}

.fourpx-batch-state {
  font-weight: 750;
}

.fourpx-batch-state.state-review {
  color: #9a662a;
}

.fourpx-batch-state.state-applied {
  color: #3b765d;
}

.fourpx-batch-state.state-failed {
  color: var(--danger);
}

.danger-text {
  border: 0;
  background: transparent;
  color: var(--danger);
  white-space: nowrap;
}

.reshipment-panel > summary {
  padding: 14px 16px;
  font-weight: 800;
  cursor: pointer;
}

.reshipment-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.reshipment-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.reshipment-form input,
.reshipment-form select {
  width: 100%;
  min-height: 36px;
}

.reshipment-form .wide {
  grid-column: span 2;
}

.reshipment-toolbar {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

.reshipment-status {
  min-width: 86px;
  border-color: rgba(174, 125, 104, .22);
  background: rgba(239, 222, 214, .72);
}

.reshipment-status.done {
  border-color: rgba(82, 127, 105, .22);
  background: rgba(218, 234, 224, .72);
}

.reshipment-tracking {
  min-width: 150px;
}

.note-list {
  display: grid;
  gap: 8px;
  padding: 10px 16px 0;
}

.note-card {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfc;
}

.note-card p {
  margin-top: 4px;
  white-space: pre-wrap;
}

.note-history {
  padding: 0 16px 10px;
}

.note-history summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 750;
}

.metric.danger .value {
  color: var(--danger);
}

.metric.warn .value {
  color: var(--warn);
}

.metric.blue .value {
  color: var(--blue);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

#dashboardBackfillGroup {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-reshipment-panel {
  grid-column: 1 / -1;
}

.reshipment-dashboard-item {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-right: 16px;
}

.reshipment-dashboard-item .dashboard-actions {
  grid-column: auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.22);
}

.panel-head,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.toolbar {
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
}

.toolbar input {
  min-width: 280px;
  padding: 7px 10px;
}

.toolbar select {
  padding: 7px 10px;
}

.backfill-filter-toolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 0 0 14px;
  box-shadow: none;
}

.backfill-filter-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.backfill-filter-toolbar input {
  min-width: 0;
  width: 96px;
}

.backfill-filter-toolbar select {
  min-width: 130px;
}

.backfill-filter-toolbar input[type="search"] {
  width: 170px;
}

.inline-search {
  padding: 0 16px 12px;
  border-bottom: 1px solid rgba(120, 130, 145, .12);
}

.inline-search input {
  width: 100%;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .76);
}

.compact-search input {
  min-height: 32px;
  font-size: 13px;
}

.list {
  max-height: 520px;
  overflow: auto;
}

.item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 13px 16px;
  padding-right: 72px;
  border-bottom: 1px solid var(--line);
}

.item:last-child {
  border-bottom: 0;
}

.item-title {
  font-weight: 700;
}

.dashboard-media {
  display: flex;
  width: 76px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dashboard-media .image-stack {
  justify-content: center;
}

.image-placeholder {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.purchase-age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(39, 83, 135, .14);
  border-radius: 999px;
  background: rgba(234, 241, 251, .96);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(63, 83, 101, .10);
}

.purchase-age-badge.warn {
  border-color: rgba(176, 105, 45, .16);
  background: rgba(255, 243, 223, .96);
  color: var(--warn);
}

.dashboard-item-body {
  min-width: 0;
}

.dashboard-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dashboard-title-row .item-title {
  min-width: 0;
}

.purchase-line-items {
  display: grid;
  gap: 8px;
  min-width: 360px;
}

.purchase-line-items.compact {
  margin: 8px 0 10px;
  min-width: 0;
}

.purchase-line-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(207, 219, 224, .86);
  border-radius: 14px;
  background: rgba(250, 253, 253, .78);
}

.purchase-line-items.compact .purchase-line-item {
  padding: 7px 9px;
  background: rgba(248, 252, 252, .70);
}

.purchase-line-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.line-image-thumb {
  width: 50px;
  height: 50px;
  border-radius: 11px;
}

.line-image-placeholder {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
}

.purchase-line-main {
  min-width: 0;
}

.purchase-line-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
}

.purchase-line-variant {
  margin-top: 3px;
  color: #6a7684;
  font-size: 12px;
  line-height: 1.35;
}

.purchase-line-sku {
  margin-top: 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
  word-break: break-word;
}

.purchase-line-sku.muted {
  color: var(--muted);
}

.purchase-line-cn,
.purchase-line-note {
  margin-top: 2px;
  color: #72808c;
  font-size: 11px;
  line-height: 1.35;
}

.purchase-line-qty {
  align-self: start;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(234, 241, 251, .9);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.line-index {
  display: inline-flex;
  margin-left: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.spu-plus-btn {
  flex: 0 0 auto;
  min-width: 22px;
  width: 22px;
  min-height: 22px;
  padding: 0;
  border: 1px solid rgba(39, 83, 135, .18);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.spu-plus-btn:hover {
  border-color: rgba(39, 83, 135, .34);
  background: rgba(234, 241, 251, .92);
}

.meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.provider-number {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(83, 119, 105, .22);
  border-radius: 7px;
  background: rgba(225, 237, 231, .66);
  color: #365448;
}

.provider-number.missing {
  border-color: rgba(154, 118, 95, .18);
  background: rgba(240, 232, 226, .58);
  color: #806b5d;
}

.copy-provider {
  min-height: 25px;
  padding: 2px 7px;
  border-color: rgba(83, 119, 105, .24);
  border-radius: 6px;
  background: rgba(255, 255, 255, .72);
  color: #365448;
  font-size: 12px;
}

.carrier-badge,
.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.backfill-copy-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.backfill-priority-item {
  border-color: rgba(178, 56, 70, .18);
}

.backfill-alert-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(201, 52, 70, .12);
  color: #c93446;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  vertical-align: 1px;
}

.copy-chip {
  padding: 3px 7px;
  border: 1px solid rgba(83, 119, 105, .18);
  border-radius: 7px;
  background: rgba(255, 255, 255, .72);
  color: #365448;
}

.copy-chip button,
.carrier-badge button {
  min-height: 22px;
  padding: 1px 6px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, .68);
  color: #365448;
  font-size: 11px;
}

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

.dashboard-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(120, 130, 145, .12);
}

.dashboard-actions select {
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 8px;
}

.action-btn {
  border-color: transparent;
}

.action-purchase {
  background: #d9b9aa;
  color: #3f2d27;
}

.action-ready {
  background: #c9d6c1;
  color: #2d3b2b;
}

.action-packed {
  background: #c7cedb;
  color: #27313f;
}

.action-shipped,
.action-next {
  background: #a9c6b8;
  color: #17382d;
}

.action-edit {
  background: transparent;
  color: #5f696f;
  border-color: transparent;
  padding: 0;
  min-width: 28px;
  width: 28px;
  min-height: 28px;
  font-size: 17px;
}

.icon-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.item > .icon-actions {
  position: absolute;
  top: 8px;
  right: 10px;
}

.item.has-corner-tag > .icon-actions {
  top: 38px;
}

.item.has-corner-tag:has(.corner-tags) > .icon-actions {
  top: 62px;
}

.corner-tags {
  position: absolute;
  top: 8px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.corner-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(234, 241, 251, .92);
  color: var(--blue);
  font-size: 12px;
  font-weight: 780;
  box-shadow: 0 8px 22px rgba(63, 83, 101, .10);
}

.corner-tag.warn {
  background: rgba(255, 243, 223, .95);
  color: var(--warn);
}

.corner-tag.danger {
  background: rgba(253, 236, 235, .95);
  color: var(--danger);
}

.icon-btn {
  min-width: 28px;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7a858c;
  font-size: 17px;
}

.icon-btn:hover {
  background: rgba(232, 238, 241, .72);
  color: var(--accent-strong);
}

.favorite-btn.on {
  color: #a87516;
}

.active-filter {
  background: #fff5d8;
  border-color: #e3c56e;
  color: #7d5a00;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f3;
  color: #40505a;
  font-size: 12px;
  font-weight: 700;
}

.tag.danger {
  background: #fdeceb;
  color: var(--danger);
}

.tag.warn {
  background: #fff3df;
  color: var(--warn);
}

.tag.ok {
  background: #eaf7ef;
  color: var(--ok);
}

.tag.blue {
  background: #eaf1fb;
  color: var(--blue);
}

.shop-banned-cell {
  color: #9aa3a8;
  opacity: .72;
}

.admin-workspace {
  padding: 24px;
}

.workspace-head {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.workspace-head h2 {
  margin: 0 0 4px;
  color: #1f2933;
  font-size: 18px;
}

.workspace-head p {
  margin: 0;
  color: #7b858d;
  font-size: 13px;
}

.workspace-head button {
  min-width: 38px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d8e0e8;
  border-radius: 7px;
  background: #fff;
  color: #21313f;
  font-size: 17px;
}

.workspace-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.workspace-management-card {
  display: grid;
  gap: 8px;
  min-height: 86px;
  padding: 20px 22px;
  border: 1px solid #dfe4e8;
  border-radius: 14px;
  background: #fff;
  color: #25313e;
  text-align: left;
}

.workspace-management-card:hover,
.workspace-management-card:focus-visible {
  background: #f8faf9;
  border-color: #cad4dc;
}

.workspace-management-card span {
  font-size: 17px;
  font-weight: 760;
}

.workspace-management-card strong {
  color: #687386;
  font-size: 14px;
  font-weight: 650;
}

.workspace-section-title {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 0 8px;
}

.workspace-section-title h3 {
  margin: 0;
  color: #263442;
  font-size: 15px;
}

.workspace-section-title span {
  color: #8b949b;
  font-size: 12px;
}

.workspace-table-wrap {
  overflow: auto;
  border: 1px solid #e4e7eb;
  border-radius: 8px;
  background: #fff;
}

.workspace-table {
  margin: 0;
  width: 100%;
  min-width: 1480px;
  border-collapse: collapse;
}

.workspace-table th,
.workspace-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #edf0f2;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

.workspace-table th {
  background: #fbfbfa;
  color: #5f6972;
  font-weight: 700;
}

.workspace-table tbody tr:hover {
  background: #fcfdfc;
}

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

.workspace-table input,
.workspace-table select {
  width: 100%;
  min-width: 88px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f8faf9;
  color: #1f2933;
  font-size: 13px;
}

.workspace-table .workspace-tag-select {
  border-color: transparent;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.workspace-table .workspace-tag-select.readonly {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .48);
}

.workspace-table .workspace-tag-select.operator-empty,
.workspace-table .workspace-tag-select.status-empty,
.workspace-table .workspace-tag-select.supplier-empty {
  background: #f5f7f7;
  color: #6b747b;
}

.workspace-table .operator-ava { background: #fff4df; color: #7a5414; }
.workspace-table .operator-bella { background: #fff0f5; color: #86425c; }
.workspace-table .operator-cara { background: #edf7ff; color: #2b5e84; }
.workspace-table .operator-dora { background: #eff8ed; color: #38693b; }
.workspace-table .operator-emma { background: #f5f0ff; color: #5c4a87; }
.workspace-table .operator-flora { background: #fff5ed; color: #87532f; }

.workspace-table .status-running { background: #fff2dd; color: #855411; }
.workspace-table .status-open { background: #eaf6ef; color: #27724e; }
.workspace-table .status-paused { background: #f3f4f6; color: #6b7280; }
.workspace-table .status-pending { background: #eef3ff; color: #335f9b; }

.workspace-table .supplier-needed { background: #fff0e1; color: #9a4a00; }
.workspace-table .supplier-1 { background: #eef8f5; color: #2f685b; }
.workspace-table .supplier-2 { background: #f1f5ff; color: #365e9b; }
.workspace-table .supplier-3 { background: #f6f0ff; color: #634b88; }
.workspace-table .supplier-4 { background: #fff1f4; color: #8a4458; }
.workspace-table .supplier-5 { background: #f5f7ed; color: #617136; }
.workspace-table .supplier-6 { background: #edf7ff; color: #2d6388; }

.workspace-table .workspace-tag-select:hover,
.workspace-table .workspace-tag-select:focus {
  border-color: rgba(32, 88, 124, .26);
}

.workspace-table .workspace-date-input {
  min-width: 64px;
  max-width: 76px;
  text-align: center;
}

.workspace-table input:focus,
.workspace-table select:focus {
  border-color: #9eb5c5;
  background: #fff;
  outline: 0;
}

.workspace-table input:disabled,
.workspace-table select:disabled {
  border-color: transparent;
  opacity: 1;
  color: #27313b;
  -webkit-text-fill-color: #27313b;
}

.workspace-metric {
  display: inline-grid;
  min-width: 34px;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #324047;
  font-weight: 750;
}

.workspace-check {
  display: grid;
  place-items: center;
}

.workspace-check input {
  position: absolute;
  width: 1px;
  min-width: 0;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

.workspace-check span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #cfd8dd;
  border-radius: 6px;
  background: #fff;
}

.workspace-check input:checked + span {
  border-color: #79ad91;
  background: #eaf7ef;
}

.workspace-check input:checked + span::after {
  content: "✓";
  color: #27724e;
  font-size: 14px;
  font-weight: 800;
}

.workspace-check input:disabled + span {
  opacity: .78;
}

.workspace-table td:nth-child(1) input {
  min-width: 76px;
}

.workspace-table td:nth-child(8) input {
  min-width: 220px;
}

.workspace-save-row,
.workspace-edit-row {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #cad5df;
  border-radius: 6px;
  background: #fff;
  color: #1f3650;
  font-size: 13px;
  font-weight: 700;
}

.workspace-save-row:hover,
.workspace-save-row:focus-visible,
.workspace-edit-row:hover,
.workspace-edit-row:focus-visible {
  background: #eef3f8;
}

.workspace-edit-row {
  color: #596879;
}

.workspace-add-row {
  display: grid;
  width: 100%;
  min-height: 38px;
  place-items: center;
  border: 0;
  border-top: 1px solid #edf0f2;
  background: #fff;
  color: #2b5c7d;
  font-size: 22px;
  font-weight: 650;
}

.workspace-add-row:hover,
.workspace-add-row:focus-visible {
  background: #f8faf9;
}

.workspace-pending {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ff8a00;
  color: #191919;
  font-weight: 700;
}

@media (max-width: 760px) {
  .workspace-management-grid {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow: auto;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(222, 229, 232, .9);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(31, 42, 55, .08);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
  table-layout: auto;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(225, 231, 234, .82);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.45;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(247, 249, 250, .96);
  color: #56646c;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 rgba(216, 224, 228, .9);
}

th:first-child {
  border-top-left-radius: 12px;
}

th:last-child {
  border-top-right-radius: 12px;
}

tbody tr {
  background: rgba(255, 255, 255, .72);
  transition: background .14s ease;
}

tbody tr:hover {
  background: rgba(246, 249, 249, .98);
}

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

td {
  color: #334039;
}

.th-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.th-filter {
  min-width: 22px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9aa6ab;
  font-size: 13px;
  line-height: 1;
}

th:hover .th-filter {
  background: rgba(218, 226, 230, .72);
  color: #52616a;
}

td.wrap {
  max-width: 300px;
  white-space: pre-wrap;
}

.data-table .product-title-column {
  min-width: 320px;
  width: 30%;
  max-width: 520px;
}

.data-table .sku-code-column {
  min-width: 220px;
  max-width: 360px;
}

.data-table .address-column {
  min-width: 260px;
  max-width: 420px;
}

.data-table td.product-title-column,
.data-table td.sku-code-column,
.data-table td.address-column {
  vertical-align: top;
}

.data-table .product-title-column .wrap,
.data-table .sku-code-column,
.data-table .address-column .wrap {
  overflow-wrap: anywhere;
  word-break: normal;
}

#shippingRows table {
  min-width: 1420px;
}

#shippingRows .product-title-column {
  min-width: 360px;
  width: 34%;
}

.import-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.screenshot-import-box {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: stretch;
  padding: 0 16px 16px;
}

.paste-zone {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px dashed rgba(47, 111, 104, .36);
  border-radius: 12px;
  background: rgba(248, 251, 252, .9);
  cursor: text;
}

.paste-zone:focus {
  outline: 2px solid rgba(47, 111, 104, .22);
  border-color: var(--accent);
}

.paste-zone span,
.paste-zone small {
  color: var(--muted);
  font-size: 12px;
}

.screenshot-import-box input[type="file"],
.screenshot-import-box button {
  align-self: center;
}

.match-lab-panel {
  margin: 16px 0;
  overflow: hidden;
  border-color: rgba(96, 122, 145, .24);
  background:
    linear-gradient(135deg, rgba(244, 248, 252, .94), rgba(250, 247, 240, .9));
}

.match-lab-head {
  align-items: flex-start;
}

.match-lab-head h2 {
  margin: 0;
}

.match-lab-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid rgba(139, 103, 50, .25);
  border-radius: 999px;
  background: #fff3d8;
  color: #805b17;
  font-size: 12px;
  font-weight: 800;
}

.match-lab-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.match-lab-actions span {
  color: var(--muted);
  font-size: 13px;
}

.match-lab-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.match-lab-summary:empty {
  display: none;
}

.match-lab-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(120, 139, 151, .16);
  border-radius: 9px;
  background: rgba(255, 255, 255, .62);
}

.match-lab-summary span {
  color: var(--muted);
  font-size: 12px;
}

.match-lab-summary strong {
  font-size: 18px;
}

.match-lab-rows {
  max-height: 680px;
  overflow: auto;
}

.match-lab-item {
  display: grid;
  grid-template-columns: minmax(210px, .75fr) minmax(360px, 1.35fr) minmax(300px, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .48);
}

.match-lab-item:last-child {
  border-bottom: 0;
}

.match-lab-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.match-lab-current {
  font-weight: 760;
}

.match-lab-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.match-lab-controls select {
  max-width: 280px;
}

.match-lab-controls input[list] {
  width: 220px;
  padding: 6px 8px;
}

.match-lab-spu-picker {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
}

.match-lab-spu-search,
.match-lab-spu-result {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.match-lab-spu-search input {
  width: 220px;
}

.match-lab-spu-result {
  margin-top: 8px;
}

.match-lab-spu-result strong {
  flex-basis: 100%;
}

.match-lab-spu-result select {
  min-width: 320px;
  max-width: 100%;
}

.is-busy {
  cursor: wait;
  opacity: .65;
}

.match-lab-controls .inline-toggle {
  white-space: nowrap;
}

.match-lab-simulation {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(67, 120, 96, .18);
  border-radius: 8px;
  background: rgba(231, 242, 236, .72);
  color: #365448;
  font-size: 12px;
  font-weight: 700;
}

.match-lab-simulation.danger {
  border-color: rgba(179, 38, 30, .18);
  background: rgba(253, 236, 235, .76);
  color: var(--danger);
}

.inventory-sku-suggestions {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.inventory-sku-suggestions label,
.import-item-stack,
.import-item-row {
  display: grid;
  gap: 6px;
}

.import-item-row {
  padding: 8px;
  border: 1px solid rgba(222, 229, 232, .9);
  border-radius: 12px;
  background: rgba(255, 255, 255, .66);
}

.import-sku-compact {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 28px;
  gap: 6px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.import-sku-compact-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.import-sku-plus {
  min-width: 26px;
  width: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
}

.import-item-title,
.inventory-sku-suggestions span {
  font-size: 12px;
  color: var(--muted);
}

.inventory-sku-suggestions select,
.inventory-sku-suggestions input {
  width: 100%;
}

.sku-rule-list {
  display: grid;
  gap: 5px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(222, 229, 232, .9);
}

.sku-rule-list div {
  display: grid;
  gap: 2px;
}

.sku-rule-list span {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.sku-rule-list small {
  color: var(--muted);
  font-size: 11px;
}

.import-item-edit {
  width: 260px;
  min-height: 64px;
}

.import-qty-edit {
  width: 72px;
}

.import-candidate-detail {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(47, 111, 104, .18);
  border-radius: 12px;
  background: rgba(245, 249, 250, .9);
}

.import-sku-review {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(360px, 1.15fr);
  gap: 16px;
  margin-bottom: 14px;
}

.import-sku-source,
.import-sku-candidates {
  display: grid;
  gap: 10px;
  align-content: start;
}

.import-candidate-list {
  display: grid;
  gap: 6px;
}

.import-candidate-card {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}

.import-candidate-card.selected {
  border-color: var(--accent);
  background: rgba(235, 246, 247, .9);
}

.import-candidate-card:hover {
  border-color: var(--accent);
  background: rgba(248, 251, 252, .98);
}

.import-candidate-card small {
  color: var(--muted);
  font-weight: 500;
}

.manual-spu-bind {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.manual-spu-bind h3 {
  margin: 0;
}

.manual-spu-search,
.manual-spu-result {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-spu-search input {
  flex: 1 1 220px;
}

.manual-spu-result select {
  flex: 1 1 100%;
}

.import-new-sku-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(47, 111, 104, .18);
  border-radius: 12px;
  background: rgba(248, 251, 252, .9);
}

.import-new-sku-form h3 {
  grid-column: 1 / -1;
  margin: 0;
}

.import-new-sku-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.import-new-sku-form button {
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  .match-lab-item {
    grid-template-columns: 1fr;
  }

  .match-lab-summary {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

.download-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.rules-editor {
  width: calc(100% - 32px);
  min-height: 180px;
  margin: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}

.rules-editor[readonly] {
  background: rgba(246, 248, 249, .72);
  color: #4e5a60;
  cursor: default;
}

.rules-editor.small {
  min-height: 86px;
  margin-top: 8px;
}

.rules-subeditor {
  display: block;
  margin: 0 16px 14px;
}

.rules-subeditor span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.rules-subeditor .rules-editor {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.compact-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #eef7f5;
  border: 1px solid #cfe3df;
  border-radius: 8px;
  color: #254741;
  font-size: 13px;
  font-weight: 650;
}

.compact-rules {
  margin-bottom: 12px;
  box-shadow: none;
}

.shipping-grid {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-bottom: 14px;
}

.shipping-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.shipping-header h2,
.shipping-pane-head h3 {
  margin: 0;
}

.shipping-header p,
.shipping-pane-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.shipping-header-actions,
.shipping-pane-head,
.shipping-pane-head .actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.shipping-header-actions input {
  width: min(300px, 30vw);
}

.shipping-flow-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: rgba(247, 249, 249, .86);
}

.shipping-flow-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 750;
}

.shipping-flow-tab:hover {
  color: var(--text);
  background: rgba(219, 231, 228, .55);
}

.shipping-flow-tab.active {
  color: #274d46;
  background: rgba(205, 226, 219, .82);
}

.shipping-flow-tab span {
  min-width: 21px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  font-size: 11px;
  text-align: center;
}

.shipping-workspace {
  position: relative;
  min-height: 520px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.16);
}

.shipping-pane {
  display: none;
}

.shipping-pane.active {
  display: block;
}

.shipping-pane-head {
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.shipping-pane > .table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.shipping-pane .work-note {
  margin: 12px 16px;
}

.shipping-sticky-bulk {
  position: sticky;
  z-index: 8;
  bottom: 10px;
  width: calc(100% - 24px);
  margin: 12px;
  border-color: rgba(185, 202, 197, .9);
  border-radius: 8px;
  background: rgba(250, 252, 251, .94);
  box-shadow: 0 10px 28px rgba(42, 58, 54, .12);
}

.shipping-pane .fourpx-sync-panel,
.shipping-pane .reshipment-panel {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.shipping-review-split {
  display: grid;
  grid-template-columns: minmax(0, var(--shipping-check-width, 50%)) 8px minmax(0, 1fr);
  min-height: 455px;
}

.shipping-review-column {
  min-width: 0;
  overflow: hidden;
}

.shipping-review-resizer {
  position: relative;
  z-index: 3;
  width: 8px;
  cursor: col-resize;
  background: rgba(225, 231, 230, .72);
  touch-action: none;
}

.shipping-review-resizer::after {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 4px;
  height: 44px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: #aebbb8;
  content: "";
  opacity: .48;
}

.shipping-review-resizer:hover,
.shipping-review-resizer:focus-visible,
body.resizing-columns .shipping-review-resizer {
  background: rgba(198, 218, 212, .95);
  outline: 0;
}

body.resizing-columns {
  cursor: col-resize;
  user-select: none;
}

.shipping-review-column .panel-head {
  min-height: 62px;
  padding: 10px 14px;
}

.shipping-review-column .panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.shipping-review-column .panel-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.shipping-review-column .logistics-check-wrap,
.shipping-review-column .preview-wrap {
  height: 330px;
  max-height: 330px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.shipping-review-column .logistics-bulk {
  min-height: 60px;
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.excel-review-column .export-status {
  min-height: 34px;
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}

.excel-review-column .preview-wrap {
  height: 356px;
  max-height: 356px;
}

.export-status {
  min-height: 18px;
  margin: 10px 16px;
  color: var(--muted);
  font-size: 13px;
}

.hualei-panel {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) minmax(120px, 1fr) minmax(90px, 1fr) 86px auto auto auto;
  gap: 8px;
  align-items: center;
  margin: 8px 16px 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hualei-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.hualei-panel input,
.hualei-panel select {
  min-height: 34px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 8px;
}

.hualei-panel button {
  min-height: 34px;
  white-space: nowrap;
}

.hualei-panel-standalone {
  margin: 14px 16px;
}

.hualei-help {
  display: grid;
  gap: 6px;
  margin: 0 16px 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.hualei-help strong {
  color: var(--text);
}

.hualei-logistics-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 16px 10px;
}

.hualei-logistics-check {
  margin: 0 16px 16px;
  max-height: 520px;
}

.shipping-rules-drawer {
  position: fixed;
  z-index: 90;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.shipping-rules-drawer.open {
  visibility: visible;
  pointer-events: auto;
}

.shipping-rules-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(31, 42, 48, .24);
  transition: opacity .18s ease;
}

.shipping-rules-drawer.open .shipping-rules-backdrop {
  opacity: 1;
}

.shipping-rules-sheet {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 92vw);
  height: 100%;
  padding-bottom: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  border-left: 1px solid var(--line);
  background: rgba(250, 251, 250, .96);
  box-shadow: -18px 0 50px rgba(31, 42, 55, .16);
  backdrop-filter: blur(24px);
  transition: transform .2s ease;
}

.shipping-rules-drawer.open .shipping-rules-sheet {
  transform: translateX(0);
}

.shipping-rules-sheet > .rules-editor,
.shipping-rules-sheet > .rules-subeditor {
  display: grid;
  width: calc(100% - 32px);
  margin: 14px 16px 0;
}

.shipping-rules-sheet .panel-actions {
  padding: 14px 16px;
}

body.drawer-open {
  overflow: hidden;
}

.preview-panel {
  min-height: 270px;
}

.logistics-check-note {
  margin: 0 0 10px;
}

.logistics-check-wrap {
  max-height: 280px;
  margin-bottom: 12px;
  border-radius: 8px;
}

.preview-wrap {
  max-height: 330px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  box-shadow: none;
}

.tiny-expand {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.compact-rules summary {
  cursor: pointer;
  padding: 12px 16px;
  font-weight: 750;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
}

.category-chip.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.category-chip span {
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(23, 107, 99, .12);
  color: inherit;
}

.progress-mini {
  width: 84px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ead8d2;
  border: 1px solid #ddd2cc;
}

.progress-mini span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9867d 0%, #d9b27e 38%, #c8c5a3 62%, #8fb59f 100%);
}

.status-cell {
  display: grid;
  gap: 6px;
  min-width: 128px;
}

.order-select {
  min-height: 16px;
  width: 16px;
  margin: 0;
}

.import-select {
  min-height: 16px;
  width: 16px;
}

.logistics-bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.logistics-bulk input {
  max-width: 220px;
}

.logistics-check-input {
  width: 150px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .76);
  font: inherit;
}

.logistics-check-input.wide {
  width: 240px;
}

.hualei-channel-cell {
  display: grid;
  gap: 4px;
  min-width: 168px;
}

.hualei-channel-cell .ship-method,
.hualei-channel-cell .logistics-check-input {
  width: 168px;
}

.hualei-channel-cell small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.preview-subhead {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.logistics-select {
  min-height: 16px;
  width: 16px;
}

.logistics-order-cell {
  display: grid;
  gap: 5px;
  min-width: 120px;
}

.logistics-scope-select {
  min-height: 36px;
  width: 150px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  font-weight: 720;
  padding: 0 10px;
}

.logistics-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.logistics-urgent-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(185, 28, 28, .2);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(254, 242, 242, .95);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .01em;
}

.logistics-exported-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(239, 246, 255, .95);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .01em;
}

.ship-method.urgent {
  border-color: rgba(185, 28, 28, .34);
  background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
  color: #991b1b;
  font-weight: 760;
}

.template-cell {
  color: var(--muted);
  font-weight: 700;
}

.bulk-toolbar {
  justify-content: flex-start;
  gap: 10px;
}

.inventory-metrics {
  margin-bottom: 14px;
}

.inventory-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.inventory-header h2 {
  margin: 0 0 4px;
}

.inventory-subtabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.inventory-subtabs button {
  border-color: transparent;
  background: transparent;
}

.inventory-subtabs button.active {
  background: var(--accent);
  color: white;
}

.inventory-pane {
  display: none;
}

.inventory-pane.active {
  display: block;
}

.role-layout-panel {
  margin-bottom: 14px;
}

.role-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px 16px;
}

.role-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 10px 28px rgba(25, 32, 44, .06);
}

.role-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.role-card-title strong {
  color: var(--text);
  font-size: 16px;
}

.role-card-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.role-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.role-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
}

#userShopSelect {
  min-height: 0;
}

.shop-choice-grid,
.role-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #dfe6ee;
  border-radius: 14px;
  background: #fff;
}

.shop-choice,
.role-choice {
  min-height: 44px;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid #e1e7ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #31404f;
  box-shadow: none;
  text-align: center;
}

.shop-choice span,
.shop-choice small {
  display: block;
}

.shop-choice small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.shop-choice-label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.shop-choice-label strong {
  font-size: 12px;
  font-weight: 650;
}

.shop-choice-label small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.shop-choice:hover,
.shop-choice:focus-visible,
.role-choice:hover,
.role-choice:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.shop-choice.active,
.role-choice.active {
  border-color: var(--accent);
  background: #eaf3fb;
  color: var(--accent);
}

.shop-choice.active small {
  color: var(--accent);
}

.personal-profile {
  max-width: 980px;
  margin: 0 auto;
}

.panel.personal-profile {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-settings-tabs {
  display: flex;
  gap: 26px;
  margin: 0 0 24px;
  border-bottom: 1px solid rgba(41, 55, 70, .12);
}

.account-settings-tabs button {
  min-height: 34px;
  padding: 4px 0 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #273746;
  font-size: 13px;
  font-weight: 620;
}

.account-settings-tabs button.active {
  border-bottom: 3px solid #2f2932;
}

.account-settings-tabs button:disabled {
  opacity: .42;
}

.account-card {
  margin-bottom: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-card h3 {
  margin: 0 0 14px;
  color: #2f2932;
  font-size: 15px;
  letter-spacing: .01em;
}

.account-avatar-block {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.account-avatar {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--avatar-bg, #ddebff);
  color: #2f2932;
  font-size: 38px;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-about-card h3 {
  margin-bottom: 5px;
}

.account-about-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.avatar-upload {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid #2f2932;
  border-radius: 999px;
  color: #2f2932;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.avatar-upload input {
  display: none;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px 26px;
}

.account-form-grid label,
.account-form-grid div {
  display: grid;
  gap: 7px;
}

.account-form-grid span,
.account-form-grid label {
  color: #2f2932;
  font-size: 13px;
  font-weight: 650;
}

.account-form-grid strong {
  color: #4e4750;
  font-size: 13px;
  font-weight: 500;
}

.account-save-btn {
  margin-top: 20px;
  border-radius: 999px;
}

.account-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.account-action-card {
  display: grid;
  gap: 5px;
  justify-items: start;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid rgba(41, 55, 70, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .58);
  color: #263442;
  text-align: left;
}

.account-action-card span {
  font-size: 13px;
  font-weight: 700;
}

.account-action-card strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.account-action-card.danger span {
  color: var(--danger);
}

.account-timeline-list {
  display: grid;
  gap: 8px;
}

.account-timeline-row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr .9fr 1.4fr .8fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(41, 55, 70, .10);
}

.account-timeline-row-static {
  grid-template-columns: 1.1fr 1.1fr .8fr 1fr 1fr;
}

.account-timeline-row span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.account-timeline-row strong {
  color: #263442;
  font-size: 12px;
  font-weight: 520;
}

.account-timeline-empty {
  padding: 12px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .account-settings-tabs {
    gap: 18px;
    overflow-x: auto;
  }

  .account-avatar-block,
  .account-form-grid,
  .account-timeline-row,
  .account-timeline-row-static {
    grid-template-columns: 1fr;
  }
}

#catalogDetail {
  transition: opacity .12s ease;
}
#catalogDetail.catalog-detail-loading {
  opacity: .62;
  pointer-events: none;
}

.operator-schedule-board { width:100%; padding:18px; }
.operator-schedule-board > header { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:16px; }
.operator-schedule-board h2 { margin:0 0 5px; }
.operator-schedule-board p { margin:0; color:var(--muted); font-size:12px; }
.operator-schedule-groups { display:grid; gap:16px; }
.operator-schedule-group { border:1px solid #dde5df; border-radius:14px; overflow:hidden; background:#fff; }
.operator-schedule-group > header { display:flex; justify-content:space-between; padding:9px 13px; background:#f3f7f4; font-size:12px; }
.operator-schedule-group > header div { display:flex; align-items:center; gap:10px; }
.operator-schedule-group > header span { padding:3px 7px; border-radius:999px; background:#dfeee5; color:#286847; font-size:9px; }
.operator-schedule-list { display:grid; }
.operator-schedule-row { display:grid; grid-template-columns:18px 26px 48px 44px minmax(260px,680px) 112px 58px 34px; gap:7px; align-items:center; justify-content:start; min-height:58px; padding:6px 10px; border-top:1px solid #edf1ee; background:#fff; font-size:11px; transition:background .15s,opacity .15s; }
.operator-schedule-row.dragging { opacity:.45; background:#e9f4ed; }
.operator-schedule-row.state-completed { background:#e8f7ed; box-shadow:inset 4px 0 #3ca66a; }
.operator-schedule-row.state-uploaded { background:#f0f1f1; color:#7b827e; opacity:.76; }
.operator-schedule-row.schedule-readonly { grid-template-columns:18px 26px 48px 44px minmax(260px,680px) 112px 34px; }
.operator-schedule-columns { display:grid; grid-template-columns:18px 26px 48px 44px minmax(260px,680px) 112px 58px 34px; gap:7px; align-items:center; justify-content:start; min-height:28px; padding:4px 10px; border-top:1px solid #e4eaf0; background:#f8fafc; color:#7b8794; font-size:9px; font-weight:600; }
.operator-schedule-columns.schedule-readonly { grid-template-columns:18px 26px 48px 44px minmax(260px,680px) 112px 34px; }
.operator-schedule-columns span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.schedule-readonly .operator-schedule-handle { cursor:default; opacity:.38; }
.schedule-readonly .schedule-priority-star:disabled { cursor:default; opacity:1; }
.schedule-readonly input:disabled { color:#59645d; background:#f6f8f6; opacity:1; }
.schedule-link-hidden { display:none; }
.operator-schedule-handle { cursor:grab; color:#8a9790; font-weight:800; letter-spacing:-3px; }
.schedule-priority-star { width:28px; height:28px; padding:0; border:0; background:transparent; font-size:23px; line-height:1; cursor:pointer; }
.schedule-priority-star.priority-0 { color:transparent; -webkit-text-stroke:1.5px #98a39c; }
.schedule-priority-star.priority-2 { color:#df3e3e; -webkit-text-stroke:1px #bd2727; }
.schedule-priority-star.priority-1 { color:#f2bd32; -webkit-text-stroke:1px #cf9715; }
.operator-schedule-code { color:#245c7f; font-size:10px; text-align:center; }
.operator-schedule-image { width:40px; height:40px; display:grid; place-items:center; border-radius:7px; overflow:hidden; background:#eef2ef; color:#98a19b; font-size:8px; }
.operator-schedule-image img { width:100%; height:100%; object-fit:cover; }
.operator-schedule-title { min-width:0; display:grid; gap:3px; }
.operator-schedule-title strong,.operator-schedule-title small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.operator-schedule-title strong { font-size:13px; font-weight:580; line-height:1.3; }
.operator-schedule-title small { color:var(--muted); font-size:10px; font-weight:400; }
.operator-schedule-state { justify-self:start; padding:5px 9px; border-radius:999px; background:#eef2ef; color:#657169; font-size:10px; white-space:nowrap; }
.state-completed .operator-schedule-state { background:#ccebd7; color:#17683b; font-weight:700; }
.state-uploaded .operator-schedule-state { background:#dfe2e0; color:#69706c; }
.operator-schedule-row label { display:grid; gap:3px; color:var(--muted); font-size:9px; }
.operator-schedule-row input { width:100%; min-width:0; height:31px; padding:3px 7px; font-size:10px; }
.operator-schedule-detail { width:34px; height:34px; padding:0; border:1px solid #b9c9bf; border-radius:9px; background:#fff; color:#285d43; font-size:22px; line-height:1; cursor:pointer; }
.operator-schedule-detail:hover { background:#e4f1e8; border-color:#69a07d; }
.catalog-mini-tag.schedule-code { background:#e4eef8; color:#245c7f; }
.catalog-mini-tag.schedule-ddl { background:#fff0d8; color:#8a5b0b; }
@media (max-width: 1200px) {
  .operator-schedule-row { grid-template-columns:18px 26px 44px 40px minmax(190px,1fr) 105px 32px; }
  .operator-schedule-row > a,.operator-schedule-columns:not(.schedule-readonly) span:nth-last-child(2) { display:none; }
  .operator-schedule-columns { grid-template-columns:18px 26px 44px 40px minmax(190px,1fr) 105px 32px; }
  .operator-schedule-row.schedule-readonly,.operator-schedule-columns.schedule-readonly { grid-template-columns:18px 26px 44px 40px minmax(190px,1fr) 105px 32px; }
}

.image-lightbox { position:fixed; inset:0; z-index:10000; display:grid; place-items:center; padding:48px; background:rgba(13,20,17,.82); }
.image-lightbox img { max-width:min(92vw,1200px); max-height:84vh; object-fit:contain; border-radius:10px; box-shadow:0 18px 70px rgba(0,0,0,.45); background:#fff; }
.image-lightbox-close { position:fixed; top:20px; right:24px; width:44px; height:44px; padding:0; border:1px solid rgba(255,255,255,.5); border-radius:50%; background:rgba(0,0,0,.35); color:#fff; font-size:32px; line-height:1; cursor:pointer; }
.image-lightbox small { position:fixed; bottom:17px; color:#fff; font-size:12px; }

/* P2 right-aligned administrator/operator perspective switch. Kept outside
   responsive catalog blocks so the segmented buttons cannot inherit tab styling. */
#catalog .catalog-subnav > .catalog-persona-switch {
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
  margin-left:auto;
  padding:0 2px 0 24px;
  border:0;
  background:transparent;
}
#catalog .catalog-subnav > .catalog-persona-switch.hidden { display:none; }
#catalog .catalog-subnav > .catalog-persona-switch > button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  min-height:30px;
  padding:5px 10px;
  border:1px solid #d1d9d4;
  border-radius:8px;
  background:#fff;
  color:#66706a;
  box-shadow:none;
  font-size:11px;
  line-height:1;
  white-space:nowrap;
}
#catalog .catalog-subnav > .catalog-persona-switch > button::after { display:none; content:none; }
#catalog .catalog-subnav > .catalog-persona-switch > button:hover { border:1px solid #9fbaa9; background:#f3f8f5; color:#315f47; }
#catalog .catalog-subnav > .catalog-persona-switch > button.active { border:1px solid #4f8a6d; background:#e4f2e9; color:#205d3e; box-shadow:inset 0 0 0 1px rgba(79,138,109,.08); }
#catalog .catalog-subnav > .catalog-persona-switch > button:disabled { border-color:#e0e3e1; background:#f1f2f1; color:#a8aeaa; opacity:.72; cursor:not-allowed; box-shadow:none; }
#catalog .catalog-subnav > .catalog-persona-switch > button:disabled:hover { border-color:#e0e3e1; background:#f1f2f1; color:#a8aeaa; }
#catalog .catalog-subnav > .catalog-persona-switch strong { font-size:11px; line-height:1; font-weight:650; }
@media (max-width:900px) {
  #catalog .catalog-subnav > .catalog-persona-switch { padding-left:8px; }
}

#catalog[data-active-catalog-pane="operator-schedule"] .catalog-layout { grid-template-columns:150px minmax(0,1fr); gap:10px; }
#catalog[data-active-catalog-pane="operator-schedule"] .catalog-list-panel { min-width:0; }
#catalog[data-active-catalog-pane="operator-schedule"] #catalogRows { padding:0; }
.schedule-mini-index { position:sticky; top:12px; display:grid; gap:5px; padding:8px; }
.schedule-mini-index > header { display:grid; gap:1px; padding:5px 4px 8px; border-bottom:1px solid #e5ebe7; }
.schedule-mini-index > header strong { font-size:11px; }
.schedule-mini-index > header small { color:var(--muted); font-size:8px; }
.schedule-mini-index > button { position:relative; display:grid; gap:2px; width:100%; padding:8px 26px 8px 8px; border:1px solid transparent; border-radius:8px; background:transparent; text-align:left; }
.schedule-mini-index > button:hover { border-color:#cbdcd1; background:#f0f6f2; }
.schedule-mini-index > button strong,.schedule-mini-index > button span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.schedule-mini-index > button strong { color:#2b5640; font-size:10px; }
.schedule-mini-index > button span { color:#727c76; font-size:9px; }
.schedule-mini-index > button em { position:absolute; right:7px; top:50%; transform:translateY(-50%); color:#718078; font-size:9px; font-style:normal; }
.operator-schedule-status { min-width:0; }
.operator-schedule-status select { width:100%; min-width:0; height:31px; padding:3px 7px; border:1px solid #d0dbd4; border-radius:8px; background:#f7faf8; color:#59665f; font-size:10px; }
.operator-schedule-status small { min-height:12px; overflow:hidden; color:#718078; font-size:8px; line-height:1.15; text-overflow:ellipsis; white-space:nowrap; }
.state-completed .operator-schedule-status select { border-color:#9dceb0; background:#dff2e6; color:#17683b; }
.state-uploaded .operator-schedule-status select { border-color:#c9cecb; background:#e5e7e6; color:#666d69; }
@media (max-width:900px) {
  #catalog[data-active-catalog-pane="operator-schedule"] .catalog-layout { grid-template-columns:110px minmax(0,1fr); }
}

.inventory-overview-grid {
  align-items: start;
}

.inventory-toolbar {
  margin-bottom: 14px;
}

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

.product-master-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}

.product-master-main {
  display: grid;
  grid-template-columns: 76px minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.product-image,
.product-image img {
  width: 66px;
  height: 66px;
}

.product-master-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.product-master-meta,
.product-master-stock {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.product-inline-skus {
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  background: rgba(245, 247, 246, .75);
}

.product-inline-skus > div {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr) minmax(130px, .7fr) auto;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}

.product-inline-skus > div:last-of-type {
  border-bottom: 0;
}

.product-inline-sku-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.product-inline-sku-actions button {
  min-height: 30px;
  padding: 4px 9px;
  white-space: nowrap;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  text-align: left;
}

.inventory-detail-dialog {
  width: min(1180px, 94vw);
  max-width: none;
  max-height: 86vh;
  overflow: hidden;
  padding: 0;
  overscroll-behavior: contain;
}

#productDetailBody,
#importSkuDialogBody {
  max-height: calc(86vh - 64px);
  overflow: auto;
  padding: 16px;
  overscroll-behavior: contain;
}

.product-detail-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.product-detail-hero img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

@media (max-width: 760px) {
  .inventory-header {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-subtabs {
    overflow-x: auto;
  }

  .product-master-main {
    grid-template-columns: 64px 1fr;
  }

  .product-master-main > .compact-actions {
    grid-column: 1 / -1;
  }

  .product-inline-skus > div,
  .product-detail-hero {
    grid-template-columns: 1fr;
  }

  .product-inline-sku-actions {
    justify-content: flex-start;
  }
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--muted);
}

.inline-toggle input {
  width: 16px;
  min-width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  flex: 0 0 16px;
}

.inventory-actions {
  min-width: 310px;
  flex-wrap: wrap;
}

.inventory-actions button {
  min-height: 30px;
  padding: 4px 8px;
}

.stock-count {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 6px;
  background: #e8f1ed;
  color: #386b58;
}

.stock-count.stock-alert {
  background: #f6e5df;
  color: #9b4e42;
}

.stock-positive {
  color: #39775d;
}

.stock-negative {
  color: #a34e48;
}

.danger-btn,
.delete-icon {
  border-color: rgba(190, 60, 50, .22);
  background: #fff1ef;
  color: #b3261e;
}

.delete-icon {
  min-width: 30px;
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
}

.status-fill,
.reminder-fill {
  border: 0;
  font-weight: 750;
  color: #334039;
}

.status-0 { background: linear-gradient(90deg, #ead1cc 18%, #fff 18%); }
.status-1 { background: linear-gradient(90deg, #ead9c2 34%, #fff 34%); }
.status-2 { background: linear-gradient(90deg, #dce1c9 50%, #fff 50%); }
.status-3 { background: linear-gradient(90deg, #cfddcf 66%, #fff 66%); }
.status-4 { background: linear-gradient(90deg, #c3d9d4 82%, #fff 82%); }
.status-5 { background: linear-gradient(90deg, #b9d4c3 100%, #fff 100%); }

.urgent-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f3;
  color: #52616a;
  font-size: 12px;
  font-weight: 750;
}

.urgent-switch.on {
  background: #f5d6d0;
  color: #8a342c;
}

.urgent-switch input {
  min-height: auto;
}

.urgent-triangle {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.urgent-triangle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.urgent-triangle span {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 13px solid #d8ddd7;
  filter: drop-shadow(0 1px 2px rgba(31, 42, 55, .12));
  transition: border-bottom-color .15s ease, transform .15s ease;
}

.urgent-triangle.on span {
  border-bottom-color: #d8685c;
  transform: translateY(-1px);
}

.custom-product-cell {
  display: grid;
  grid-template-columns: auto auto minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 230px;
}

.custom-status-select {
  min-width: 94px;
  padding: 7px 9px;
  border-radius: 10px;
}

.order-no {
  display: grid;
  gap: 2px;
  font-weight: 760;
}

.order-no span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.custom-sku {
  min-width: 280px;
  max-width: 420px;
  color: #394640;
}

.custom-address {
  min-width: 260px;
  max-width: 330px;
  color: #51605a;
}

.compact-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.reminder-fill.warn { background: #fff3df; color: var(--warn); }
.reminder-fill.danger { background: #fdeceb; color: var(--danger); }
.reminder-fill.ok { background: #eaf7ef; color: var(--ok); }

.image-thumb {
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #f4f6f7;
}

.image-stack {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 148px;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.import-edit {
  width: 150px;
  padding: 6px 8px;
}

textarea.import-edit {
  min-width: 220px;
  min-height: 54px;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.chart-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(247, 250, 251, .76)),
    radial-gradient(circle at 12% 10%, rgba(141, 179, 164, .16), transparent 34%);
}

.chart-panel::before {
  content: "";
  position: absolute;
  inset: 52px 16px 18px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(180, 194, 200, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 194, 200, .12) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.trend-chart {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 220px;
  padding: 8px;
}

.trend-grid {
  fill: none;
  stroke: #e1e7ea;
  stroke-width: 1;
}

.trend-line {
  fill: none;
  stroke: #8db3a4;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 12px rgba(116, 152, 139, .20));
}

.trend-dot {
  fill: #d6b19f;
  stroke: #fff;
  stroke-width: 2;
}

.revenue-line {
  stroke: #b69bb7;
  filter: drop-shadow(0 8px 12px rgba(148, 120, 151, .18));
}

.revenue-dot {
  fill: #bfa0a8;
}

.trend-chart text {
  fill: #64727a;
  font-size: 12px;
  font-weight: 700;
}

.inline-note {
  min-width: 220px;
  min-height: 54px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  resize: vertical;
}

.ship-method {
  width: 120px;
  padding: 6px 8px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-close-icon {
  min-width: 30px;
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

.large-preview {
  max-height: 72vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 16px;
}

.form-panel {
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 8px 10px;
}

.form-grid textarea {
  min-height: 78px;
  resize: vertical;
}

.wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row !important;
}

.hidden {
  display: none;
}

dialog {
  width: min(980px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(10, 20, 30, .24);
}

dialog::backdrop {
  background: rgba(18, 28, 35, .35);
}

/* Unified minimalist UI layer */
:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --line: #e6e8eb;
  --line-strong: #d9dde2;
  --text: #202326;
  --muted: #747b84;
  --accent: #285f59;
  --accent-strong: #174a45;
  --warn: #9a5b12;
  --danger: #b42318;
  --ok: #197243;
  --blue: #255f9c;
  --shadow: 0 10px 28px rgba(18, 24, 31, .06);
  --shadow-soft: 0 6px 18px rgba(18, 24, 31, .045);
  --radius: 14px;
}

body {
  background: linear-gradient(180deg, #fbfbfc 0%, #f5f6f7 100%);
  color: var(--text);
}

.topbar {
  align-items: center;
  padding: 18px 24px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8);
  backdrop-filter: blur(18px) saturate(1.08);
}

h1 {
  letter-spacing: -.02em;
}

h2 {
  letter-spacing: -.01em;
}

button,
select,
input,
textarea {
  border-color: var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

button {
  min-height: 36px;
  padding: 7px 13px;
  font-weight: 680;
}

input,
select,
textarea {
  box-shadow: inset 0 1px 0 rgba(18, 24, 31, .02);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(40, 95, 89, .45);
  box-shadow: 0 0 0 3px rgba(40, 95, 89, .08);
}

button:hover {
  border-color: var(--line-strong);
  background: #fafafa;
  color: var(--accent-strong);
}

.tab {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.tab.active,
.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(40, 95, 89, .16);
}

.undo-btn,
.note-icon {
  background: #fff;
  border-color: var(--line);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}

main {
  padding: 22px 24px 40px;
}

.panel,
.toolbar,
.table-wrap,
dialog,
.access-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.panel-head,
.toolbar {
  border-bottom-color: var(--line);
}

.panel-head {
  min-height: 58px;
}

.daily-panel {
  overflow: hidden;
}

.daily-list {
  gap: 14px;
  padding: 16px;
}

.daily-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.daily-item:hover,
.daily-item.active {
  transform: translateY(-1px);
  border-color: #d9e2df;
  background: #fff;
  box-shadow: 0 14px 28px rgba(18, 24, 31, .075);
}

.daily-metric {
  border: 1px solid var(--line);
  background: #fbfcfc;
  box-shadow: none;
  backdrop-filter: none;
}

.daily-metric:hover {
  border-color: #d8e2df;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

.daily-metric.danger {
  background: #fffafa;
  border-color: #f0d8d5;
}

.daily-metric.danger strong,
.daily-metric.danger span {
  color: var(--danger);
}

.work-note,
.fourpx-sync-status,
.note-card,
.provider-number,
.provider-number.missing {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.list {
  background: #fff;
}

.item {
  background: #fff;
  border-bottom-color: var(--line);
}

.item:hover {
  background: #fbfcfc;
}

.item-title {
  letter-spacing: -.01em;
}

.dashboard-actions {
  border-top-color: var(--line);
}

.action-btn,
.action-purchase,
.action-ready,
.action-packed,
.action-shipped,
.action-next {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.action-btn:hover,
.action-purchase:hover,
.action-ready:hover,
.action-packed:hover,
.action-shipped:hover,
.action-next:hover {
  background: #f8faf9;
  border-color: #d9e2df;
  color: var(--accent-strong);
}

.action-edit,
.icon-btn,
.delete-icon {
  background: transparent;
  box-shadow: none;
}

.tag {
  background: #f4f6f7;
  color: #4a5560;
}

.tag.danger {
  background: #fff0ef;
}

.tag.warn {
  background: #fff7ea;
}

.tag.ok {
  background: #eef8f2;
}

.tag.blue {
  background: #edf5ff;
}

.corner-tag {
  background: #f3f7fb;
  box-shadow: none;
}

.corner-tag.warn {
  background: #fff7ea;
}

.corner-tag.danger {
  background: #fff0ef;
}

th {
  background: #fafafa;
  color: #505862;
}

td,
th {
  border-bottom-color: var(--line);
}

tr:hover td {
  background: #fbfcfc;
}

.shipping-workspace,
.shipping-pane,
.shipping-header,
.logistics-bulk,
.reshipment-form,
.inventory-form,
.form-grid,
.dialog-form {
  background-color: transparent;
}

.shipping-flow-tab,
.shipping-flow-tab.active,
[data-inventory-pane],
[data-inventory-pane].active {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.shipping-flow-tab.active,
[data-inventory-pane].active {
  border-color: #d9e2df;
  color: var(--accent-strong);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.compact-note,
small,
.meta,
#syncStatus,
.panel-head span {
  color: var(--muted);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #d7dce1;
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* Blue minimalist refinement */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e5eaf0;
  --line-strong: #d4dce6;
  --text: #1f2933;
  --muted: #667085;
  --accent: #1f4f73;
  --accent-strong: #173d59;
  --blue: #1f4f73;
  --danger: #b42318;
  --warn: #9a5b12;
  --ok: #35556e;
  --shadow: 0 8px 24px rgba(15, 23, 42, .05);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, .04);
  --radius: 16px;
}

body {
  background: #f6f8fb;
}

.topbar {
  background: rgba(255, 255, 255, .96);
  border-bottom-color: #e9edf2;
  box-shadow: 0 1px 8px rgba(15, 23, 42, .025);
}

.tab.active,
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 79, 115, .16);
}

button:hover {
  border-color: rgba(31, 79, 115, .28);
  color: var(--accent);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(31, 79, 115, .48);
  box-shadow: 0 0 0 3px rgba(31, 79, 115, .08);
}

.daily-panel {
  margin-bottom: 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  position: relative;
}

.daily-dashboard-note {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 3;
}

.daily-list {
  padding: 0 0 14px;
  overflow: visible;
}

.daily-item {
  background: rgba(255, 255, 255, .88);
  border-color: #e8edf3;
  box-shadow: var(--shadow-soft);
}

.daily-item:hover,
.daily-item.active {
  border-color: #d9e3ec;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

.daily-item.active {
  position: relative;
  z-index: 2;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 12px 26px rgba(31, 79, 115, .12);
}

.daily-item.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 12px solid var(--accent);
  filter: drop-shadow(0 4px 4px rgba(31, 79, 115, .12));
}

.daily-metric {
  background: #fbfdff;
  border-color: #e6edf4;
}

.daily-metric:hover {
  border-color: #d5e2ed;
}

.daily-metric strong,
.metric.blue .value,
.tag.blue,
.corner-tag {
  color: var(--accent);
}

.daily-item.active .daily-metric {
  background: #fbfdff;
  border-color: #d5e2ed;
}

.daily-item.active .daily-metric span {
  color: var(--muted);
}

.daily-item.active .daily-metric strong {
  color: var(--accent);
}

.daily-item.active .daily-metric.danger {
  background: #fff5f4;
  border-color: #f3d8d5;
}

.daily-item.active .daily-metric.danger strong,
.daily-item.active .daily-metric.danger span {
  color: var(--danger);
}

.daily-metric.danger,
.tag.danger,
.corner-tag.danger {
  background: #fff5f4;
  border-color: #f3d8d5;
}

.tag.ok {
  background: #eef5fa;
  color: #315b78;
}

.tag.warn,
.corner-tag.warn {
  background: #fff8ed;
  color: var(--warn);
}

.action-btn,
.action-purchase,
.action-ready,
.action-packed,
.action-shipped,
.action-next {
  border-color: #dfe6ee;
  color: #243645;
  box-shadow: none;
}

.action-purchase {
  background: #fff8ed;
  border-color: #f0dfc4;
  color: #80530f;
}

.action-ready {
  background: #eef6fc;
  border-color: #d7e8f4;
  color: #1f4f73;
}

.action-shipped,
.action-next {
  background: #edf3fa;
  border-color: #d5e1ee;
  color: #173d59;
}

.action-packed {
  background: #f3f5f8;
  border-color: #dfe5ec;
  color: #475467;
}

.delete-icon,
.danger-btn,
button.danger-btn {
  border-color: #f0d4d1;
  background: #fff8f7;
  color: var(--danger);
}

.panel,
.toolbar,
.table-wrap,
dialog,
.access-panel {
  border-color: #e6ebf1;
  box-shadow: var(--shadow);
}

.panel-head,
.toolbar,
th,
td {
  border-color: #e7ecf2;
}

th {
  background: #f9fbfd;
}

tr:hover td,
.item:hover {
  background: #fafcff;
}

.shipping-flow-tab.active,
[data-inventory-pane].active {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.shipping-workspace,
.inventory-pane.active {
  background: #fff;
  border: 1px solid #e6ebf1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.shipping-workspace {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.inventory-pane.active {
  padding: 0;
}

.table-filter-menu {
  position: fixed;
  z-index: 1000;
  width: min(300px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 24px));
  display: grid;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
}

.table-filter-menu > strong {
  color: var(--text);
  font-size: 14px;
}

.table-filter-actions,
.table-filter-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-filter-footer {
  justify-content: flex-end;
  padding-top: 2px;
}

.table-filter-actions button {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
}

.table-filter-options {
  min-height: 80px;
  max-height: 340px;
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.table-filter-options label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid #f0f2f5;
  cursor: pointer;
}

.table-filter-options label:last-child {
  border-bottom: 0;
}

.table-filter-options input {
  min-height: auto;
  margin: 0;
}

.table-filter-options span {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-filter-options small {
  min-width: 28px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  text-align: center;
}

.th-filter.active {
  background: #eaf2f8;
  color: var(--accent);
}

.th-label {
  cursor: pointer;
}

.th-sort-indicator {
  min-width: 10px;
  color: var(--accent);
  font-size: 12px;
}

.access-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(246, 248, 250, .68);
  backdrop-filter: blur(18px);
}

.login-overlay {
  background:
    radial-gradient(circle at 18% 18%, rgba(30, 90, 140, .12), transparent 30%),
    linear-gradient(135deg, rgba(249, 251, 253, .94), rgba(255, 255, 255, .86));
}

.access-panel {
  width: min(360px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 60px rgba(31, 42, 55, .16);
}

.login-panel {
  width: min(420px, 100%);
  gap: 16px;
  padding: 30px;
  border-color: rgba(218, 226, 234, .82);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
}

.access-panel h2 {
  margin: 0;
}

.access-panel p {
  margin: 0;
  color: var(--muted);
}

.access-panel input {
  width: 100%;
  padding: 10px 12px;
}

.login-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-hint,
.login-error {
  margin: 0;
  font-size: 12px;
}

.login-hint {
  color: var(--muted);
}

.login-error {
  color: var(--danger);
  font-weight: 800;
}

.user-badge {
  color: var(--muted);
  font-size: 10px;
  font-weight: 520;
  letter-spacing: .01em;
  white-space: nowrap;
}

.logout-btn {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #dfe6ee;
  border-radius: 999px;
  background: #fff;
  color: #52606d;
  box-shadow: none;
}

.logout-btn:hover,
.logout-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.phone-flag {
  color: var(--ok);
  font-weight: 800;
}

.empty {
  padding: 18px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .daily-list,
  .split,
  .chart-grid,
  .shipping-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .reshipment-form {
    grid-template-columns: 1fr;
  }

  .reshipment-form .wide {
    grid-column: auto;
  }

  .fourpx-batch-row {
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
  }

  .fourpx-review-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .fourpx-review-summary button {
    margin-left: 0;
  }

  .shipping-header,
  .shipping-header-actions,
  .shipping-pane-head {
    align-items: stretch;
    flex-direction: column;
  }

  .shipping-header-actions input {
    width: 100%;
  }

  .shipping-flow-tabs {
    justify-content: flex-start;
  }

  .shipping-sticky-bulk {
    position: static;
    width: auto;
  }

  .shipping-review-split {
    grid-template-columns: 1fr;
  }

  .shipping-review-resizer {
    display: none;
  }

  .excel-review-column {
    border-top: 1px solid var(--line);
  }

  .toolbar input {
    min-width: 0;
    width: 100%;
  }
}

/* Editorial split navigation */
.topbar {
  z-index: 100;
  padding: 12px 24px 10px;
  overflow: visible;
}

.tabs {
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  min-height: 44px;
}

.nav-group {
  flex-wrap: nowrap;
  gap: 18px;
}

.nav-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tab,
.nav-menu-trigger {
  position: relative;
  min-height: 36px;
  padding: 7px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #26313b;
  font-size: 14px;
  font-weight: 590;
  white-space: nowrap;
}

.tab::after,
.nav-menu-trigger::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.tab:hover,
.nav-menu-trigger:hover,
.tab.active,
.nav-menu > .tab.active {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}

.tab.disabled-tab,
.tab.disabled-tab:hover,
.tab.disabled-tab:focus-visible {
  color: #b8c0c8;
  cursor: not-allowed;
  pointer-events: none;
}

.tab.disabled-tab::after {
  transform: scaleX(0) !important;
}

.tab:hover::after,
.nav-menu-trigger:hover::after,
.tab.active::after,
.nav-menu:hover > .nav-menu-trigger::after,
.nav-menu:focus-within > .nav-menu-trigger::after {
  transform: scaleX(1);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 120;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 2px 22px;
  width: min(520px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid #e7ebef;
  border-radius: 10px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .11);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 7px);
  transition: opacity .16s ease, transform .16s ease;
}

.nav-menu:hover > .nav-dropdown,
.nav-menu:focus-within > .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -10px;
  right: 0;
  left: 0;
  height: 10px;
}

.nav-dropdown button {
  position: relative;
  min-height: 42px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid #eef1f4;
  border-radius: 0;
  background: transparent;
  color: #2d3741;
  font-size: 14px;
  font-weight: 540;
  text-align: left;
}

.nav-dropdown button::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: -1px;
  left: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}

.nav-dropdown button:hover,
.nav-dropdown button:focus-visible {
  border-color: #eef1f4;
  background: transparent;
  color: var(--accent);
  outline: none;
}

.nav-dropdown button:hover::after,
.nav-dropdown button:focus-visible::after {
  transform: scaleX(1);
}

.management-trigger {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 8px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.management-trigger svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.management-trigger:hover,
.management-menu.active .management-trigger,
.management-menu.expanded .management-trigger {
  border: 0;
  background: #f2f6f9;
  color: var(--accent);
}

.management-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.management-actions {
  display: flex;
  max-width: 0;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: max-width .24s ease, opacity .18s ease, transform .24s ease;
}

.management-menu.expanded .management-actions {
  max-width: 170px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.management-action {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 8px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #52606d;
}

.management-action svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.management-action:hover,
.management-action:focus-visible,
.management-action.active {
  border: 0;
  background: #f2f6f9;
  color: var(--accent);
  outline: none;
}

.nav-dropdown-title {
  padding: 2px 4px 9px;
  border-bottom: 1px solid #e7ebef;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
}

.header-date {
  padding: 0;
  font-size: 12px;
}

.undo-btn {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.purchase-section {
  scroll-margin-top: 88px;
}

@media (max-width: 900px) {
  .topbar {
    padding-inline: 16px;
  }

  .tabs {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .nav-center {
    gap: 12px;
  }

  .header-date {
    display: none;
  }

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

  .daily-item {
    min-width: 0;
    padding: 10px 8px;
  }

  .daily-item-title {
    font-size: 13px;
  }

  .daily-metrics,
  .daily-item-shipping .daily-metrics {
    grid-template-columns: repeat(var(--daily-metric-count, 2), minmax(0, 1fr));
    gap: 5px;
  }

  .daily-item-shipping .daily-metrics {
    --daily-metric-count: 3;
  }

  .daily-metric {
    min-width: 0;
    min-height: 68px;
    padding: 9px 4px;
  }

  .daily-metric span {
    font-size: 10px;
    line-height: 1.2;
  }

  .daily-metric strong {
    margin-top: 4px;
    font-size: 20px;
  }
}

@media (max-width: 680px) {
  .tabs {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
  }

  .nav-center {
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-left {
    gap: 4px;
  }

  .undo-btn {
    display: none;
  }

  .nav-center::-webkit-scrollbar {
    display: none;
  }

  .nav-dropdown {
    position: fixed;
    top: 65px;
    right: 16px;
    left: 16px;
    grid-template-columns: 1fr 1fr;
    width: auto;
    transform: translateY(7px);
  }

  .nav-menu:hover > .nav-dropdown,
  .nav-menu:focus-within > .nav-dropdown {
    transform: translateY(0);
  }

  .management-menu.expanded .management-actions {
    max-width: 170px;
  }
}

@media (max-width: 520px) {
  .daily-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .daily-list::-webkit-scrollbar {
    display: none;
  }
}

/* Dashboard refresh: Etsy shop-manager inspired hierarchy */
#dashboard {
  max-width: 1280px;
  margin: 0 auto;
  color: #24212a;
  font-size: 13px;
}

.dashboard-welcome {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 8px 0 22px;
}

.dashboard-welcome-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--avatar-bg, #ddebff);
  color: #222;
  font-size: 30px;
}

.dashboard-welcome-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-welcome-main h1 {
  margin: 0 0 7px;
  color: #2b2730;
  font-size: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 460;
  letter-spacing: -.03em;
}

.dashboard-welcome-main p,
.dashboard-welcome-side {
  margin: 0;
  color: #5f5d64;
  font-size: 13px;
}

.dashboard-welcome-side {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.dashboard-welcome-side strong {
  color: #302b35;
  font-weight: 650;
}

.dashboard-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
}

.dashboard-section-title h2 {
  margin: 0;
  color: #24212a;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -.015em;
}

.dashboard-section-title span {
  color: #77737c;
  font-size: 11px;
}

#dashboard .daily-panel {
  margin-bottom: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#dashboard .daily-dashboard-note {
  display: none;
}

#dashboard .daily-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border: 0;
}

#dashboard .daily-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid #d9d6d2;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
}

#dashboard .daily-item:first-child {
  border-left: 1px solid #d9d6d2;
}

#dashboard .daily-item:hover {
  border-color: #bdb8b2;
  background: #fff;
}

#dashboard .daily-item.active {
  border: 2px solid #24212a;
  border-radius: 14px;
  background: #fff;
}

#dashboard .daily-task-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #f0efee;
  color: #24212a;
  font-size: 11px;
  font-weight: 800;
}

#dashboard .daily-item-title {
  margin-bottom: 5px;
  color: #24212a;
  font-size: 13px;
  font-weight: 740;
  letter-spacing: -.01em;
}

#dashboard .daily-item-title span {
  font-size: 13px;
}

#dashboard .daily-metrics {
  display: grid;
  gap: 2px;
}

#dashboard .daily-metric {
  display: flex;
  min-height: auto;
  align-items: baseline;
  gap: 7px;
  justify-content: flex-start;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #6d6971;
  text-align: left;
}

#dashboard .daily-metric:hover {
  background: transparent;
}

#dashboard .daily-metric strong {
  min-width: 20px;
  color: #24212a;
  font-size: 12px;
  font-weight: 650;
}

#dashboard .daily-metric span {
  color: #77737c;
  font-size: 11px;
  font-weight: 460;
}

#dashboard .daily-metric.danger strong,
#dashboard .daily-metric.danger span {
  color: var(--danger);
}

#dashboard .restricted-metrics {
  min-height: auto;
  justify-items: start;
  color: #77737c;
  font-size: 13px;
}

#dashboard .dashboard-section {
  margin-bottom: 34px;
}

#dashboard .panel {
  border-color: #dedbd6;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

#dashboard .panel-head {
  min-height: 48px;
  padding: 14px 18px;
}

#dashboard .panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -.01em;
}

#dashboard .panel-head span {
  color: #77737c;
  font-size: 12px;
}

#dashboard .list {
  max-height: 430px;
}

#dashboard .item {
  gap: 10px;
  padding: 11px 14px;
  padding-right: 58px;
}

#dashboard .item-title {
  font-size: 13px;
}

#dashboard .meta,
#dashboard .item small {
  font-size: 11px;
}

.dashboard-stats-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
  padding: 12px 0;
  border: 1px solid #dedbd6;
  border-radius: 14px;
  background: #fff;
}

.dashboard-stat-card {
  display: grid;
  gap: 3px;
  padding: 0 16px;
  border-right: 1px solid #dedbd6;
}

.dashboard-stat-card:last-child {
  border-right: 0;
}

.dashboard-stat-card span {
  color: #2f2a32;
  font-size: 12px;
  font-weight: 720;
}

.dashboard-stat-card strong {
  color: #111;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -.03em;
}

.dashboard-stat-card small {
  color: #77737c;
  font-size: 10px;
}

#dashboard .chart-grid {
  gap: 14px;
  margin-top: 0;
}

#dashboard .chart-panel {
  background: #fff;
}

#dashboard .trend-chart {
  height: 190px;
}

#dashboard .trend-chart text {
  font-size: 11px;
}

@media (max-width: 980px) {
  #dashboard .daily-list,
  .dashboard-stats-panel,
  #dashboard .chart-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-card {
    border-right: 0;
    border-bottom: 1px solid #dedbd6;
    padding: 12px 18px;
  }

  .dashboard-stat-card:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .dashboard-welcome {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .dashboard-welcome-side {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .dashboard-welcome-avatar {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    font-size: 24px;
  }

  .dashboard-welcome-main h1 {
    font-size: 20px;
  }
}

/* Keep dashboard summary cards in left / center / right columns. */
#dashboard .daily-list,
#dashboard .dashboard-stats-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 720px) {
  #dashboard .daily-list,
  #dashboard .dashboard-stats-panel {
    min-width: 660px;
  }

  #dashboard .daily-panel,
  #dashboard .dashboard-stats-panel {
    overflow-x: auto;
  }
}

/* Restore checklist cards to the pre-redesign compact UI. */
#dashboard .daily-panel {
  padding: 0;
  border: 0;
  background: transparent;
  overflow-x: auto;
}

#dashboard .daily-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr)) !important;
  gap: 12px;
  min-width: 660px;
}

#dashboard .daily-item {
  display: block;
  min-height: 118px;
  padding: 14px;
  border: 1px solid rgba(30, 64, 89, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  box-shadow: none;
}

#dashboard .daily-item:first-child {
  border-left: 1px solid rgba(30, 64, 89, .12);
}

#dashboard .daily-item.active {
  border: 2px solid var(--accent);
  background: #fff;
}

#dashboard .daily-item-title {
  margin: 0 0 12px;
  color: #25364a;
  font-size: 13px;
  font-weight: 720;
  text-align: left;
}

#dashboard .daily-metrics,
#dashboard .daily-item-shipping .daily-metrics {
  display: grid;
  grid-template-columns: repeat(var(--daily-metric-count, 2), minmax(0, 1fr));
  gap: 8px;
}

#dashboard .daily-item-shipping .daily-metrics {
  --daily-metric-count: 3;
}

#dashboard .daily-metric {
  display: grid;
  min-height: 62px;
  place-items: center;
  gap: 2px;
  padding: 8px 6px;
  border: 1px solid rgba(30, 64, 89, .10);
  border-radius: 10px;
  background: rgba(246, 249, 251, .72);
  text-align: center;
}

#dashboard .daily-metric span {
  color: #5d6a7a;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.25;
}

#dashboard .daily-metric strong {
  min-width: 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 760;
  line-height: 1;
}

#dashboard .daily-metric.danger span,
#dashboard .daily-metric.danger strong {
  color: var(--danger);
}

#dashboard .daily-item.role-muted .daily-metrics {
  display: grid;
  grid-template-columns: 1fr;
}

/* 2026 editorial commerce system */
:root {
  --bg: #f7f8fa;
  --surface: #fff;
  --surface-soft: #fafbfc;
  --line: #e6e9ed;
  --line-strong: #cfd6de;
  --text: #17212b;
  --muted: #667085;
  --accent: #1f4f73;
  --accent-strong: #173d59;
  --danger: #b42318;
  --warn: #9a5b12;
  --ok: #287052;
  --radius: 9px;
  --shadow: none;
  --shadow-soft: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-feature-settings: "tnum" 1;
}

main {
  max-width: none;
  padding: 24px 24px 48px;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  box-shadow: none;
}

.nav-menu.dismissed > .nav-dropdown {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, 7px) !important;
}

.nav-dropdown {
  border-radius: 6px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .1);
}

.workbench-page-head,
.shipping-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  margin: 0 0 12px;
  padding: 0;
  border-bottom: 0;
}

.workbench-page-head h1,
.shipping-header h2 {
  margin: 0;
  color: #111820;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -.025em;
}

.workbench-page-head p,
.shipping-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.subnav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.subnav-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: transform .18s ease;
}

.subnav-toggle.collapsed svg {
  transform: rotate(180deg);
}

.subnav-toggle:hover {
  border: 0;
  color: var(--accent);
}

.workbench-subnav,
.shipping-flow-tabs.workbench-subnav {
  display: flex;
  align-items: center;
  gap: 28px;
  max-height: 58px;
  margin: 0 0 24px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  opacity: 1;
  transition: max-height .18s ease, margin .18s ease, opacity .15s ease;
}

.workbench-subnav.collapsed {
  max-height: 0;
  margin-bottom: 0;
  border-bottom-color: transparent;
  opacity: 0;
  pointer-events: none;
}

.workbench-subnav button,
.shipping-flow-tabs.workbench-subnav .shipping-flow-tab {
  position: relative;
  min-height: 44px;
  padding: 8px 0 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
}

.workbench-subnav button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .16s ease;
}

.workbench-subnav button:hover,
.workbench-subnav button.active,
.shipping-flow-tabs.workbench-subnav .shipping-flow-tab:hover,
.shipping-flow-tabs.workbench-subnav .shipping-flow-tab.active {
  border: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

.workbench-subnav button:hover::after,
.workbench-subnav button.active::after {
  transform: scaleX(1);
}

.subnav-more {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.subnav-more summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  user-select: none;
}

.subnav-more summary::-webkit-details-marker {
  display: none;
}

.subnav-more summary::after {
  content: "⌄";
  display: inline-block;
  margin-left: 5px;
  color: #9aa3a8;
  font-size: 11px;
  transform: translateY(-1px);
}

.subnav-more[open] summary,
.subnav-more summary:hover {
  color: var(--accent);
}

.subnav-more[open] summary::after {
  transform: translateY(-1px) rotate(180deg);
}

.subnav-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 8;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.workbench-subnav .subnav-more-menu button {
  min-height: 32px;
  padding: 5px 8px;
  text-align: left;
}

.workbench-subnav .subnav-more-menu button::after {
  display: none;
}

.shipping-flow-tab span {
  min-width: auto;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 11px;
}

.purchase-pane {
  display: none;
  animation: viewFadeIn .17s ease;
}

.purchase-pane.active {
  display: block;
}

.role-hidden {
  display: none !important;
}

.role-muted {
  opacity: .38;
  filter: grayscale(1);
  cursor: not-allowed;
}

.daily-item.role-muted {
  border-color: rgba(120, 130, 145, .18);
  background: rgba(246, 248, 250, .7);
}

.daily-item.role-muted .daily-metric {
  pointer-events: none;
}

.restricted-metrics {
  display: grid;
  min-height: 58px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.role-muted-panel {
  opacity: .5;
}

.restricted-empty {
  color: var(--muted);
  font-weight: 650;
}

.view.active {
  animation: viewFadeIn .17s ease;
}

@keyframes viewFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.panel,
.toolbar,
.table-wrap,
.shipping-workspace,
.inventory-pane.active,
dialog,
.access-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: none;
}

.purchase-pane.panel {
  margin-bottom: 0;
}

.purchase-list-pane {
  border: 0;
  background: transparent;
}

.panel-head {
  min-height: 56px;
  padding: 16px 18px;
}

.panel-head h2,
.toolbar h2,
.shipping-pane-head h3 {
  color: #18212a;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -.012em;
}

.toolbar {
  gap: 8px;
  padding: 12px 14px;
}

button,
select,
input {
  min-height: 36px;
  border-color: var(--line-strong);
  border-radius: 7px;
  box-shadow: none;
}

button {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 580;
}

button:hover {
  border-color: #aeb9c5;
  background: #fafbfd;
  color: var(--accent);
}

.primary,
button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.primary:hover,
button.primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.danger-btn,
button.danger-btn,
.delete-icon {
  border-color: transparent;
  background: transparent;
  color: var(--danger);
}

.danger-btn:hover,
button.danger-btn:hover,
.delete-icon:hover {
  border-color: #f1d4d1;
  background: #fff4f3;
  color: var(--danger);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 79, 115, .08);
  outline: none;
}

.daily-panel {
  margin-bottom: 28px;
}

.daily-list {
  gap: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.daily-item {
  min-height: 138px;
  padding: 14px 18px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.daily-item:first-child {
  border-left: 1px solid var(--line);
}

.daily-item:hover {
  transform: none;
  border-color: var(--line);
  background: #fbfcfd;
  box-shadow: none;
}

.daily-item.active {
  transform: none;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.daily-item-title {
  font-size: 14px;
  font-weight: 630;
}

.daily-metrics,
.daily-item-shipping .daily-metrics {
  gap: 0;
}

.daily-metric {
  min-height: 72px;
  padding: 11px 8px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.daily-metric:last-child {
  border-right: 0;
}

.daily-metric:hover {
  transform: none;
  border-color: var(--line);
  background: var(--surface-soft);
  box-shadow: none;
}

.daily-metric.danger,
.daily-item.active .daily-metric.danger {
  border-color: var(--line);
  background: transparent;
}

.daily-metric span {
  font-size: 11px;
}

.daily-metric strong {
  margin-top: 5px;
  font-size: 23px;
  font-weight: 650;
}

.shipping-workspace {
  min-height: 520px;
  border-radius: var(--radius);
}

.shipping-pane-head {
  min-height: 68px;
  padding: 14px 18px;
}

.shipping-sticky-bulk {
  position: static;
  width: auto;
  margin: 14px;
  border-radius: 7px;
  background: #fafbfd;
  box-shadow: none;
}

.table-wrap {
  border-radius: 8px;
  box-shadow: none;
}

.data-table {
  font-variant-numeric: tabular-nums;
}

th,
td {
  height: 48px;
  padding: 8px 11px;
  border-bottom-color: var(--line);
  background-clip: padding-box;
  font-size: 13px;
}

th {
  z-index: 4;
  height: 42px;
  background: #fafbfc;
  color: #4d5966;
  font-size: 12px;
  font-weight: 620;
  box-shadow: inset 0 -1px 0 var(--line-strong);
}

tbody tr {
  background: #fff;
}

tbody tr:hover,
tbody tr:hover td {
  background: #f8fafc;
}

.numeric-column {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

th.sticky-order-column,
td.sticky-order-column {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 124px;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}

th.sticky-order-column {
  z-index: 7;
  background: #fafbfc;
}

th.sticky-action-column,
td.sticky-action-column {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fff;
  box-shadow: -1px 0 0 var(--line);
}

th.sticky-action-column {
  z-index: 7;
  background: #fafbfc;
}

tbody tr:hover td.sticky-order-column,
tbody tr:hover td.sticky-action-column {
  background: #f8fafc;
}

.th-filter {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #98a2ad;
}

.th-filter:hover,
.th-filter.active {
  border: 0;
  background: #edf3f7;
  color: var(--accent);
}

.table-filter-menu {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.tag {
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 580;
}

.tag.danger {
  border-color: #f1d4d1;
  background: #fff3f2;
  color: var(--danger);
}

.tag.warn {
  border-color: #f0dfbd;
  background: #fff8eb;
  color: var(--warn);
}

.tag.ok {
  border-color: #d3eadc;
  background: #eff8f3;
  color: var(--ok);
}

.tag.blue {
  border-color: #d9e5ee;
  background: #eef4f8;
  color: var(--accent);
}

.empty {
  min-height: 110px;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .workbench-page-head,
  .shipping-header {
    align-items: flex-start;
  }

  .workbench-subnav,
  .shipping-flow-tabs.workbench-subnav {
    gap: 22px;
  }

  .shipping-header-actions {
    justify-content: flex-end;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  main {
    padding: 20px 16px 40px;
  }

  .workbench-page-head,
  .shipping-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .workbench-page-head h1,
  .shipping-header h2 {
    font-size: 21px;
  }

  .workbench-subnav,
  .shipping-flow-tabs.workbench-subnav {
    width: 100%;
    gap: 20px;
  }

  .shipping-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .daily-item {
    padding-inline: 8px;
  }
}

/* Compact responsive toolbars */
.toolbar,
.backfill-filter-toolbar,
.inventory-toolbar,
.workbench-bulk,
.reshipment-toolbar,
.shipping-header-actions {
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.toolbar > h2,
.toolbar > strong,
.workbench-bulk > strong {
  flex: 0 0 auto;
}

.toolbar input,
.toolbar select,
.toolbar button,
.inventory-toolbar input,
.inventory-toolbar select,
.inventory-toolbar button,
.workbench-bulk select,
.workbench-bulk button,
.backfill-filter-toolbar input,
.backfill-filter-toolbar select,
.backfill-filter-toolbar button,
.shipping-header-actions input,
.shipping-header-actions select,
.shipping-header-actions button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 13px;
  line-height: 1.2;
}

.toolbar input[type="search"],
.inventory-toolbar input[type="search"],
.shipping-header-actions input[type="search"] {
  flex: 1 1 220px;
  min-width: 160px;
  width: auto;
}

.toolbar select,
.inventory-toolbar select,
.shipping-header-actions select,
.workbench-bulk select {
  flex: 0 1 150px;
  min-width: 116px;
  width: auto;
}

.toolbar button,
.inventory-toolbar button,
.shipping-header-actions button,
.workbench-bulk button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.backfill-filter-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, max-content));
  justify-content: start;
  align-items: end;
  gap: 8px;
}

.backfill-filter-toolbar label {
  min-width: 0;
  gap: 5px;
  white-space: nowrap;
}

.backfill-filter-toolbar label:has(input[type="search"]) {
  min-width: 218px;
}

.backfill-filter-toolbar input[type="number"] {
  width: 78px;
}

.backfill-filter-toolbar input[type="search"] {
  width: 150px;
}

.backfill-filter-toolbar .compact-note {
  grid-column: 1 / -1;
  min-height: 32px;
  padding: 7px 10px;
}

.workbench-bulk {
  padding: 10px 12px;
  gap: 8px;
}

.inventory-header {
  align-items: center;
  flex-wrap: wrap;
}

.inventory-header .compact-note {
  padding: 7px 10px;
  font-size: 13px;
}

.inventory-subtabs {
  flex-wrap: wrap;
}

.inventory-subtabs button {
  min-height: 32px;
  padding: 6px 12px;
}

.inventory-metrics.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  padding: 10px;
}

.inventory-metrics .metric,
.inventory-metrics > * {
  min-height: 52px;
  padding: 8px 10px;
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 32px;
  white-space: nowrap;
}

.inline-toggle input {
  width: 16px;
  min-width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  flex: 0 0 16px;
}

@media (max-width: 1180px) {
  .role-card-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .inventory-toolbar,
  .workbench-bulk {
    flex-direction: row;
  }

  .panel-head,
  .toolbar {
    padding: 10px 12px;
  }

  .panel-head {
    min-height: 48px;
  }
}

@media (max-width: 760px) {
  .toolbar input[type="search"],
  .inventory-toolbar input[type="search"],
  .shipping-header-actions input[type="search"] {
    flex-basis: 100%;
  }

  .toolbar select,
  .inventory-toolbar select,
  .shipping-header-actions select,
  .workbench-bulk select {
    flex: 1 1 132px;
  }

  .toolbar button,
  .inventory-toolbar button,
  .shipping-header-actions button,
  .workbench-bulk button {
    flex: 1 1 auto;
  }

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

  .backfill-filter-toolbar label,
  .backfill-filter-toolbar label:has(input[type="search"]) {
    min-width: 0;
  }

  .backfill-filter-toolbar input,
  .backfill-filter-toolbar select,
  .backfill-filter-toolbar input[type="search"],
  .backfill-filter-toolbar input[type="number"] {
    width: 100%;
  }

  .backfill-filter-toolbar button {
    min-width: 0;
  }

  .inventory-header {
    gap: 10px;
  }

  .inventory-subtabs {
    width: 100%;
  }

  .inventory-subtabs button {
    flex: 1 1 112px;
  }
}

@media (max-width: 520px) {
  .toolbar,
  .inventory-toolbar,
  .workbench-bulk,
  .shipping-header-actions {
    gap: 6px;
    padding: 8px;
  }

  .toolbar input,
  .toolbar select,
  .toolbar button,
  .inventory-toolbar input,
  .inventory-toolbar select,
  .inventory-toolbar button,
  .workbench-bulk select,
  .workbench-bulk button,
  .backfill-filter-toolbar input,
  .backfill-filter-toolbar select,
  .backfill-filter-toolbar button {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .backfill-filter-toolbar {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .backfill-filter-toolbar label {
    font-size: 12px;
  }

  .toolbar > h2,
  .toolbar > strong,
  .workbench-bulk > strong {
    flex-basis: auto;
    font-size: 15px;
  }
}

@media (max-width: 760px) {
  .toolbar input[type="search"],
  .inventory-toolbar input[type="search"],
  .shipping-header-actions input[type="search"] {
    flex: 1 1 180px;
    min-width: 150px;
  }
}

@media (max-width: 520px) {
  .toolbar select,
  .inventory-toolbar select,
  .shipping-header-actions select,
  .workbench-bulk select {
    flex-basis: 118px;
  }

  .toolbar button,
  .inventory-toolbar button,
  .shipping-header-actions button,
  .workbench-bulk button {
    flex: 0 1 auto;
  }
}

/* Final dashboard checklist restore: fixed 3-column cards, no scrollbars. */
#dashboard .daily-panel {
  width: 100%;
  margin: 0 0 24px;
  padding: 0;
  overflow: visible !important;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#dashboard .daily-list {
  display: grid !important;
  width: 100%;
  min-width: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px;
  overflow: visible !important;
  padding: 0;
  border: 0;
}

#dashboard .daily-item {
  display: block;
  min-width: 0;
  min-height: 118px;
  padding: 14px;
  overflow: visible;
  border: 1px solid rgba(31, 79, 115, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  box-shadow: none;
}

#dashboard .daily-item:first-child {
  border-left: 1px solid rgba(31, 79, 115, .14);
}

#dashboard .daily-item:hover {
  transform: none;
  border-color: rgba(31, 79, 115, .24);
  background: #fff;
  box-shadow: none;
}

#dashboard .daily-item.active {
  position: relative;
  border: 2px solid var(--accent);
  background: #fff;
  box-shadow: none;
}

#dashboard .daily-item-title {
  margin: 0 0 10px;
  color: #24374c;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.2;
  text-align: left;
}

#dashboard .daily-metrics,
#dashboard .daily-item-shipping .daily-metrics {
  display: grid;
  grid-template-columns: repeat(var(--daily-metric-count, 2), minmax(0, 1fr));
  gap: 8px;
}

#dashboard .daily-item-shipping .daily-metrics {
  --daily-metric-count: 3;
}

#dashboard .daily-metric {
  display: grid;
  min-width: 0;
  min-height: 66px;
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 8px 4px;
  overflow: hidden;
  border: 1px solid rgba(31, 79, 115, .10);
  border-radius: 10px;
  background: rgba(247, 250, 252, .86);
  text-align: center;
}

#dashboard .daily-metric span {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 100%;
  color: #617086;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
}

#dashboard .daily-metric span::after {
  content: "";
  display: block;
  width: min(42px, 58%);
  height: 1px;
  background: rgba(31, 79, 115, .18);
}

#dashboard .daily-metric strong {
  min-width: 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 760;
  line-height: 1;
}

#dashboard .daily-metric.danger span,
#dashboard .daily-metric.danger strong {
  color: var(--danger);
}

#dashboard .daily-metric.danger span::after {
  background: rgba(180, 35, 24, .22);
}

#dashboard .daily-item.role-muted .daily-metrics {
  grid-template-columns: 1fr;
}

/* Global typography unification */
:root {
  --app-font: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
}

html,
body,
button,
input,
select,
textarea,
table,
dialog {
  font-family: var(--app-font) !important;
}

.finance-dashboard {
  max-width: 1180px;
  margin: 0 auto;
  color: #24212a;
}

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

.finance-head h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 620;
}

.finance-head p {
  color: var(--muted);
  font-size: 13px;
}

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

.finance-work-grid {
  align-items: stretch;
}

.finance-left-stack {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-width: 0;
}

.finance-card {
  padding: 18px;
  border: 1px solid #dedbd6;
  border-radius: 14px;
  background: #fff;
}

.finance-auto-card {
  min-height: 0;
}

.finance-wide-card {
  margin-bottom: 20px;
}

.finance-grid .finance-wide-card {
  grid-column: 1 / -1;
}

.finance-card-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  margin-bottom: 14px;
}

.finance-card-head > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #f0efee;
  color: #24212a;
  font-size: 12px;
  font-weight: 760;
}

.finance-card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 720;
}

.finance-card-head strong {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.finance-lock-btn {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}

.finance-lock-btn.locked {
  border-color: #1f4f73;
  background: #1f4f73;
  color: #fff;
}

.finance-formula {
  padding: 12px 14px;
  border: 1px solid rgba(31, 79, 115, .10);
  border-radius: 10px;
  background: #f8fafc;
  color: #24374c;
  font-size: 13px;
  line-height: 1.55;
}

.finance-settings-card .finance-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr);
  gap: 12px;
  align-items: start;
}

.finance-param-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #edf0f3;
  border-radius: 12px;
  background: #fafafa;
}

.finance-param-group legend {
  padding: 0 5px;
  color: #111827;
  font-size: 12px;
  font-weight: 620;
}

.finance-param-group small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.finance-settings-card .finance-form-grid > button[type="submit"] {
  grid-column: 1 / -1;
  justify-self: start;
}

.finance-defs {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
}

.finance-defs div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
}

.finance-defs dt {
  color: #24212a;
  font-size: 12px;
  font-weight: 720;
}

.finance-defs dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.finance-warning-table {
  display: grid;
  margin-top: 14px;
  border: 1px solid #e5e2dd;
  border-radius: 12px;
  overflow: hidden;
}

.finance-warning-table div {
  display: grid;
  grid-template-columns: 120px 100px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e2dd;
  background: #fff;
}

.finance-warning-table div:last-child {
  border-bottom: 0;
}

.finance-warning-table strong,
.finance-warning-table span {
  font-size: 12px;
  font-weight: 720;
}

.finance-warning-table em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.stats-link {
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
}

@media (max-width: 820px) {
  .finance-grid,
  .finance-warning-table div {
    grid-template-columns: 1fr;
  }
}

/* Checklist metrics: no inner boxes, only slim dividers. */
#dashboard,
#dashboard button,
#dashboard input,
#dashboard select {
  font-family: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
}

#dashboard .daily-metrics,
#dashboard .daily-item-shipping .daily-metrics {
  gap: 0;
}

#dashboard .daily-metric {
  position: relative;
  min-height: 58px;
  padding: 6px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#dashboard .daily-metric:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 0;
  bottom: 13px;
  width: 1px;
  background: rgba(31, 79, 115, .18);
}

#dashboard .daily-metric span {
  font-size: 10px;
  font-weight: 600;
}

#dashboard .daily-metric span::after {
  width: min(28px, 46%);
}

#dashboard .daily-metric:hover {
  border: 0;
  background: transparent;
}

/* Dashboard compact layout requested on 2026-06-18. */
#dashboard .dashboard-welcome {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 2px 0 10px;
  padding: 0;
}

#dashboard .dashboard-welcome-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 17px;
}

#dashboard .dashboard-welcome-main h1 {
  margin: 0 0 2px;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -.02em;
}

#dashboard .dashboard-welcome-main p,
#dashboard .dashboard-welcome-side {
  font-size: 10.5px;
  line-height: 1.25;
}

#dashboard .dashboard-welcome-side {
  gap: 1px;
}

#dashboard .dashboard-welcome-side strong {
  font-size: 10.5px;
}

#dashboard .dashboard-section-title {
  margin: 16px 0 8px;
}

#dashboard .dashboard-section-title h2 {
  font-size: 17px;
}

#dashboard .dashboard-section-title span {
  font-size: 11px;
}

#dashboard .dashboard-stats-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#dashboard .dashboard-stat-card {
  min-height: 78px;
  padding: 12px 20px;
}

#dashboard .dashboard-stat-card span,
#dashboard .dashboard-stat-card small {
  font-size: 10.5px;
}

#dashboard .dashboard-stat-card strong {
  font-size: 26px;
  line-height: 1;
}

#dashboard .dashboard-data-board {
  margin: 6px 0 18px;
  border-top: 1px solid rgba(31, 79, 115, .08);
}

#dashboard .dashboard-data-board summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 2px 0;
  color: #77737c;
  font-size: 11px;
  font-weight: 520;
  letter-spacing: .01em;
}

#dashboard .dashboard-data-board summary::-webkit-details-marker {
  display: none;
}

#dashboard .dashboard-data-board summary::after {
  content: "展开";
  margin-left: 8px;
  color: rgba(31, 79, 115, .64);
  font-size: 10px;
}

#dashboard .dashboard-data-board[open] summary::after {
  content: "收起";
}

#dashboard .dashboard-chart-panel {
  margin-top: 8px;
  padding: 0;
  overflow: hidden;
}

#dashboard .dashboard-chart-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid #e8e4df;
}

#dashboard .dashboard-chart-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: #fbfaf8;
  color: #6f6b74;
  font-size: 11px;
  font-weight: 620;
}

#dashboard .dashboard-chart-tabs button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
}

#dashboard .dashboard-chart-sheet {
  display: none;
  padding: 12px 16px 16px;
}

#dashboard .dashboard-chart-sheet.active {
  display: block;
}

#dashboard .dashboard-chart-sheet .panel-head {
  padding: 0 0 8px;
  border: 0;
}

#dashboard .dashboard-chart-sheet .panel-head h2 {
  font-size: 13px;
}

#dashboard .dashboard-chart-sheet .panel-head span {
  font-size: 10px;
}

#dashboard .trend-chart {
  height: 170px;
}

#dashboardPurchaseGroup,
#dashboardShippingGroup {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#dashboardShippingGroup .dashboard-reshipment-panel {
  grid-column: 1 / -1;
}

#purchase .workbench-subnav,
#shipping .workbench-subnav {
  margin-top: 0;
}

@media (max-width: 820px) {
  #dashboard .dashboard-welcome {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  #dashboard .dashboard-welcome-avatar {
    width: 34px;
    height: 34px;
  }

  #dashboard .dashboard-stats-panel,
  #dashboardPurchaseGroup,
  #dashboardShippingGroup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard .dashboard-stats-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #dashboard .dashboard-stat-card {
    padding: 10px 12px;
  }
}

/* Dashboard typography pass: closer to Etsy's compact manager scale. */
:root {
  --app-font: Arial, "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body,
button,
input,
select,
textarea,
table,
dialog {
  font-family: var(--app-font) !important;
}

#dashboard,
#dashboard button,
#dashboard input,
#dashboard select,
#dashboard textarea {
  font-family: var(--app-font) !important;
}

#dashboard .dashboard-welcome-main h1,
#dashboard .dashboard-section-title h2 {
  font-family: var(--app-font) !important;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.01em;
}

#dashboard .dashboard-welcome-main p,
#dashboard .dashboard-welcome-side,
#dashboard .dashboard-section-title span,
#dashboard .dashboard-stat-card span,
#dashboard .dashboard-stat-card small,
#dashboard .daily-metric span,
#dashboard .panel-head span,
#dashboard .dashboard-chart-sheet .panel-head span {
  font-size: 11px;
  font-weight: 400;
}

#dashboard strong,
#dashboard b,
#dashboard button,
#dashboard .daily-item-title,
#dashboard .panel-head h2,
#dashboard .dashboard-chart-tabs button {
  font-weight: 500;
}

#dashboard .dashboard-stat-card strong {
  font-size: 25px;
  font-weight: 500;
}

#dashboard .daily-metric strong {
  font-weight: 500;
}

#dashboard .stats-title {
  justify-content: flex-start;
}

#dashboard .stats-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

#dashboard .stats-link {
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #d9dfe7;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 400;
}

#dashboard .stats-link:hover,
#dashboard .stats-link.active {
  border-color: rgba(31, 79, 115, .32);
  color: var(--primary);
  background: #f7fafc;
}

#dashboard .dashboard-data-board {
  margin: 0 0 14px;
  border-top: 0;
}

#dashboard .dashboard-data-board:not([open]) {
  margin: 0;
}

#dashboard .dashboard-data-board summary.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#dashboard .dashboard-data-board summary.sr-only::after {
  content: none;
}

#dashboard .dashboard-chart-tabs button {
  font-size: 11px;
  font-weight: 400;
}

#dashboard .stats-title {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  column-gap: 8px;
  row-gap: 8px;
}

#dashboard .stats-title #dashboardDataBoard {
  display: contents;
}

#dashboard .stats-title #dashboardDataBoard summary.stats-link {
  position: static;
  display: inline-flex;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  list-style: none;
  cursor: pointer;
}

#dashboard .stats-title #dashboardDataBoard summary.stats-link::after {
  content: none;
}

#dashboard .stats-title #dashboardDataBoard summary.stats-link::-webkit-details-marker {
  display: none;
}

#dashboard .stats-title #dashboardDataBoard .dashboard-chart-panel {
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* Keep dashboard chart content natively hidden when the details panel is closed. */
#dashboard .stats-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#dashboard .stats-title > h2 {
  order: 1;
}

#dashboard .stats-title > #dashboardDataBoard {
  display: block;
  order: 2;
  margin: 0;
  border: 0;
}

#dashboard .stats-title > #financeDashboardEntry {
  order: 3;
}

#dashboard .stats-title #dashboardDataBoard[open] {
  flex-basis: 100%;
  margin-top: 8px;
}

#dashboard .stats-title #dashboardDataBoard summary.stats-link {
  font-weight: 400;
}

#dashboard .stats-title #dashboardDataBoard[open] .dashboard-chart-panel {
  width: 100%;
  margin-top: 8px;
}

#dashboard .stats-title #dashboardDataBoard:not([open]) .dashboard-chart-panel {
  display: none !important;
}

/* Final dashboard controls and original app typography restore. */
:root {
  --app-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body,
button,
input,
select,
textarea,
table,
dialog,
#dashboard,
#dashboard button,
#dashboard input,
#dashboard select,
#dashboard textarea {
  font-family: var(--app-font) !important;
}

#dashboard .dashboard-welcome-main h1,
#dashboard .dashboard-section-title h2 {
  font-family: var(--app-font) !important;
  font-size: 16px;
  font-weight: 560;
}

#dashboard .stats-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 8px;
}

#dashboard .stats-title > h2 {
  grid-column: 1;
  order: initial;
  margin-right: 0;
}

#dashboard .stats-title > #dashboardShopFilter {
  grid-column: 3;
}

#dashboard .stats-title > #dashboardDataBoard {
  display: contents;
  order: initial;
  margin: 0;
  border: 0;
}

#dashboard .stats-title > #financeDashboardEntry {
  grid-column: 5;
  order: initial;
}

#dashboard .stats-title #dashboardDataBoard summary.stats-link {
  grid-column: 4;
  position: static;
  display: inline-flex;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: nowrap;
  list-style: none;
}

#dashboard .stats-title #dashboardDataBoard .dashboard-chart-panel {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 4px;
}

#dashboard .stats-link {
  min-height: 0;
  height: auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

#dashboard .dashboard-shop-filter {
  position: relative;
  margin: 0;
  border: 0;
}

#dashboard .dashboard-shop-filter summary {
  list-style: none;
  cursor: pointer;
}

#dashboard .dashboard-shop-filter summary::-webkit-details-marker {
  display: none;
}

#dashboard .dashboard-shop-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  min-width: 176px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #d9dfe7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
}

#dashboard .dashboard-shop-choice {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border-radius: 8px;
  color: #263241;
  font-size: 12px;
  line-height: 1.25;
}

#dashboard .dashboard-shop-choice:hover {
  background: #f5f7fa;
}

#dashboard .dashboard-shop-choice input {
  width: 14px;
  height: 14px;
  margin: 0;
}

#dashboard .dashboard-shop-choice-all {
  border-bottom: 1px solid #eef1f4;
  border-radius: 8px 8px 0 0;
  margin-bottom: 4px;
  padding-bottom: 8px;
}

/* Move dashboard controls into the welcome row. */
#dashboard .dashboard-welcome {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

#dashboard .dashboard-welcome-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
}

#dashboard .dashboard-welcome-main h1,
#dashboard .dashboard-welcome-main p {
  grid-column: 1;
}

#dashboard .dashboard-welcome-controls {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

#dashboard .dashboard-welcome-controls > .dashboard-shop-filter,
#dashboard .dashboard-welcome-controls > .dashboard-data-board,
#dashboard .dashboard-welcome-controls > #financeDashboardEntry {
  flex: 0 0 auto;
}

#dashboard .dashboard-welcome-controls .stats-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: auto;
  padding: 4px 9px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

#dashboard .dashboard-welcome-controls .dashboard-data-board {
  display: inline-flex;
  margin: 0;
  border: 0;
}

#dashboard .dashboard-welcome-controls .dashboard-data-board summary.stats-link {
  list-style: none;
  cursor: pointer;
}

#dashboard .dashboard-welcome-controls .dashboard-data-board summary.stats-link::-webkit-details-marker {
  display: none;
}

#dashboard .dashboard-welcome-controls .dashboard-data-board .dashboard-chart-panel {
  position: absolute;
  left: 38px;
  right: 38px;
  top: 150px;
  z-index: 20;
  width: auto;
  margin-top: 0;
}

#dashboard .dashboard-welcome-controls .dashboard-data-board:not([open]) .dashboard-chart-panel {
  display: none !important;
}

.finance-toolbar,
.finance-form-grid,
.sku-cost-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.finance-toolbar {
  margin: 12px 0 16px;
}

.finance-period-switch {
  display: inline-flex;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d9dfe7;
  border-radius: 999px;
  background: #fff;
}

.finance-period-switch button {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.finance-period-switch button.active {
  background: #1f4f73;
  color: #fff;
}

.finance-period-label {
  min-width: 210px;
  color: #111827;
  font-size: 13px;
  font-weight: 620;
  line-height: 32px;
}

.finance-rhythm {
  display: grid;
  grid-template-columns: 150px repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e5e2dd;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.finance-rhythm strong {
  color: #111827;
  font-size: 13px;
  font-weight: 620;
}

.finance-toolbar label,
.finance-form-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.finance-form-grid input,
.finance-form-grid select,
.finance-toolbar input {
  min-width: 150px;
}

.finance-form-grid .wide {
  flex: 1 1 280px;
}

.finance-layers {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.finance-layer {
  padding: 16px;
  border: 1px solid #e5e2dd;
  border-radius: 16px;
  background: #fff;
}

.finance-cash-layer {
  border-left: 4px solid #2563eb;
}

.finance-profit-layer {
  border-left: 4px solid #059669;
}

.finance-data-layer {
  border-left: 4px solid #64748b;
}

.finance-layer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.finance-layer-head h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 620;
}

.finance-layer-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.finance-layer-head > span {
  padding: 5px 9px;
  border: 1px solid #d9dfe7;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.finance-layer-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.finance-layer-actions label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.finance-layer-actions select {
  min-width: 140px;
}

.finance-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.finance-summary-card {
  position: relative;
  padding: 16px;
  border: 1px solid #e5e2dd;
  border-radius: 14px;
  background: #fff;
}

.finance-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
}

.finance-status-badge.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.finance-status-badge.warn {
  background: #fff7ed;
  color: #c2410c;
}

.finance-status-badge.ok {
  background: #ecfdf5;
  color: #047857;
}

.finance-status-badge.good {
  background: #e0f2fe;
  color: #0369a1;
}

.finance-status-badge.neutral {
  background: #f1f5f9;
  color: #64748b;
}

.finance-summary-card details {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #edf0f3;
}

.finance-summary-card summary {
  width: fit-content;
  color: #1f4f73;
  font-size: 12px;
  cursor: pointer;
}

.finance-summary-card details div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.finance-summary-card details b {
  color: #111827;
  font-weight: 620;
}

.finance-summary-card span,
.finance-summary-card small,
.finance-summary-card em,
.finance-breakdown small {
  color: var(--muted);
  font-size: 12px;
}

.finance-summary-card em {
  display: block;
  margin: -1px 0 4px;
  font-style: normal;
}

.finance-summary-card strong {
  display: block;
  margin: 8px 0 4px;
  color: #111827;
  font-size: 24px;
}

.finance-settlement-warnings {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.finance-warning-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.finance-warning-item.warn {
  border-color: rgba(217, 119, 6, .35);
  background: #fff7ed;
}

.finance-warning-item.danger {
  border-color: rgba(220, 38, 38, .35);
  background: #fff1f2;
}

.finance-warning-item.ok {
  border-color: rgba(5, 150, 105, .35);
  background: #f0fdf4;
}

.finance-warning-item strong {
  color: #111827;
  font-size: 13px;
  font-weight: 620;
}

.finance-warning-item span {
  color: var(--muted);
  font-size: 12px;
}

.finance-breakdown {
  display: grid;
  gap: 8px;
}

.finance-breakdown-group {
  padding: 10px 0;
  border-bottom: 1px solid #edf0f3;
}

.finance-breakdown-group h3,
.finance-period-layout h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.finance-breakdown-group div {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed #edf0f3;
}

.finance-breakdown-group div:last-child {
  border-bottom: 0;
}

.finance-breakdown strong,
.finance-breakdown-group strong {
  font-size: 13px;
}

.finance-breakdown small,
.finance-breakdown-group small,
.finance-breakdown-group em {
  grid-column: 1 / -1;
}

.finance-breakdown-group em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.finance-period-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(190px, .85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.finance-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.finance-calendar-head button {
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
}

.finance-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.finance-calendar-week {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.finance-calendar-day {
  width: 100%;
  min-height: 42px;
  padding: 5px;
  border: 1px solid #edf0f3;
  border-radius: 9px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.finance-calendar-day:hover {
  border-color: rgba(31, 79, 115, .28);
  background: #f8fafc;
}

.finance-calendar-day strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
}

.finance-calendar-day.muted {
  opacity: .36;
}

.finance-calendar-day.today {
  border-color: rgba(31, 79, 115, .36);
  background: #f7fbff;
}

.finance-calendar-day.selected {
  border-color: #1f4f73;
  box-shadow: inset 0 0 0 1px #1f4f73;
}

.finance-calendar-day.tomorrow-due {
  box-shadow: inset 0 0 0 1px #d97706;
}

.finance-task-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 3px 3px 0;
  border-radius: 999px;
  background: #64748b;
}

.finance-task-dot.payout {
  background: #2563eb;
}

.finance-task-dot.cash {
  background: #d97706;
}

.finance-task-dot.ads {
  background: #7c3aed;
}

.finance-task-dot.paylater {
  background: #059669;
}

.finance-task-dot.credit {
  background: #dc2626;
}

.finance-task-dot.done {
  box-shadow: 0 0 0 2px #bbf7d0;
}

.finance-due-list,
.finance-entry-log {
  display: grid;
  gap: 8px;
}

.finance-due-item,
.finance-log-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  background: #fff;
}

.finance-due-item.urgent {
  border-color: rgba(217, 119, 6, .35);
  background: #fffaf0;
}

.finance-due-item small,
.finance-log-item small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.finance-log-item {
  grid-template-columns: 90px minmax(0, 1fr);
}

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

.finance-chart-grid h3 {
  margin: 12px 0 4px;
  font-size: 13px;
}

.sku-cost-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
}

.sku-cost-inline input,
.table-cost-input,
#spuUnitCostInput {
  max-width: 120px;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid #d9dfe7;
  border-radius: 8px;
}

.table-cost-input.saved,
.sku-cost-inline input.saved {
  border-color: #8abf8a;
  background: #f2fbf2;
}

.sku-cost-tools {
  margin: 8px 0 10px;
}

@media (max-width: 900px) {
  .finance-work-grid,
  .finance-settings-card .finance-form-grid {
    grid-template-columns: 1fr;
  }

  .finance-rhythm {
    grid-template-columns: 1fr;
  }

  .finance-layer-head {
    display: grid;
  }

  .finance-summary-cards,
  .finance-chart-grid {
    grid-template-columns: 1fr;
  }
}

#dashboard .stats-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

#dashboard .stats-title > h2 {
  margin: 0;
}

@media (max-width: 920px) {
  #dashboard .dashboard-welcome-main {
    grid-template-columns: 1fr;
  }

  #dashboard .dashboard-welcome-controls {
    grid-column: 1;
    grid-row: auto;
    flex-wrap: nowrap;
  }

  #dashboard .dashboard-welcome-controls .dashboard-data-board .dashboard-chart-panel {
    left: 24px;
    right: 24px;
    top: 170px;
  }
}
/* Operations workbench */
.operations-subnav {
  margin-bottom: 14px;
}

.operations-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 1fr) minmax(118px, 0.8fr) minmax(118px, 0.8fr);
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}

.operations-toolbar label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.operations-toolbar label span {
  text-align: center;
  font-weight: 700;
}

.operations-toolbar select,
.operations-toolbar input,
.operations-toolbar button {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
}

.operations-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

#operations[data-active-operations-pane="week"] .operations-metrics,
#operations[data-active-operations-pane="month"] .operations-metrics {
  display: none;
}

.operation-metric {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.operation-metric span,
.operation-metric small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.operation-metric strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.operations-compact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 10px;
  align-items: stretch;
}

.operations-compact-panel {
  padding: 10px;
  min-width: 0;
}

.operations-compact-panel .panel-head {
  margin-bottom: 8px;
}

.operations-compact-panel .panel-head select {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
}

.operations-hidden-support {
  display: none;
}

.operations-list.compact {
  display: grid;
  gap: 6px;
  align-content: start;
  grid-auto-rows: max-content;
  max-height: 340px;
  overflow: auto;
}

.operations-compact-grid .operations-compact-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.operations-balance-grid .operations-compact-panel {
  min-height: 420px;
  align-content: start;
}

.operations-balance-grid .operations-compact-panel:nth-child(2) {
  grid-template-rows: auto minmax(0, max-content);
}

.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 14px;
}

.operations-pane {
  display: none;
}

.operations-pane.active {
  display: block;
}

.operations-list,
.operations-timeline {
  display: grid;
  gap: 10px;
}

.operation-card,
.operation-row,
.operation-person,
.operation-source {
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.operation-row.warning {
  border-color: rgba(180, 35, 24, .35);
  background: #fff7f6;
}

.operation-plan-row {
  padding: 0;
  overflow: visible;
}

.operation-plan-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: start;
  padding: 10px 10px 8px;
}

.operation-plan-main > button {
  display: grid;
  gap: 3px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.operation-plan-row.active .operation-plan-main {
  background: rgba(239, 246, 255, 0.9);
}

.operation-plan-main > button strong,
.operation-plan-main > button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-plan-main > button strong {
  font-size: 15px;
  line-height: 1.3;
}

.operation-plan-main > button span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.operation-plan-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.operation-plan-count {
  display: grid;
  gap: 3px;
  align-items: start;
  color: var(--muted);
  font-size: 11px;
}

.operation-plan-count input,
.operation-plan-count output {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 3px 5px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(22, 163, 74, .22) 0 var(--done-rate, 0%), #fff var(--done-rate, 0%) 100%);
  color: var(--ink);
  font-size: 13px;
  line-height: 24px;
  text-align: center;
}

.operation-plan-count output {
  font-weight: 700;
}

.operation-plan-tasks {
  display: grid;
  gap: 5px;
  padding: 0 7px 7px;
}

.operation-plan-task-chip {
  display: grid;
  grid-template-columns: minmax(100px, 1.1fr) minmax(96px, .8fr) minmax(120px, 1fr);
  gap: 6px;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.operation-plan-task-chip strong,
.operation-plan-task-chip span,
.operation-plan-task-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-plan-task-chip span,
.operation-plan-task-chip small {
  color: var(--muted);
  font-size: 11px;
}

.operation-card strong,
.operation-row strong,
.operation-person strong,
.operation-source strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.operation-card span,
.operation-row span,
.operation-person span,
.operation-source span,
.operation-card p,
.operation-source small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.operation-card footer {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-soft);
  padding-top: 6px;
}

.operation-card footer small {
  color: var(--muted);
  font-size: 12px;
}

.operation-recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px repeat(3, 26px);
  gap: 6px;
  align-items: start;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  text-align: left;
}

.operation-recent-row.pinned {
  border-color: rgba(37, 99, 235, .35);
  background: rgba(239, 246, 255, .78);
}

.operation-recent-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.operation-recent-main strong,
.operation-recent-main span,
.operation-recent-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-recent-main strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.operation-recent-main span,
.operation-recent-main small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.operation-recent-row select {
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 7px;
  font-size: 12px;
}

.operation-task-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1;
}

.operation-task-pin {
  color: var(--primary);
}

.operation-task-pin.active {
  border-color: rgba(37, 99, 235, .35);
  background: rgba(219, 234, 254, .9);
}

.operation-task-delete {
  color: #b42318;
  font-size: 16px;
}

.operations-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.operation-column {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 110px;
  max-height: 230px;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.8);
}

.operation-column h3 {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: 14px;
}

.operation-person div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.operation-person small {
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--primary);
  font-size: 11px;
}

.operation-assignee-field {
  display: grid;
  gap: 8px;
}

.operation-assignee-field > span {
  color: var(--muted);
  font-size: 13px;
}

.operation-assignee-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.operation-assignee-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.operation-assignee-choice input {
  width: 14px;
  height: 14px;
}

.operation-task-form {
  width: min(720px, 92vw);
}

.operation-task-simple-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.operation-task-simple-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.operation-task-simple-grid .wide {
  grid-column: 1 / -1;
}

.operation-task-simple-grid input,
.operation-task-simple-grid select {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 13px;
}

.operation-task-simple-grid .operation-assignee-choices {
  min-height: 36px;
  padding: 6px;
  border-radius: 8px;
  gap: 6px;
}

.operation-task-simple-grid .operation-assignee-choice {
  padding: 4px 8px;
  font-size: 12px;
}

.operation-material-field {
  display: grid;
  gap: 6px;
}

.operation-material-field > select {
  width: 100%;
}

.operation-material-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 190px;
  overflow: auto;
}

.operation-material-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.operation-material-choice.active,
.operation-material-choice:has(input:checked) {
  border-color: var(--primary);
  background: rgba(239, 246, 255, 0.9);
}

.operation-material-choice strong,
.operation-material-choice small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-material-choice strong {
  font-size: 13px;
}

.operation-material-choice small {
  color: var(--muted);
  font-size: 11px;
}

.operation-source {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
}

.operation-source img,
.operation-source-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--soft-blue);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.operation-calendar-head .actions {
  display: flex;
  gap: 8px;
}

.operation-calendar-zoom {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.operation-calendar-zoom span {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-calendar-zoom button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 7px;
  font-size: 15px;
  line-height: 1;
}

.operation-calendar {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}

.operation-calendar-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.operation-week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  min-height: 0;
}

.operation-month-calendar {
  grid-template-columns: repeat(7, minmax(54px, 1fr));
}

.operation-calendar-weekday {
  padding: 10px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.operation-calendar-cell {
  min-height: 70px;
  padding: 6px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
}

.operation-week-calendar.dense .operation-calendar-cell {
  min-height: 70px;
}

.operation-week-calendar.compact .operation-calendar-cell {
  min-height: 112px;
}

.operation-week-calendar.expanded .operation-calendar-cell {
  min-height: 176px;
}

#operationsPeopleView,
#operationsWeekView {
  max-height: 285px;
  overflow: auto;
}

.operation-calendar-cell:hover {
  background: rgba(239, 246, 255, 0.7);
}

.operation-calendar-cell.muted {
  background: rgba(248, 250, 252, 0.75);
  color: var(--muted);
}

.operation-calendar-cell.today {
  background: rgba(239, 246, 255, 0.7);
}

.operation-calendar-cell header strong {
  color: var(--ink);
}

.operation-calendar-cell header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  color: var(--ink);
}

.operation-calendar-cell header span {
  color: var(--muted);
  font-size: 12px;
}

.operation-calendar-items {
  display: grid;
  gap: 4px;
}

.operation-calendar-items > small {
  color: var(--muted);
  font-size: 12px;
}

.operation-calendar-task {
  width: 100%;
  padding: 4px 6px;
  border: 0;
  border-radius: 7px;
  background: rgba(219, 234, 254, 0.9);
  color: var(--primary);
  text-align: left;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operation-calendar-side {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.operation-side-switch {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.9);
}

.operation-side-switch button,
.operation-library-tabs button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.operation-side-switch button.active,
.operation-library-tabs button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
}

.operation-calendar-side h3,
.operation-calendar-side h4 {
  margin: 0;
}

.operation-calendar-side h3 {
  font-size: 13px;
}

.operation-calendar-side h4 {
  display: none;
}

.operation-side-stats,
.operation-side-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operation-side-stats span,
.operation-side-list span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.9);
  color: var(--primary);
  font-size: 11px;
}

.operation-side-tasks {
  display: none;
}

.operation-calendar-task.urgent {
  background: rgba(254, 226, 226, 0.9);
  color: #b91c1c;
}

.operation-calendar-task.done {
  background: rgba(220, 252, 231, 0.9);
  color: #166534;
}

.operation-reference-field {
  display: grid;
  gap: 8px;
}

.operation-reference-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.operation-reference-rows {
  display: grid;
  gap: 8px;
}

.operation-reference-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(160px, 1fr) minmax(120px, 0.8fr) auto 48px;
  gap: 8px;
  align-items: center;
}

.operation-reference-row img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.operation-source-category {
  display: grid;
  gap: 12px;
}

.operation-materials-panel {
  display: grid;
  gap: 14px;
}

.operation-library-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.9);
}

.operation-library-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.operation-library-single {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.operation-library-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 420px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
}

.operation-library-column > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.operation-library-column > header h3 {
  margin: 0;
  font-size: 16px;
}

.operation-library-column > header span {
  color: var(--muted);
  font-size: 12px;
}

.operation-library-groups {
  display: grid;
  gap: 12px;
}

.operation-source-category h3 {
  margin: 0;
  font-size: 15px;
}

.operation-source-spu-list {
  display: grid;
  gap: 12px;
}

.operation-source-spu {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}

.operation-source-spu header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.operation-source-spu header strong {
  display: block;
  font-size: 15px;
}

.operation-source-spu header span,
.operation-source-spu p,
.operation-source-spu small {
  color: var(--muted);
  font-size: 12px;
}

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

.operation-source-blocks > div {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
}

.operation-source-blocks h4 {
  margin: 0;
  font-size: 13px;
}

.operation-source-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.operation-source-link img,
.operation-source-link > span {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--soft-blue);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 11px;
}

.operation-source-link a {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-source-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operation-source-images img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.operation-plan-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
}

.operation-plan-layout::before {
  content: "计划工作流";
  display: block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

.operation-plan-layout::after {
  content: "1. 建立主题计划 → 2. 按店铺选择选品库和参考库素材 → 3. 排序和匹配候选SPU → 4. 确认执行后生成任务进入日历";
  display: block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.9);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.operation-day-dialog .dialog-form {
  min-width: min(760px, 92vw);
}

@media (max-width: 980px) {
  .operations-toolbar,
  .operations-metrics,
  .operations-grid,
  .operation-calendar-layout,
  .operation-library-split,
  .operation-plan-layout {
    grid-template-columns: 1fr 1fr;
  }

  .operations-board {
    grid-template-columns: repeat(5, 150px);
  }
}

@media (max-width: 640px) {
  .operations-toolbar,
  .operations-metrics,
  .operations-grid,
  .operations-compact-grid,
  .operation-calendar-layout,
  .operation-library-split,
  .operation-plan-layout,
  .operation-source {
    grid-template-columns: 1fr;
  }

  .operation-week-calendar {
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    overflow-x: auto;
  }

  .operation-task-simple-grid,
  .operation-material-choices {
    grid-template-columns: 1fr;
  }
}

.materials-workbench {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 120px);
}

.materials-sidebar,
.materials-main,
.material-group-editor,
.materials-library-column {
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.2);
}

.materials-sidebar {
  align-self: start;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  padding: 12px;
}

.materials-sidebar-head,
.materials-top,
.materials-library-column > header,
.material-drop-panel > header,
.material-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.materials-sidebar-head {
  margin-bottom: 12px;
}

.material-project-list,
.material-project-buttons,
.material-sidebar-section {
  display: grid;
  gap: 8px;
}

.material-project-buttons button,
.material-group-nav {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  text-align: left;
  background: rgba(255,255,255,.86);
}

.material-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 6px;
  align-items: stretch;
}

.material-group-delete {
  min-width: 28px;
  width: 28px;
  padding: 0;
  text-align: center;
  color: #b42318;
  background: rgba(255, 255, 255, .88);
}

.material-group-delete:hover {
  border-color: #b42318;
  background: #fff2f1;
}

.material-project-buttons button.active,
.material-group-nav.active {
  border-color: var(--accent);
  background: rgba(235, 244, 240, .96);
  color: var(--accent-strong);
}

.material-project-buttons span,
.material-group-nav span,
.materials-top p,
.materials-library-column header span,
.material-drop-panel header span,
.material-card small {
  color: var(--muted);
  font-size: 12px;
}

.material-sidebar-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.material-sidebar-section h3 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.materials-main {
  display: grid;
  gap: 14px;
  padding: 14px;
  box-shadow: none;
}

.material-group-editor {
  display: grid;
  gap: 12px;
  padding: 12px;
  box-shadow: none;
}

.material-group-head input {
  flex: 1;
}

.material-match-board,
.materials-library {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.material-drop-panel {
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr);
  gap: 10px;
  min-height: 260px;
  padding: 12px;
  border: 1px dashed rgba(47, 111, 104, .32);
  border-radius: 10px;
  background: rgba(248, 250, 249, .82);
}

.material-drop-panel.drag-over {
  border-color: var(--accent);
  background: rgba(231, 244, 239, .92);
}

.material-drop-panel h2,
.materials-library-column h2 {
  font-size: 16px;
}

.material-drop-zone {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 190px;
}

.materials-library-column {
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr);
  gap: 12px;
  min-height: 420px;
  padding: 12px;
  box-shadow: none;
}

.material-card-grid {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  max-height: 560px;
  padding-right: 3px;
}

.material-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 92px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
}

.material-card.compact {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 72px;
}

.material-card:active {
  cursor: grabbing;
}

.material-card img,
.material-image-placeholder {
  width: 74px;
  height: 74px;
  border-radius: 6px;
  object-fit: cover;
  background: #edf2f0;
}

.material-card.compact img,
.material-card.compact .material-image-placeholder {
  width: 58px;
  height: 58px;
}

.material-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.material-card div:not(.material-image-placeholder) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.material-card strong,
.material-card a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-card a {
  color: var(--accent-strong);
  font-size: 12px;
  text-decoration: none;
}

.material-card button {
  min-width: 52px;
  padding: 6px 8px;
}

.material-paste-area {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 106px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  cursor: pointer;
}

.material-paste-area:focus {
  outline: 2px solid rgba(47, 111, 104, .22);
  border-color: var(--accent);
}

.material-paste-area.drag-over {
  border-color: var(--accent);
  background: rgba(231, 244, 239, .92);
}

.material-paste-area img,
.material-paste-area .material-image-placeholder {
  width: 86px;
  height: 86px;
  border-radius: 6px;
  object-fit: cover;
}

.material-paste-area > div:not(.material-image-placeholder) {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.material-paste-area strong,
.material-paste-area span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-paste-area span {
  color: var(--muted);
  font-size: 12px;
}

.material-paste-area button {
  width: fit-content;
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .materials-workbench {
    grid-template-columns: 1fr;
  }

  .materials-sidebar {
    position: static;
    max-height: none;
  }

  .material-match-board,
  .materials-library {
    grid-template-columns: 1fr;
  }
}

/* Material workbench: Codex-style project sidebar + document workspace. */
#materials {
  margin: -22px -24px -36px;
  min-height: calc(100vh - 67px);
  background: #fbfbfa;
}

#materials .materials-workbench {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 67px);
}

#materials .materials-rail {
  display: none;
}

#materials .materials-sidebar-head span,
#materials .material-sidebar-section h3 {
  padding: 0 8px;
  color: #9a9a9a;
  font-size: 13px;
  font-weight: 650;
}

#materials .materials-sidebar {
  position: static;
  max-height: none;
  min-height: calc(100vh - 67px);
  padding: 28px 16px;
  border: 0;
  border-right: 1px solid #e6e6e4;
  border-radius: 0;
  background: linear-gradient(90deg, #eef1f5 0%, #f8f8f7 100%);
  box-shadow: none;
  backdrop-filter: none;
}

#materials .materials-sidebar-head {
  min-height: 28px;
  margin-bottom: 12px;
}

#materials .material-sidebar-section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#materials .materials-sidebar-head,
#materials .material-sidebar-section {
  display: none;
}

#materials .materials-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#materials .materials-sidebar-head span {
  padding: 0;
  font-size: 14px;
}

#materials .material-title-add,
#materials .material-project-add {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  width: 26px;
  min-height: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4b5358;
  font-size: 20px;
  line-height: 1;
}

#materials .material-title-add:hover,
#materials .material-project-add:hover {
  background: rgba(0, 0, 0, .07);
  color: var(--accent-strong);
}

#materials .material-project-buttons button,
#materials .material-group-nav {
  min-height: 54px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #34383d;
}

#materials .material-project-node {
  display: grid;
  gap: 4px;
}

#materials .material-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 4px;
}

#materials .material-project-row .material-project-button {
  min-width: 0;
}

#materials .material-project-button strong {
  display: flex;
  align-items: center;
  gap: 6px;
}

#materials .material-project-button small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

#materials .material-project-children {
  display: grid;
  gap: 4px;
  margin-left: 24px;
  padding-left: 10px;
  border-left: 1px solid #e1e1de;
}

#materials .material-project-buttons button.active,
#materials .material-group-nav.active {
  background: #e8e8e4;
  color: #1d1d1f;
}

#materials .material-group-nav {
  min-height: 46px;
  padding: 8px 10px;
  font-size: 14px;
}

#materials .material-draft-nav {
  outline: 1px dashed rgba(47, 111, 104, .45);
}

#materials .materials-main {
  align-content: start;
  min-height: calc(100vh - 67px);
  padding: 26px 30px 38px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

#materials .materials-top {
  padding-bottom: 16px;
  border-bottom: 1px solid #ececea;
}

#materials .materials-top h1 {
  font-size: 24px;
}

#materials .material-group-editor,
#materials .materials-library-column {
  border: 1px solid #e9e9e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

#materials .material-group-editor {
  padding: 14px;
}

#materials .material-group-head {
  padding-bottom: 10px;
  border-bottom: 1px solid #eeeeeb;
}

#materials .material-group-head input {
  border-color: transparent;
  background: #f7f7f5;
  font-size: 16px;
  font-weight: 700;
}

#materials .material-drop-panel {
  min-height: 300px;
  border-color: #dededb;
  border-radius: 8px;
  background: #fafaf9;
}

#materials .materials-library-column {
  min-height: 360px;
}

#materials .material-card {
  border-color: #e6e6e3;
  box-shadow: none;
}

@media (max-width: 900px) {
  #materials .materials-workbench {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  #materials {
    margin: -22px -24px -36px;
  }

  #materials .materials-workbench {
    grid-template-columns: 1fr;
  }

  #materials .materials-sidebar {
    min-height: auto;
  }

  #materials .materials-main {
    min-height: auto;
    padding: 18px;
  }
}

#catalog {
  margin: -22px -24px -36px;
  min-height: calc(100vh - 74px);
  background: #f7f7f4;
}

.catalog-shell {
  padding: 26px;
}

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

.catalog-top h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.catalog-top p {
  margin: 0;
  color: #666;
}

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

.catalog-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.catalog-metric {
  padding: 12px 14px;
  border: 1px solid #e8e7e2;
  border-radius: 8px;
  background: #fff;
}

.catalog-metric span {
  display: block;
  color: #777;
  font-size: 12px;
}

.catalog-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.catalog-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.catalog-filters > * {
  flex: 0 0 auto;
}

.catalog-compact-bar #catalogSearch {
  width: clamp(180px, 26vw, 280px);
}

.catalog-compact-bar #catalogSupplierFilter {
  width: 138px;
}

.catalog-compact-bar #catalogCategoryFilter {
  width: 112px;
}

.catalog-compact-bar #catalogStatusFilter {
  width: 106px;
}

.catalog-compact-bar button {
  width: 34px;
  min-width: 34px;
  min-height: 32px;
  padding: 0;
  border-radius: 7px;
  font-size: 14px;
}

.catalog-compact-bar #catalogBatchAssignOperators,
.catalog-compact-bar #catalogBatchAssignShops {
  width: auto;
  min-width: 104px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

#catalog[data-active-catalog-pane="library"] .catalog-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#catalog[data-active-catalog-pane="library"] #catalogSearch {
  flex: 0 1 280px;
  width: 280px;
  min-width: 210px;
}

#catalog[data-active-catalog-pane="library"] #catalogSupplierFilter { flex: 0 0 150px; width: 150px; }
#catalog[data-active-catalog-pane="library"] #catalogShopFilter { flex: 0 0 135px; width: 135px; }
#catalog[data-active-catalog-pane="library"] #catalogOperatorFilter { flex: 0 0 130px; width: 130px; }
#catalog[data-active-catalog-pane="library"] #catalogCategoryFilter { flex: 0 0 130px; width: 130px; }
#catalog[data-active-catalog-pane="library"] #catalogStatusFilter { flex: 0 0 120px; width: 120px; }

#catalog[data-active-catalog-pane="library"] #catalogBatchAssignOperators,
#catalog[data-active-catalog-pane="library"] #catalogBatchAssignShops {
  flex: 0 0 auto;
  width: auto;
  min-width: 128px;
  padding: 0 14px;
  white-space: nowrap;
}

#catalog[data-active-catalog-pane="library"] #refreshCatalog {
  flex: 0 0 38px;
  width: 38px;
}

#catalog[data-active-catalog-pane="library"] .catalog-filters input,
#catalog[data-active-catalog-pane="library"] .catalog-filters select,
#catalog[data-active-catalog-pane="library"] .catalog-filters button {
  font-size: 12px;
  font-weight: 500;
}

#catalog[data-active-catalog-pane="library"] .catalog-filters input::placeholder {
  font-weight: 400;
}

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

#catalog[data-active-catalog-pane="product-table"] .catalog-layout {
  grid-template-columns: minmax(0, 1fr);
}

#catalog[data-active-catalog-pane="product-table"] .catalog-list-panel {
  display: none;
}

.catalog-product-table-detail {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.catalog-product-table-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.catalog-product-table-shell h2,
.catalog-product-table-shell p { margin: 0; }
.catalog-product-table-shell p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.catalog-product-table-scroll { overflow: auto; max-height: calc(100vh - 245px); }
.catalog-product-table-scroll .data-table { min-width: 1180px; table-layout: auto; }
.catalog-product-table-scroll th { position: sticky; top: 0; z-index: 3; background: #0c84aa; color: #fff; }
.catalog-product-table-scroll th,.catalog-product-table-scroll td { vertical-align: middle; padding: 9px 10px; }
.catalog-product-table-scroll tbody tr { height: 64px; }
.product-master-thumb { display: grid; gap: 3px; justify-items: center; border: 0; background: transparent; padding: 0; cursor: pointer; }
.product-master-thumb img { width: 48px; height: 48px; border-radius: 7px; object-fit: cover; border: 1px solid var(--line); }
.product-master-thumb small, .product-master-no-image { color: var(--muted); font-size: 10px; }
.product-master-title { display: grid; gap: 3px; min-width: 220px; max-width: 360px; }
.product-master-title strong { line-height: 1.45; }
.product-master-title small { color: var(--muted); }
.product-master-style { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #dff5fb; color: #17627a; white-space: nowrap; }
.product-master-link { color: #1677c8; text-decoration: underline; white-space: nowrap; }
.product-match-input,.product-match-select { width:100%; min-width:145px; max-width:220px; height:36px; padding:5px 9px; border:1px solid #ccd8d0; border-radius:8px; background:#fff; font:inherit; }
.product-match-input:focus,.product-match-select:focus { outline:2px solid #b9e2ee; border-color:#5ba9bd; }

.catalog-list-panel,
.catalog-detail-panel,
.catalog-card {
  min-width: 0;
  border: 1px solid #e8e6df;
  border-radius: 8px;
  background: #fff;
}

.catalog-detail-panel,
.catalog-card {
  overflow: visible;
}

.catalog-list-panel {
  overflow: hidden;
}

#catalog[data-active-catalog-pane="operator"] .catalog-list-panel {
  display: grid;
  grid-template-columns: 1fr;
}

.catalog-folder-tree {
  padding: 8px;
  max-height: calc(100vh - 250px);
  overflow: auto;
  border-bottom: 0;
  background: #fbfbf9;
}

.catalog-activity-feed {
  display: grid;
  gap: 6px;
}

.catalog-activity-feed header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 7px;
  color: #667078;
  font-size: 12px;
}

.catalog-activity-feed header strong {
  color: #29333d;
  font-size: 13px;
}

.catalog-activity-feed header small {
  color: #9aa2a8;
  font-size: 11px;
}

.catalog-activity-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #27313b;
  text-align: left;
}

.catalog-activity-row:hover,
.catalog-activity-row:focus {
  background: #eef3f1;
}

.catalog-activity-row.active {
  background: #e3ebe7;
  box-shadow: inset 3px 0 0 #2b5c7d;
}

.catalog-activity-thumb {
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 6px;
  background: #edf1ef;
  color: #8b949b;
  font-size: 10px;
  display: grid;
  place-items: center;
}

.catalog-activity-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-activity-row span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.catalog-activity-row strong {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #1f2a35;
  font-size: 12px;
  line-height: 1.25;
}

.catalog-activity-row strong em {
  flex: none;
  color: #2b5c7d;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
}

.catalog-activity-row small,
.catalog-activity-row time {
  overflow: hidden;
  color: #747c82;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-activity-row time {
  color: #9aa2a8;
}

.catalog-activity-empty {
  padding: 14px 6px;
  color: #9aa2a8;
  font-size: 12px;
}

.catalog-folder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  gap: 2px;
  align-items: center;
  border-radius: 5px;
}

.catalog-folder-row.active,
.catalog-folder-row.drag-over {
  background: #eef3f1;
}

.catalog-folder-name,
.catalog-folder-add {
  min-height: 24px;
  border: 0;
  background: transparent;
  color: #565d62;
  font-size: 13px;
}

.catalog-folder-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  padding: 0 5px 0 calc(7px + var(--depth, 0) * 13px);
  text-align: left;
  font-weight: 650;
}

.catalog-folder-name span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-folder-name small {
  color: #999;
  font-size: 11px;
}

.catalog-folder-add {
  opacity: .35;
  padding: 0;
  color: #8f979c;
  font-size: 13px;
}

.catalog-folder-row:hover .catalog-folder-add,
.catalog-folder-add:focus {
  opacity: 1;
}

.catalog-folder-new {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px 20px;
  gap: 3px;
  align-items: center;
  min-height: 26px;
  padding-left: calc(7px + var(--depth, 0) * 13px);
}

.catalog-folder-new input {
  min-height: 24px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid #d9ddd9;
  border-radius: 5px;
  background: #fff;
  font-size: 13px;
}

.catalog-folder-new button {
  min-width: 0;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7d858a;
  font-size: 13px;
}

.catalog-sidebar-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 6px;
  padding: 3px;
  border: 1px solid #eceae4;
  border-radius: 7px;
  background: #fff;
}

.catalog-sidebar-switch button {
  min-height: 24px;
  padding: 0 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #697176;
  font-size: 12px;
  font-weight: 700;
}

.catalog-sidebar-switch button.active {
  background: #eef3f1;
  color: #1f2933;
}

.catalog-operator-directory {
  display: grid;
  gap: 4px;
}

.catalog-load-more {
  width: 100%;
  min-height: 28px;
  margin: 4px 0 2px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7d858a;
  font-size: 12px;
  font-weight: 650;
}

.catalog-load-more:hover {
  background: #f4f6f5;
  color: #24313a;
}

.catalog-image-load-more {
  align-self: center;
  min-height: 34px;
  border: 1px dashed #d8ddd9;
  background: #fbfbfa;
}

.catalog-operator-group {
  padding: 6px 0;
  border-top: 1px solid #efeee9;
}

.catalog-operator-group:first-child {
  border-top: 0;
}

.catalog-operator-group > header {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 30px;
  padding: 0 4px 5px;
}

.catalog-operator-avatar,
.catalog-operator-avatar img,
.catalog-operator-avatar span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
}

.catalog-operator-avatar {
  overflow: hidden;
  background: #eef3f1;
}

.catalog-operator-avatar img {
  object-fit: cover;
}

.catalog-operator-group > header .catalog-operator-avatar > span {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  color: #5d686f;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.catalog-shop-dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #eef3f1;
  box-shadow: inset 0 0 0 8px #fff, inset 0 0 0 9px #c9d6d1;
}

.catalog-shop-group > header {
  display: block;
  padding: 0;
}

.catalog-shop-toggle {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 14px;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 3px 4px 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.catalog-shop-toggle:hover {
  background: #f3f6f4;
}

.catalog-shop-toggle i {
  color: #8a9790;
  font-size: 15px;
  font-style: normal;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform .15s ease;
}

.catalog-shop-toggle[aria-expanded="true"] i {
  transform: rotate(0deg);
}

.catalog-shop-items:empty {
  display: none;
}

.catalog-operator-group strong {
  display: block;
  overflow: hidden;
  color: #1f2933;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-operator-group header span {
  display: block;
  overflow: hidden;
  color: #8a8d8c;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-operator-group header small {
  color: #9a9f9d;
  font-size: 11px;
  font-weight: 700;
}

.catalog-operator-sku {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 7px;
  width: 100%;
  min-height: 40px;
  padding: 5px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}

.catalog-operator-sku:hover {
  background: #f3f6f4;
}

.catalog-operator-sku.active {
  background: #e3ebe7;
  box-shadow: inset 3px 0 0 #2b5c7d;
}

.catalog-operator-sku-image {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 6px;
  background: #ececea;
  color: #777;
  font-size: 9px;
  font-weight: 700;
}

.catalog-operator-sku-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-operator-sku strong,
.catalog-operator-sku small,
.catalog-operator-sku em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-operator-sku strong {
  font-size: 12px;
}

.catalog-operator-sku small {
  color: #666;
  font-size: 10px;
  font-style: normal;
}

.catalog-operator-sku em {
  color: #9a9f9d;
  font-size: 10px;
  font-style: normal;
}

.catalog-operator-tags {
  display: flex !important;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
  overflow: visible !important;
  text-overflow: initial !important;
  white-space: normal !important;
}

.catalog-mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f2f4f3;
  color: #758087;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
}

.catalog-operator-empty {
  padding: 5px 4px 8px 37px;
  color: #9a9f9d;
  font-size: 11px;
}

.catalog-list {
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.catalog-list:empty {
  display: none;
}

.catalog-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 7px;
  border-bottom: 1px solid #efeee9;
  cursor: pointer;
}

.catalog-row-nested {
  margin-left: calc(8px + var(--depth, 0) * 13px);
  border-radius: 7px;
}

.catalog-row:last-child {
  border-bottom: 0;
}

.catalog-row:hover,
.catalog-row.active {
  background: #f3f6f4;
}

.catalog-row-image {
  width: 42px;
  aspect-ratio: 1;
  border-radius: 7px;
  overflow: hidden;
  background: #ececea;
  display: grid;
  place-items: center;
  color: #777;
  font-weight: 700;
  font-size: 12px;
}

.catalog-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.catalog-row-main > div:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.catalog-row-main strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-row-main p {
  margin: 2px 0;
  color: #555;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-row-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #777;
  font-size: 10px;
  line-height: 1.25;
}

.catalog-row-main .tag {
  min-height: 18px;
  margin-left: 5px;
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.catalog-activity-tag {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 720;
  line-height: 1;
  vertical-align: 1px;
  white-space: nowrap;
}

.catalog-activity-tag.update {
  background: #fff4d8;
  color: #8a5a00;
}

.catalog-activity-tag.comment {
  background: #eaf3ff;
  color: #265b91;
}

.catalog-operator-sku .catalog-activity-tag {
  min-height: 14px;
  margin-left: 4px;
  padding: 1px 4px;
  font-size: 8px;
}

.catalog-operator-sku .catalog-progress-tag {
  min-height: 17px;
  padding: 0 6px;
  font-size: 10px;
  line-height: 1;
}

.catalog-operator-sku .catalog-progress-tag.overdue b {
  display: none;
}

.catalog-library-empty {
  padding: 14px 10px;
  color: #9a9f9d;
  font-size: 12px;
  text-align: center;
}

.catalog-detail-panel {
  width: 100%;
  min-height: 420px;
  padding: 16px;
}

.catalog-detail-empty {
  display: grid;
  min-height: 360px;
  place-items: center;
  color: #777;
}

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

.catalog-detail-head span {
  color: #777;
}

.catalog-detail-head h2 {
  margin: 4px 0;
  font-size: 24px;
}

.catalog-detail-head p {
  margin: 0;
  color: #555;
}

.catalog-card {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
}

.catalog-card h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.catalog-quick-form {
  display: grid;
  grid-template-columns: 112px minmax(180px, 1fr) 126px 86px minmax(180px, 260px) 64px minmax(90px, auto);
  gap: 7px;
  align-items: start;
  width: 100%;
  --catalog-control-height: 34px;
  --catalog-font-size: 12px;
  --catalog-label-height: 14px;
}

.catalog-spu-basic-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.catalog-basic-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.catalog-basic-summary > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.catalog-basic-summary .wide { grid-column: 1 / -1; }
.catalog-basic-summary span,
.catalog-basic-summary strong,
.catalog-spu-basic-form label,
.catalog-spu-basic-form input,
.catalog-spu-basic-form select,
.catalog-spu-basic-form textarea,
.catalog-spu-basic-form button { font-size: 13px; }
.catalog-basic-summary span { color: var(--muted); font-size: 11px; }
.catalog-basic-summary strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:650; }

.catalog-assignment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.catalog-assignment-summary > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.catalog-assignment-summary > div > span { color: var(--muted); font-size: 12px; }
.catalog-assignment-tags { display:flex; flex-wrap:wrap; gap:6px; align-items:center; min-height:24px; }
.catalog-assignment-tags em { padding:3px 8px; border-radius:999px; background:#e8f3ee; color:#28694e; font-size:12px; font-style:normal; font-weight:650; }
.catalog-assignment-tags small { color:var(--muted); font-size:12px; }

.catalog-basic-product-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.catalog-basic-product-title,
.catalog-basic-product-images {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.catalog-basic-product-title > span,
.catalog-basic-product-images > span {
  color: var(--muted);
  font-size: 12px;
}

.catalog-basic-product-title > strong {
  color: #26323b;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.catalog-image-grid.catalog-image-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  padding: 2px 2px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.catalog-image-strip .catalog-image-card {
  width: 88px;
  min-width: 88px;
  flex: 0 0 88px;
}

.catalog-section-head > div { display:flex; align-items:center; gap:8px; }
.catalog-basic-edit-button { width:28px; min-width:28px; height:28px; min-height:28px; padding:0; border-radius:7px; font-size:18px; line-height:1; }
.catalog-basic-info-dialog { width:min(820px,92vw); max-width:none; padding:0; }
#catalogBasicInfoDialogBody { padding:16px; }
#catalogBasicInfoDialogBody .catalog-spu-basic-form { display:grid; }
.catalog-spu-basic-form .catalog-save-shell { display:flex; justify-content:flex-end; }
.catalog-spu-basic-form .catalog-save-shell button { width:auto; min-width:88px; min-height:32px; padding:5px 12px; font-size:12px; }

.catalog-spu-basic-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.catalog-spu-basic-form .wide { grid-column: 1 / -1; }
.catalog-spu-basic-form input,
.catalog-spu-basic-form select,
.catalog-spu-basic-form textarea { width:100%; min-height:36px; padding:7px 9px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.catalog-spu-basic-form textarea { resize:vertical; }
.catalog-spu-basic-form .catalog-assignee-dropdown { grid-column:1 / span 3; }
.catalog-spu-basic-form .catalog-save-shell { grid-column:4; }
.catalog-spu-basic-form .catalog-save-shell button { width:100%; min-height:36px; }
.catalog-spu-basic-form .catalog-inline-status { grid-column:1 / -1; }

@media (max-width: 900px) {
  .catalog-spu-basic-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .catalog-spu-basic-form .catalog-assignee-dropdown,
  .catalog-spu-basic-form .catalog-save-shell { grid-column:1 / -1; }
  .catalog-basic-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .catalog-assignment-summary { grid-template-columns:1fr; }
}

.catalog-quick-form > label,
.catalog-quick-form > .catalog-assignee-dropdown,
.catalog-quick-form > .catalog-field-shell {
  display: grid;
  grid-template-rows: var(--catalog-label-height) var(--catalog-control-height);
  gap: 4px;
  color: #555;
  font-size: var(--catalog-font-size);
  line-height: 1.2;
}

.catalog-quick-form > label > :first-child,
.catalog-quick-form > .catalog-field-shell > span,
.catalog-quick-form > .catalog-assignee-dropdown summary span {
  height: var(--catalog-label-height);
  line-height: var(--catalog-label-height);
}

.catalog-quick-form > input:not([type="file"]):not([type="hidden"]),
.catalog-quick-form > label > input:not([type="file"]),
.catalog-quick-form > label > textarea,
.catalog-quick-form > label > select {
  height: var(--catalog-control-height);
  min-height: var(--catalog-control-height);
  width: 100%;
  border: 1px solid #dddcd6;
  border-radius: 8px;
  background: #fff;
  font-size: var(--catalog-font-size);
  line-height: 1.2;
}

.catalog-file-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.catalog-file-field strong {
  height: var(--catalog-control-height);
  display: grid;
  place-items: center;
  border: 1px solid #dddcd6;
  border-radius: 8px;
  background: #fff;
  color: #1f2933;
  font-size: var(--catalog-font-size);
  font-weight: 700;
}

.catalog-description-field textarea {
  min-height: var(--catalog-control-height);
  max-height: var(--catalog-control-height);
  resize: vertical;
}

.catalog-paste-zone {
  min-height: var(--catalog-control-height);
  height: var(--catalog-control-height);
  display: grid;
  place-items: center;
  border: 1px dashed #cfd3d6;
  border-radius: 8px;
  background: #fafaf8;
  color: #555;
  font-size: var(--catalog-font-size);
  cursor: text;
}

.catalog-paste-zone:focus {
  outline: 2px solid #9db7ff;
  outline-offset: 1px;
}

.catalog-inline-status {
  align-self: center;
  color: #666;
  font-size: 12px;
}

.catalog-assignee-dropdown {
  position: relative;
  z-index: 40;
}

.catalog-assignee-dropdown summary {
  min-height: calc(var(--catalog-label-height) + 4px + var(--catalog-control-height));
  height: calc(var(--catalog-label-height) + 4px + var(--catalog-control-height));
  display: grid;
  grid-template-rows: var(--catalog-label-height) var(--catalog-control-height);
  gap: 4px;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  list-style: none;
}

.catalog-assignee-dropdown summary::-webkit-details-marker {
  display: none;
}

.catalog-assignee-dropdown summary span {
  color: #777;
}

.catalog-assignee-dropdown summary strong {
  display: grid;
  align-items: center;
  height: var(--catalog-control-height);
  padding: 0 10px;
  border: 1px solid #dddcd6;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  color: #1f2933;
  font-size: var(--catalog-font-size);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-assignee-dropdown[open] summary {
  border-color: transparent;
}

.catalog-assignee-dropdown[open] summary strong {
  border-color: #9db7ff;
}

.catalog-assignee-dropdown[open] .catalog-user-grid {
  position: absolute;
  z-index: 80;
  right: 0;
  left: 0;
  top: calc(100% + 4px);
  padding: 8px;
  border: 1px solid #d9d9d4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}

.catalog-quick-form > button {
  height: var(--catalog-control-height);
  min-height: var(--catalog-control-height);
  align-self: end;
  font-size: var(--catalog-font-size);
}

.catalog-save-shell button {
  width: 100%;
  height: var(--catalog-control-height);
  min-height: var(--catalog-control-height);
  font-size: var(--catalog-font-size);
}

.catalog-quick-form > .catalog-upload-preview,
.catalog-quick-form > .catalog-advanced {
  grid-column: 1 / -1;
}

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

.catalog-image-sections-source {
  grid-template-columns: minmax(0, 1fr);
}

.catalog-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 92px));
  gap: 7px;
  justify-content: start;
  align-items: start;
}

.catalog-image-card {
  position: relative;
  width: 100%;
}

.catalog-image-preview-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.catalog-image-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e4df;
}

.catalog-image-card span {
  display: block;
  margin-top: 3px;
  color: #777;
  font-size: 11px;
  line-height: 1.2;
}

.catalog-image-tools {
  position: absolute;
  z-index: 2;
  top: 5px;
  right: 5px;
  display: flex;
  gap: 4px;
}

.catalog-image-star,
.catalog-image-comment {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #a8a8a0;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  font-size: 12px;
}

.catalog-image-star.active {
  background: #fff8d8;
  border-color: #f0c84b;
  color: #d59b00;
}

.catalog-image-comment {
  position: relative;
  color: #6f7474;
}

.catalog-image-comment.has-comment {
  background: #eef6f3;
  border-color: #b9d8ca;
  color: #2f6f68;
}

.catalog-image-comment.has-new-comment {
  background: #eaf3ff;
  border-color: #8bb7e3;
  color: #225a91;
  box-shadow: 0 0 0 2px rgba(112, 166, 220, .22), 0 2px 8px rgba(0,0,0,.12);
}

.catalog-image-comment small {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  border-radius: 999px;
  background: #2f6f68;
  color: #fff;
  font-size: 9px;
  line-height: 13px;
}

.catalog-image-star svg,
.catalog-image-star i {
  width: 12px;
  height: 12px;
}

.catalog-image-dialog {
  width: min(94vw, 1120px);
  max-width: 1120px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
}

.catalog-image-dialog-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: 60vh;
  padding: 0;
}

.catalog-image-preview-pane {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 64vh;
  padding: 42px 18px 18px;
  background: #111;
}

.catalog-image-dialog img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.catalog-image-close {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,.9);
  color: #111;
}

.catalog-image-dialog-actions {
  position: absolute;
  left: 12px;
  bottom: 12px;
}

.catalog-image-dialog-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #111;
  text-decoration: none;
  font-weight: 700;
}

.catalog-image-comment-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  max-height: 82vh;
  padding: 16px;
  border-left: 1px solid #e7e6e1;
  background: #fff;
}

.catalog-image-comment-panel h2 {
  margin: 0;
  font-size: 15px;
}

.catalog-image-comments {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
}

.catalog-image-comment-row {
  padding: 8px;
  border: 1px solid #eeeeea;
  border-radius: 8px;
  background: #fbfbf9;
}

.catalog-image-comment-row header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.catalog-image-comment-row strong {
  display: block;
  color: #1f2933;
  font-size: 12px;
}

.catalog-image-comment-row header button {
  min-height: 20px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #6f7777;
  font-size: 11px;
}

.catalog-image-comment-row p {
  margin: 4px 0;
  color: #444;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.catalog-image-comment-row small {
  color: #888;
  font-size: 11px;
}

.catalog-image-replies {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid #e4e7e4;
}

.catalog-image-replies .catalog-image-comment-row {
  background: #fff;
}

.catalog-image-comment-form {
  display: grid;
  gap: 8px;
}

.catalog-image-reply-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #dfe8e4;
  border-radius: 8px;
  background: #f3f8f6;
  color: #2f6f68;
  font-size: 12px;
}

.catalog-image-reply-context.hidden {
  display: none;
}

.catalog-image-reply-context button {
  min-height: 22px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #66706d;
}

.catalog-image-comment-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 74px;
  border: 1px solid #dddcd6;
  border-radius: 8px;
  padding: 8px;
  font: inherit;
  font-size: 13px;
}

.catalog-image-comment-form div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-image-comment-form button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

#catalogImageCommentStatus {
  color: #777;
  font-size: 12px;
}

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

.catalog-form label {
  display: grid;
  gap: 5px;
  color: #555;
  font-size: 12px;
}

.catalog-form .wide {
  grid-column: 1 / -1;
}

.catalog-form input,
.catalog-form select,
.catalog-form textarea,
.catalog-filters input,
.catalog-filters select {
  width: 100%;
  border: 1px solid #dddcd6;
  border-radius: 8px;
  background: #fff;
}

.catalog-filters input,
.catalog-filters select {
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  color: #1f2933;
  font-size: 13px;
  font-weight: 650;
}

.catalog-form textarea {
  resize: vertical;
}

.catalog-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-upload-status {
  padding: 10px 12px;
  border: 1px dashed #d8d7d1;
  border-radius: 8px;
  background: #fafaf8;
  color: #666;
}

.catalog-upload-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.catalog-upload-preview small {
  color: #666;
}

.catalog-upload-preview img,
.catalog-upload-preview span {
  width: 44px;
  aspect-ratio: 1;
  border-radius: 7px;
  border: 1px solid #e2e1dc;
  background: #f1f1ee;
}

.catalog-upload-preview img {
  object-fit: cover;
}

.catalog-upload-preview span {
  display: grid;
  place-items: center;
  color: #666;
  font-weight: 700;
}

.catalog-advanced {
  border: 0;
  background: transparent;
}

.catalog-advanced summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  cursor: pointer;
  padding: 0 9px;
  border: 1px solid #ecebe6;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: #666;
  outline: none;
}

.catalog-advanced summary:focus-visible {
  outline: 1px solid #d7ddd8;
  outline-offset: -1px;
}

.catalog-advanced-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #efeee9;
  border-radius: 8px;
  background: #fff;
}

.catalog-advanced-grid .wide {
  grid-column: span 2;
}

.catalog-advanced-grid label {
  gap: 3px;
  font-size: 12px;
}

.catalog-advanced-grid input,
.catalog-advanced-grid select,
.catalog-advanced-grid textarea {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 13px;
}

.catalog-advanced-grid textarea {
  height: 34px;
  max-height: 56px;
}

.catalog-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.catalog-user-grid.compact {
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 0;
  max-height: 180px;
  overflow: auto;
}

.catalog-user-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e5e4df;
  border-radius: 8px;
  background: #fafaf8;
}

.catalog-user-grid.compact .catalog-user-choice {
  min-height: 22px;
  gap: 5px;
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.2;
}

.catalog-user-grid.compact .catalog-user-choice input {
  width: 11px;
  height: 11px;
  min-width: 11px;
  min-height: 11px;
  flex: 0 0 11px;
  margin: 0;
}

.catalog-user-grid.compact .catalog-user-choice span {
  display: grid;
  gap: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-user-grid.compact .catalog-user-choice strong {
  overflow: hidden;
  color: #1f2933;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-user-grid.compact .catalog-user-choice small {
  overflow: hidden;
  color: #8a8d8c;
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-submission-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.catalog-submission {
  padding: 9px;
  border: 1px solid #e7e6e1;
  border-radius: 8px;
  background: #fafaf8;
  font-size: 12px;
}

.catalog-submission strong {
  display: block;
  color: #1f2933;
  font-size: 13px;
}

.catalog-submission p,
.catalog-submission pre,
.catalog-submission div {
  margin: 5px 0 0;
  color: #555;
  line-height: 1.35;
}

.catalog-submission pre {
  white-space: pre-wrap;
  font-family: inherit;
}

.catalog-submission small,
.catalog-submission p,
.catalog-submission div,
.catalog-submission pre {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.catalog-operator-card {
  padding: 12px;
}

.catalog-source-card {
  padding: 12px;
}

.catalog-source-summary {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px;
}

.catalog-source-summary > div {
  display: grid;
  gap: 5px;
}

.catalog-source-summary span {
  color: #666;
  font-size: 11px;
  font-weight: 700;
}

.catalog-source-summary strong,
.catalog-source-summary p {
  min-height: 32px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #e4e2dc;
  border-radius: 7px;
  background: #fbfbf9;
  color: #1f2933;
  font-size: 13px;
  line-height: 1.35;
}

.catalog-source-images {
  margin-top: 12px;
}

.catalog-source-images h3 {
  margin: 0 0 8px;
  color: #555;
  font-size: 13px;
}

.catalog-source-images-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.catalog-source-images-head h3 {
  margin: 0;
}

.catalog-download-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #cfd8df;
  border-radius: 7px;
  background: #fff;
  color: #24597d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.catalog-download-all:hover {
  border-color: #8eabbf;
  background: #f3f8fb;
}

.catalog-soft-empty {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: #7a7f84;
  font-size: 12px;
}

.catalog-output-list {
  display: grid;
  gap: 8px;
}

.catalog-output-block {
  border: 0;
  border-top: 1px solid #eceae4;
  border-radius: 0;
  background: #fff;
  overflow: visible;
}

.catalog-output-block:first-child {
  border-top: 0;
}

.catalog-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 6px 0 7px;
  border-bottom: 0;
  background: #fff;
}

.catalog-output-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.catalog-output-avatar,
.catalog-output-avatar img,
.catalog-output-avatar span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
}

.catalog-output-avatar img {
  display: block;
  object-fit: cover;
}

.catalog-output-avatar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #263238;
  font-size: 11px;
  font-weight: 720;
}

.catalog-output-title > span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.catalog-output-head strong {
  color: #1f2933;
  font-size: 12px;
}

.catalog-output-head span,
.catalog-output-head small {
  color: #8a8d8c;
  font-size: 11px;
}

.catalog-output-history {
  position: relative;
}

.catalog-output-history summary {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #6f777b;
  cursor: pointer;
  list-style: none;
}

.catalog-output-history summary::-webkit-details-marker {
  display: none;
}

.catalog-output-history[open] summary,
.catalog-output-history summary:hover {
  background: #eef3f1;
}

.catalog-output-history > div {
  position: absolute;
  z-index: 5;
  right: 0;
  top: 30px;
  width: min(380px, 70vw);
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #deddd7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(31, 41, 51, .12);
}

.catalog-output-history article {
  padding: 7px 6px;
  border-bottom: 1px solid #f0efeb;
}

.catalog-output-history article:last-child {
  border-bottom: 0;
}

.catalog-output-history header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #1f2933;
  font-size: 12px;
}

.catalog-output-history small,
.catalog-output-history p {
  margin: 3px 0 0;
  color: #777;
  font-size: 11px;
  line-height: 1.35;
}

.catalog-output-form {
  padding: 0 0 4px;
}

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

.catalog-output-grid label {
  display: grid;
  gap: 5px;
  color: #29262f;
  font-size: 12px;
  font-weight: 700;
}

.catalog-output-grid input,
.catalog-output-grid textarea {
  width: 100%;
  border-color: #d9d5ce;
  color: #27232d;
  font-size: 13px;
  font-weight: 500;
}

.catalog-output-grid input {
  height: 34px;
  min-height: 34px;
}

.catalog-output-grid textarea {
  min-height: 62px;
  height: 62px;
  resize: vertical;
}

.catalog-output-grid .wide {
  grid-column: 1 / -1;
}

.catalog-output-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 10px;
}

.catalog-output-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 92px));
  gap: 7px;
  justify-content: start;
  align-items: start;
}

.catalog-output-images .catalog-image-card {
  width: 100%;
  max-width: 92px;
}

.catalog-output-images .catalog-image-preview-trigger {
  width: 100%;
}

.catalog-output-images .catalog-image-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid #e5e4df;
  border-radius: 8px;
}

.catalog-output-upload {
  display: grid;
  grid-template-columns: 92px 104px 104px repeat(4, minmax(92px, 1fr));
  gap: 8px;
  align-items: end;
}

.catalog-output-upload label {
  display: grid;
  gap: 3px;
  color: #555;
  font-size: 11px;
}

.catalog-output-upload select,
.catalog-output-upload .catalog-file-field strong,
.catalog-output-upload .catalog-paste-zone,
.catalog-output-upload button {
  min-height: 32px;
  height: 32px;
  border-radius: 7px;
  font-size: 12px;
}

.catalog-output-upload .catalogOperatorStatus {
  grid-column: 1 / -1;
  align-self: center;
  min-height: 14px;
  color: #777;
  font-size: 12px;
}

.catalog-output-upload .catalog-output-action {
  width: 100%;
  padding-inline: 10px;
  border-width: 1px;
  font-weight: 700;
  white-space: nowrap;
}

.catalog-output-upload .catalog-output-complete {
  border-color: #a9d5bf;
  background: #edf8f2;
  color: #26704b;
}

.catalog-output-upload .catalog-output-complete:hover:not(:disabled) {
  border-color: #75bb98;
  background: #dff3e8;
}

.catalog-output-upload .catalog-output-return {
  border-color: #e4b6aa;
  background: #fff3ef;
  color: #a44732;
}

.catalog-output-upload .catalog-output-return:hover:not(:disabled) {
  border-color: #ce8f7e;
  background: #ffe7df;
}

.catalog-output-upload .catalog-output-etsy {
  border-color: #b8afe0;
  background: #f2effc;
  color: #6048a8;
}

.catalog-output-upload .catalog-output-etsy:hover:not(:disabled) {
  border-color: #9587d0;
  background: #e8e2fa;
}

.catalog-output-upload .catalog-output-complete:disabled,
.catalog-output-upload .catalog-output-etsy:disabled {
  opacity: .58;
}

.catalog-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid #efeee9;
}

.catalog-section-head h2 {
  margin: 0;
  font-size: 14px;
}

.catalog-section-head span {
  color: #8a8d8c;
  font-size: 11px;
  white-space: nowrap;
}

.catalog-operator-form {
  --catalog-control-height: 32px;
  --catalog-font-size: 12px;
  display: grid;
  gap: 7px;
}

.catalog-operator-upload-row {
  display: grid;
  grid-template-columns: 108px 112px 112px 58px minmax(90px, 1fr);
  gap: 8px;
  align-items: end;
}

.catalog-operator-upload-row label,
.catalog-operator-text-grid label {
  display: grid;
  gap: 3px;
  color: #555;
  font-size: 12px;
  line-height: 1.2;
}

.catalog-operator-form input,
.catalog-operator-form select,
.catalog-operator-form textarea,
.catalog-operator-form .catalog-paste-zone,
.catalog-operator-form .catalog-file-field strong {
  min-height: var(--catalog-control-height);
  height: var(--catalog-control-height);
  padding: 6px 8px;
  border: 1px solid #dddcd6;
  border-radius: 7px;
  background: #fff;
  font-size: var(--catalog-font-size);
}

.catalog-operator-form .catalog-paste-zone,
.catalog-operator-form .catalog-file-field strong {
  display: grid;
  place-items: center;
}

.catalog-output-form .catalog-output-grid input {
  min-height: 34px;
  height: 34px;
}

.catalog-output-form .catalog-output-grid textarea {
  min-height: 62px;
  height: 62px;
  resize: vertical;
}

.catalog-operator-upload-row button {
  min-height: var(--catalog-control-height);
  height: var(--catalog-control-height);
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13px;
}

.catalog-operator-upload-row #catalogOperatorStatus {
  align-self: center;
  color: #777;
  font-size: 12px;
}

.catalog-operator-text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.catalog-operator-text-grid textarea {
  resize: vertical;
  max-height: 68px;
}

@media (max-width: 1500px) {
  .catalog-layout {
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    gap: 12px;
  }

.catalog-list-panel {
  min-width: 0;
}

.catalog-persona-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 22px;
  border: 0;
  background: transparent;
}

.catalog-persona-switch.hidden {
  display: none;
}

.catalog-persona-switch button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  width: auto;
  min-height: 38px;
  padding: 4px 10px 5px;
  border: 1px solid #d9e1dc;
  border-radius: 9px;
  color: #5f625f;
  background: transparent;
  text-align: left;
}

.catalog-persona-switch button:hover,
.catalog-persona-switch button.active {
  border: 1px solid #b8d1c2;
  background: #edf5f0;
  color: #244f3c;
}

.workbench-subnav .catalog-persona-switch button::after { display:none; }

.catalog-persona-switch strong {
  font-size: 11px;
  line-height: 1.25;
}

.catalog-persona-switch small {
  color: #8a8e8b;
  font-size: 8px;
  line-height: 1.15;
}

@media (max-width: 1050px) {
  .catalog-persona-switch { padding-left:10px; }
  .catalog-persona-switch small { display:none; }
  .catalog-persona-switch button { min-height:32px; padding:4px 8px; }
}

.catalog-zip-upload {
  display: grid;
  gap: 4px;
  justify-items: center;
  width: 100%;
  padding: 14px 10px;
  border: 1.5px dashed #b8c8bf;
  border-radius: 10px;
  background: #f8fbf9;
  color: #4d6257;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}

.catalog-zip-upload.drag-over,
.catalog-zip-upload.ready {
  border-color: #4f8a6d;
  background: #edf7f1;
}

.catalog-zip-upload strong {
  font-size: 12px;
}

.catalog-zip-upload small,
.catalog-zip-upload span {
  color: #7b8881;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.catalog-zip-upload button {
  min-height: 28px;
  padding: 4px 9px;
}

.catalog-output-action.danger {
  border-color: #e4b9b3;
  color: #a33f34;
  background: #fff7f5;
}

.catalog-completion-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d94343;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.catalog-completion-badge.hidden {
  display: none;
}

#catalog[data-active-catalog-pane="completion"] .catalog-filters {
  display: none;
}

#catalog[data-active-catalog-pane="completion"] .catalog-layout {
  grid-template-columns: minmax(380px, 470px) minmax(0, 1fr);
  min-height: calc(100vh - 150px);
}

#catalog[data-active-catalog-pane="completion"] .catalog-list-panel,
#catalog[data-active-catalog-pane="completion"] .catalog-detail-panel {
  min-height: calc(100vh - 150px);
}

.catalog-completion-inbox > header {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid #ebe8e2;
  background: #fbfaf8;
}

.catalog-completion-inbox h2,
.catalog-completion-inbox p {
  margin: 0;
}

.catalog-completion-inbox p {
  margin-top: 4px;
  color: #7d817e;
  font-size: 11px;
}

.catalog-completion-kpis {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.catalog-completion-kpis span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #efefeb;
  color: #686c69;
  font-size: 10px;
}

.catalog-completion-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 280px);
  padding: 10px;
  overflow: auto;
}

.catalog-completion-row {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #deded9;
  border-left: 4px solid #d0d3d0;
  border-radius: 10px;
  background: #fff;
}

.catalog-completion-row.state-new { border-color: #e8b3ad; border-left-color: #d94343; background: #fff9f8; }
.catalog-completion-row.state-pending { border-left-color: #d89b36; background: #fffcf5; }
.catalog-completion-row.state-uploaded { border-left-color: #4f9870; background: #f7fcf8; }
.catalog-completion-row.active { box-shadow: 0 0 0 2px rgba(55, 112, 83, .16); }

.catalog-completion-open {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.catalog-completion-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: visible;
  border-radius: 9px;
  background: #ecece7;
  color: #7e827f;
  font-size: 9px;
}

.catalog-completion-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.catalog-completion-thumb i { position: absolute; top: -5px; right: -5px; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #df3f3f; }
.catalog-completion-copy { display: grid; gap: 3px; min-width: 0; }
.catalog-completion-copy strong { overflow: hidden; color: #303531; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-completion-copy small,.catalog-completion-copy time { color: #797e7a; font-size: 10px; }
.catalog-completion-open > em { max-width: 96px; padding: 5px 7px; border-radius: 7px; background: #f0efeb; color: #6c716d; font-size: 9px; font-style: normal; text-align: center; }
.state-new .catalog-completion-open > em { background: #fce3df; color: #a93f35; }
.state-pending .catalog-completion-open > em { background: #fff0d4; color: #94651d; }
.state-uploaded .catalog-completion-open > em { background: #e3f3e8; color: #377354; }
.catalog-completion-upload { justify-self: end; padding: 5px 9px; border-color: #a8cbb5; color: #346b4e; background: #edf7f1; font-size: 10px; }
.catalog-completion-uploaded-time { justify-self: end; color: #56816a; font-size: 10px; }
.catalog-completion-empty { padding: 36px 14px; color: #898d8a; text-align: center; }

@media (max-width: 900px) {
  #catalog[data-active-catalog-pane="completion"] .catalog-layout { grid-template-columns: 1fr; }
  .catalog-completion-list { max-height: 50vh; }
}

#catalog[data-persona-mode="operator"] [data-catalog-pane="completion"].persona-hidden,
#catalog[data-persona-mode="operator"] [data-catalog-pane="listing"].persona-hidden,
#catalog[data-persona-mode="operator"] [data-catalog-pane="library"].persona-hidden {
  display: none;
}

  .catalog-folder-tree {
    padding: 5px;
  }

  .catalog-folder-name,
  .catalog-folder-add {
    min-height: 22px;
    font-size: 12px;
  }

  .catalog-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
    padding: 7px;
  }

  .catalog-row-image {
    width: 34px;
    border-radius: 6px;
  }

  .catalog-row-main strong {
    font-size: 13px;
  }

  .catalog-row-main p {
    margin: 2px 0;
    font-size: 11px;
  }

  .catalog-row-main small {
    font-size: 10px;
    line-height: 1.35;
  }

  .catalog-detail-panel {
    padding: 12px;
    overflow: visible;
  }

  .catalog-card {
    padding: 12px;
    margin-bottom: 12px;
  }

  .catalog-quick-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    --catalog-control-height: 36px;
  }

  .catalog-quick-form > label:first-of-type {
    grid-column: span 1;
  }

  .catalog-quick-form > .catalog-description-field {
    grid-column: span 2;
  }

  .catalog-quick-form > .catalog-file-field,
  .catalog-quick-form > .catalog-field-shell {
    grid-column: span 1;
  }

  .catalog-quick-form > .catalog-assignee-dropdown {
    grid-column: span 2;
  }

  .catalog-quick-form > .catalog-field-shell.catalog-save-shell {
    grid-column: span 1;
  }

  .catalog-quick-form > .catalog-inline-status,
  .catalog-quick-form > .catalog-upload-preview,
  .catalog-quick-form > .catalog-advanced {
    grid-column: 1 / -1;
  }

  .catalog-image-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .catalog-image-sections-source {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-output-media-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-output-upload {
    grid-template-columns: 88px 98px 98px repeat(4, minmax(82px, 1fr));
  }

  .catalog-image-grid {
    grid-template-columns: repeat(auto-fit, minmax(76px, 96px));
    width: 100%;
  }

  .catalog-images-card h2 {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .catalog-operator-upload-row {
    grid-template-columns: 96px 104px 104px 54px minmax(70px, 1fr);
  }
}

@media (max-width: 900px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-filters {
    display: flex;
    flex-wrap: nowrap;
  }

  .catalog-compact-bar #catalogSearch {
    width: 170px;
  }

  .catalog-compact-bar #catalogSupplierFilter {
    width: 124px;
  }

  .catalog-compact-bar #catalogCategoryFilter,
  .catalog-compact-bar #catalogStatusFilter {
    width: 104px;
  }

  #catalog[data-active-catalog-pane="library"] .catalog-filters > * {
    flex: 0 0 auto;
  }

  #catalog[data-active-catalog-pane="library"] #catalogSearch {
    flex-basis: auto;
    width: 170px;
  }

  .catalog-quick-form,
  .catalog-image-sections,
  .catalog-source-summary,
  .catalog-output-grid,
  .catalog-output-media-row {
    grid-template-columns: 1fr;
  }

  .catalog-output-upload {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .catalog-list {
    max-height: none;
  }

  .catalog-image-dialog-body {
    grid-template-columns: 1fr;
  }

  .catalog-image-comment-panel {
    max-height: none;
    border-left: 0;
    border-top: 1px solid #e7e6e1;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .catalog-layout {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  }

  .catalog-image-sections {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-image-grid {
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  }

  .catalog-operator-upload-row,
  .catalog-operator-text-grid,
  .catalog-source-summary,
  .catalog-output-grid,
  .catalog-output-media-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-output-media-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .catalog-shell {
    padding: 18px;
  }

  .catalog-top,
  .catalog-detail-head {
    display: block;
  }

  .catalog-actions {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .catalog-metrics,
  .catalog-form {
    grid-template-columns: 1fr;
  }
}
.catalog-library-summary { display:grid; gap:8px; padding:16px; color:var(--muted); }
.catalog-library-summary strong { color:var(--text); font-size:16px; }
.catalog-library-supplier,.catalog-library-spu { border:1px solid var(--line); border-radius:12px; background:var(--card); margin:10px; overflow:hidden; }
.catalog-library-supplier>summary,.catalog-library-spu>summary { cursor:pointer; display:flex; align-items:center; gap:12px; padding:14px; list-style:none; }
.catalog-library-supplier>summary span,.catalog-library-spu>summary em { margin-left:auto; color:var(--muted); font-style:normal; font-size:12px; }
.catalog-library-spus { padding:0 8px 8px; }
.catalog-library-spu>summary>span:nth-child(2) { display:grid; gap:4px; min-width:0; }
.catalog-library-spu>summary small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.catalog-library-cover { width:48px; height:48px; border-radius:8px; display:grid; place-items:center; background:var(--soft); overflow:hidden; flex:0 0 auto; }
.catalog-library-cover img,.catalog-library-skus img { width:100%; height:100%; object-fit:cover; }
.catalog-library-spu-detail { padding:0 14px 14px 74px; }
.catalog-library-meta { display:flex; flex-wrap:wrap; gap:12px; color:var(--muted); font-size:12px; margin:10px 0; }
.catalog-library-skus { display:grid; gap:6px; }
.catalog-library-skus article { display:grid; grid-template-columns:38px minmax(90px,auto) 1fr auto; align-items:center; gap:10px; padding:7px; border:1px solid var(--line); border-radius:8px; }
.catalog-library-skus article>span { width:38px; height:38px; display:grid; place-items:center; overflow:hidden; border-radius:6px; background:var(--soft); font-size:10px; }
.catalog-library-skus small,.catalog-library-skus em { color:var(--muted); font-style:normal; }
.catalog-library-original-images { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; margin:12px 0; }
.catalog-library-original-images article { display:grid; gap:5px; min-width:0; }
.catalog-library-original-images img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:8px; border:1px solid var(--line); }
.catalog-library-original-images span { color:var(--muted); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.catalog-library-original-images a[download] { font-size:12px; color:var(--accent); }

#catalog[data-active-catalog-pane="library"] .catalog-layout {
  display: block;
}

#catalog[data-active-catalog-pane="library"] .catalog-list-panel {
  width: 100%;
  border: 0;
  background: transparent;
  overflow: visible;
}

#catalog[data-active-catalog-pane="library"] .catalog-detail-panel,
#catalog[data-active-catalog-pane="library"] .catalog-folder-tree {
  display: none;
}

#catalog[data-active-catalog-pane="library"] .catalog-list {
  max-height: none;
  overflow: visible;
}

.catalog-library-kpis {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.catalog-library-kpis span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.catalog-library-kpis strong { color: var(--text); font-weight: 600; }
.catalog-product-master-list { display: grid; gap: 10px; }
.catalog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.catalog-pagination button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.catalog-pagination button:disabled {
  opacity: .45;
  cursor: default;
}

.catalog-product-master-card { margin: 0; }
.catalog-product-master-card.catalog-low-priority {
  background: #f3f4f4;
  border-color: #dfe2e2;
}
.catalog-product-master-card.catalog-low-priority .catalog-library-cover img {
  filter: grayscale(.72);
  opacity: .68;
}
.catalog-product-master-card.catalog-low-priority .product-master-copy,
.catalog-product-master-card.catalog-low-priority .product-master-title > strong {
  color: #8b9194;
}
.catalog-product-master-card.catalog-low-priority .product-master-meta,
.catalog-product-master-card.catalog-low-priority .product-master-stock {
  color: #9ca1a4;
}
.catalog-low-priority-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e4e6e6;
  color: #747a7d;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}
.catalog-product-master-card .product-master-main { grid-template-columns: 24px 62px minmax(240px, 1fr) auto; gap:12px; padding:10px 12px; }
.catalog-product-master-card .catalog-library-cover { width: 54px; height: 54px; }
.catalog-product-master-card .product-master-title { gap:6px; margin-bottom:4px; font-size:12px; font-weight:400; }
.catalog-product-master-card .product-master-title > strong { font-size:15px; line-height:1.35; font-weight:600; }
.catalog-product-master-card .product-master-title .tag { font-size:11px; font-weight:500; }
.catalog-product-master-card .product-master-meta,
.catalog-product-master-card .product-master-stock { font-size:12px; line-height:1.5; font-weight:400; }
.catalog-product-master-card .catalog-assignment-tags em { font-size:11px; font-weight:500; }
.catalog-product-master-card .compact-actions button { min-height:30px; padding:4px 9px; font-size:12px; font-weight:500; }
.catalog-product-master-card .product-inline-sku-row,
.catalog-product-master-card .product-inline-sku-row strong { font-size:12px; font-weight:400; }
.catalog-product-master-card .product-inline-skus small { color: var(--muted); text-align: right; }

#catalogSpuDetailBody {
  max-height: calc(86vh - 64px);
  overflow: auto;
  padding: 18px;
  overscroll-behavior: contain;
}

#catalogSpuDetailBody > h3 {
  margin: 18px 0 9px;
  font-size: 15px;
  line-height: 1.3;
}

#catalogSpuDetailBody .table-wrap,
#catalogSpuDetailBody .catalog-library-original-images,
#catalogSpuDetailBody .catalog-tier-list,
#catalogSpuDetailBody .catalog-attribute-grid {
  font-size: 12px;
}

.catalog-spu-detail-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}

.catalog-spu-detail-cover {
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
}

.catalog-spu-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.catalog-spu-detail-hero h3 { margin: 0 0 8px; }
.catalog-spu-detail-hero p { color: var(--muted); line-height: 1.65; }
.catalog-spu-json-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.catalog-spu-json-grid pre { min-height: 100px; margin: 0; padding: 12px; overflow: auto; border-radius: 10px; background: var(--soft); white-space: pre-wrap; }
.catalog-tier-list { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.catalog-tier-list article { min-width:150px; display:grid; grid-template-columns:1fr auto; gap:4px 12px; align-items:end; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
.catalog-tier-list article span { grid-column:1 / -1; color:var(--muted); font-size:12px; }
.catalog-tier-list article strong { color:var(--accent); font-size:20px; }
.catalog-tier-list article small { color:var(--muted); }
.catalog-attribute-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:8px; }
.catalog-attribute-grid article { display:grid; gap:5px; padding:11px 12px; border:1px solid var(--line); border-radius:9px; background:var(--panel); }
.catalog-attribute-grid article span { color:var(--muted); font-size:11px; }
.catalog-attribute-grid article strong { font-size:13px; line-height:1.5; }
.catalog-assignment-tags { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.catalog-progress-tag { display:inline-flex; align-items:center; gap:4px; min-height:22px; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.catalog-progress-tag.idle { background:#eef1f0; color:var(--muted); }
.catalog-progress-tag.active { background:#eaf3ff; color:#265b91; }
.catalog-progress-tag.done { background:#e8f6ef; color:#27724e; }
.catalog-progress-tag.uploaded { background:#eeeafd; color:#6048a8; }
.catalog-progress-tag.overdue { background:#ffe8e5; color:#b42318; }
.catalog-progress-tag.overdue b { display:grid; width:16px; height:16px; place-items:center; border-radius:50%; background:#c9281c; color:white; }
.catalog-assignment-form { width:min(760px,92vw); }
.catalog-assignment-form section { display:grid; gap:8px; }
.catalog-assignment-form section h3 { margin:0; font-size:14px; }
.catalog-assignment-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.catalog-assignment-options label { display:grid; grid-template-columns:22px 1fr; gap:3px 8px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:10px; }
.catalog-assignment-options label input { grid-row:1 / span 2; }
.catalog-assignment-options label small { color:var(--muted); }
.catalog-assignment-options label.disabled { opacity:.38; background:var(--soft); }
.catalog-operator-spu-section { display:grid; gap:5px; padding:6px 0 10px; border-bottom:1px solid var(--line); }
.catalog-operator-spu-section > strong { padding:0 8px; color:var(--muted); font-size:11px; }
.catalog-operator-spu em .catalog-progress-tag { margin-left:4px; }
.catalog-operator-assigned-spus { display:grid; gap:8px; padding:10px; }
.catalog-operator-assigned-spus h3 { margin:0; font-size:14px; }

.listing-library-summary {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  padding:4px 3px 8px;
}
.listing-library-summary span {
  padding:4px 7px;
  border-radius:999px;
  background:#f3f5f4;
  color:#758087;
  font-size:10px;
}
.listing-style-switch { grid-template-columns:repeat(2,minmax(0,1fr)); }
.listing-style-group { padding:7px 0; border-top:1px solid var(--line); }
.listing-style-group > header {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:2px 5px 7px;
}
.listing-style-group > header strong { font-size:11px; line-height:1.35; }
.listing-style-group > header small { color:var(--muted); font-size:10px; }
.listing-library-detail { display:grid; gap:18px; padding:22px; }
.listing-library-detail > header { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; }
.listing-library-detail > header span:not(.catalog-progress-tag) { color:#55736a; font-size:12px; }
.listing-library-detail h2 { margin:4px 0; font-size:20px; font-weight:650; }
.listing-library-detail p { margin:0; color:var(--muted); font-size:12px; }
.listing-library-images { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:14px; }
.listing-library-images figure { margin:0; overflow:hidden; border:1px solid var(--line); border-radius:10px; background:#fff; }
.listing-library-images figure > a { display:block; aspect-ratio:1/1; background:#f4f4f1; }
.listing-library-images img { width:100%; height:100%; object-fit:cover; }
.listing-library-images figcaption { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 8px; padding:8px 9px; }
.listing-library-images figcaption span { overflow:hidden; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.listing-library-images figcaption small { color:var(--muted); font-size:10px; }
.listing-library-images figcaption a { grid-column:1/-1; color:#285d7e; font-size:11px; }
.listing-library-controls { position:sticky; bottom:10px; display:flex; justify-content:flex-end; gap:10px; padding:12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.94); box-shadow:0 8px 24px rgba(31,41,51,.08); backdrop-filter:blur(8px); }
.listing-library-controls label { display:grid; gap:4px; min-width:190px; }
.listing-library-controls label span { color:var(--muted); font-size:11px; }
.listing-library-controls select { min-height:36px; }
.listing-library-controls.operator button { min-height:36px; padding:0 18px; }
@media (max-width:760px) {
  .listing-library-detail { padding:14px; }
  .listing-library-images { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .listing-library-controls { position:static; display:grid; grid-template-columns:1fr 1fr; }
  .listing-library-controls label { min-width:0; }
}

@media (max-width: 760px) {
  .catalog-spu-detail-hero,
  .catalog-spu-json-grid { grid-template-columns: 1fr; }
  .catalog-product-master-card .product-master-main { grid-template-columns: 24px 64px minmax(0, 1fr); }
  .catalog-product-master-card .compact-actions { grid-column: 1 / -1; }
  .catalog-assignment-options { grid-template-columns:1fr; }
}
.catalog-completion-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.catalog-completion-read-all {
  white-space: nowrap;
}

.catalog-completion-read-all:disabled {
  opacity: .45;
  cursor: default;
}

/* Homepage-aligned system theme -------------------------------------------------
   Keep semantic warning/success colors, while sharing the dashboard's cool gray
   canvas, navy interaction color, white cards, and quiet blue-gray borders. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --line: #dfe5ec;
  --text: #202b38;
  --muted: #748092;
  --accent: #285d82;
  --accent-strong: #174b70;
  --blue: #285d82;
  --shadow: 0 8px 24px rgba(33, 54, 76, .055);
}

body {
  background: #f5f7fa;
}

.topbar {
  background: rgba(255, 255, 255, .94);
  border-bottom-color: #e2e7ed;
  box-shadow: 0 1px 0 rgba(34, 58, 82, .025);
}

button,
select,
input,
textarea {
  border-color: #d8e0e8;
}

button:hover {
  border-color: #6f91aa;
  color: #174b70;
}

.primary {
  background: #285d82;
  border-color: #285d82;
}

.tab.active,
.nav-menu > .tab.active {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #285d82;
}

#catalog {
  background: #f5f7fa;
}

.catalog-list-panel,
.catalog-detail-panel,
.catalog-card,
.catalog-product-table-detail,
.catalog-metric,
.catalog-completion-inbox,
.operator-schedule-board,
.operator-schedule-group,
.shop-progress-hero,
.shop-progress-card {
  border-color: #dfe5ec;
  background: #fff;
  box-shadow: none;
}

.catalog-subnav {
  border-bottom-color: transparent;
  background: transparent;
  box-shadow: none;
}

.catalog-subnav button,
.catalog-subtab {
  color: #647286;
}

.catalog-subnav button.active,
.catalog-subtab.active {
  color: #285d82;
  border-bottom-color: #285d82;
}

.catalog-folder-tree,
.catalog-product-table-shell > header,
.catalog-completion-inbox > header {
  background: #fff;
  border-color: #e2e7ed;
}

.catalog-product-table-scroll th {
  background: #285d82;
  color: #fff;
}

.catalog-product-table-scroll tbody tr:hover,
.workspace-table tbody tr:hover {
  background: #f3f7fa;
}

.product-master-style,
.catalog-mini-tag.schedule-code {
  background: #e8f1f7;
  color: #285d82;
}

.product-match-input,
.product-match-select,
.operator-schedule-status select {
  border-color: #d3dde6;
  background: #fff;
}

.product-match-input:focus,
.product-match-select:focus,
.operator-schedule-status select:focus {
  outline: 2px solid #d7e7f2;
  border-color: #6f91aa;
}

.operator-schedule-group {
  border-radius: 14px;
}

.operator-schedule-group > header {
  background: #f3f7fa;
  color: #26394b;
}

.operator-schedule-group > header span {
  background: #e5eef5;
  color: #285d82;
}

.operator-schedule-row {
  border-top-color: #e8edf2;
}

.operator-schedule-row:not(.state-completed):not(.state-uploaded):hover {
  background: #f7f9fb;
}

.operator-schedule-state {
  background: #eef2f5;
  color: #667586;
}

.operator-schedule-detail {
  border-color: #b9c9d6;
  color: #285d82;
}

.operator-schedule-detail:hover {
  border-color: #6f91aa;
  background: #edf4f8;
}

#catalog .catalog-subnav > .catalog-persona-switch > button:hover {
  border-color: #aabcca;
  background: #f1f6f9;
  color: #285d82;
}

#catalog .catalog-subnav > .catalog-persona-switch > button.active {
  border-color: #6f91aa;
  background: #e8f1f7;
  color: #174b70;
  box-shadow: inset 0 0 0 1px rgba(40, 93, 130, .06);
}

.catalog-activity-row:hover,
.catalog-activity-row:focus,
.catalog-folder-row.active,
.catalog-folder-row.drag-over {
  background: #edf3f7;
}

.catalog-activity-row.active {
  background: #e5eef5;
  box-shadow: inset 3px 0 0 #285d82;
}

.catalog-activity-row strong em,
.catalog-activity-row.active strong,
.product-master-link {
  color: #285d82;
}

.shop-progress-detail,
.shop-progress-dashboard {
  background: #f5f7fa;
}

.shop-progress-kpis span,
.shop-progress-metrics span,
.shop-progress-sidebar-summary {
  background: #f1f5f8;
}

.shop-progress-card:not(.tone-warning):not(.tone-danger):not(.tone-achieved) {
  border-left-color: #6f91aa;
}

.shop-progress-bar {
  background: #e5ebf0;
}

.shop-progress-bar i {
  background: #477896;
}

.catalog-reserve-toggle {
  border-color: #dbe4eb;
  background: #f1f6f9;
}

/* Compact content starts: page/card headings intentionally removed. */
.catalog-product-table-shell > .catalog-product-table-scroll {
  border-radius: 13px;
}

.operator-schedule-board {
  padding-top: 10px;
}

.shop-progress-dashboard {
  padding-top: 12px;
}

.shop-progress-hero.shop-progress-hero-compact {
  min-height: 0;
  justify-content: flex-end;
  margin-bottom: 12px;
  padding: 10px 14px;
}

.shop-progress-card .shop-progress-plan-number {
  margin-top: 12px;
}
.catalog-reserve-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e7df;
  border-radius: 10px;
  background: #f3f8f5;
}

.catalog-reserve-toggle > span { display: grid; gap: 2px; }
.catalog-reserve-toggle small { color: var(--muted); }
.shop-progress-detail { padding: 0; background: #f5f6f3; }
.shop-progress-dashboard { min-height: 100%; padding: 22px; }
.shop-progress-hero { display:flex; justify-content:space-between; gap:20px; align-items:flex-end; margin-bottom:18px; padding:22px; border:1px solid #dfe4dd; border-radius:16px; background:#fff; }
.shop-progress-hero > div > span { color:#6d7d73; font-size:11px; letter-spacing:.08em; text-transform:uppercase; }
.shop-progress-hero h2 { margin:5px 0; font-size:24px; }
.shop-progress-hero p { margin:0; color:var(--muted); font-size:12px; }
.shop-progress-kpis { display:flex; gap:8px; }
.shop-progress-kpis span { display:grid; min-width:86px; padding:10px 13px; border-radius:10px; background:#f4f7f4; color:#66736a; font-size:11px; }
.shop-progress-kpis b { margin-top:3px; color:#1f2d26; font-size:21px; }
.shop-progress-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.shop-progress-card { padding:18px; border:1px solid #dde3dc; border-left:5px solid #809789; border-radius:14px; background:#fff; box-shadow:0 6px 20px rgba(31,45,38,.04); }
.shop-progress-card.tone-warning { border-left-color:#e5a42e; background:#fffcf4; }
.shop-progress-card.tone-danger { border-left-color:#d84d4d; background:#fff8f7; }
.shop-progress-card.tone-achieved { border-left-color:#3c9a68; background:#f7fcf8; }
.shop-progress-card > header { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.shop-progress-card h3 { margin:0 0 4px; font-size:18px; }
.shop-progress-card header p { margin:0; color:var(--muted); font-size:11px; }
.shop-progress-card header > span { max-width:170px; padding:5px 9px; border-radius:999px; background:#edf2ee; color:#53685b; font-size:10px; text-align:center; }
.shop-progress-card.tone-warning header > span { background:#fff0c9; color:#875d09; }
.shop-progress-card.tone-danger header > span { background:#ffe0dd; color:#a52e2e; font-weight:700; }
.shop-progress-card.tone-achieved header > span { background:#dff3e5; color:#237447; }
.shop-progress-plan-number { display:flex; align-items:baseline; gap:5px; margin-top:18px; }
.shop-progress-plan-number strong { font-size:32px; line-height:1; }
.shop-progress-plan-number span { color:var(--muted); font-size:12px; }
.shop-progress-bar { height:8px; margin:10px 0 16px; overflow:hidden; border-radius:999px; background:#e9ede9; }
.shop-progress-bar i { display:block; height:100%; border-radius:inherit; background:#567b65; transition:width .25s ease; }
.tone-warning .shop-progress-bar i { background:#e2a12b; }
.tone-danger .shop-progress-bar i { background:#d84d4d; }
.tone-achieved .shop-progress-bar i { background:#3c9a68; }
.shop-progress-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.shop-progress-metrics span { display:grid; padding:8px; border-radius:9px; background:#f5f7f5; color:#6a756e; font-size:10px; text-align:center; }
.shop-progress-metrics b { color:#26372d; font-size:17px; }
.shop-progress-operators { display:flex; justify-content:space-between; gap:10px; margin:13px 0; color:var(--muted); font-size:11px; }
.shop-progress-operators strong { color:#42564a; font-weight:600; text-align:right; }
.shop-plan-form { display:grid; grid-template-columns:minmax(90px,.7fr) minmax(130px,1fr) auto; gap:8px; align-items:end; padding-top:13px; border-top:1px solid #e8ece8; }
.shop-plan-form label { display:grid; gap:4px; }
.shop-plan-form label span { color:#6d786f; font-size:10px; }
.shop-plan-form input { min-width:0; height:36px; }
.shop-plan-form button { height:36px; white-space:nowrap; }
.shop-progress-sidebar-summary { display:grid; gap:5px; margin-bottom:10px; padding:13px; border-radius:11px; background:#f0f5f1; }
.shop-progress-sidebar-summary span { color:var(--muted); font-size:11px; }
.shop-progress-sidebar-summary em { color:#b63d3d; font-size:10px; font-style:normal; }
.shop-progress-sidebar-summary em.warning { color:#9a6b0b; }
.shop-progress-sidebar-list { display:grid; gap:5px; }
.shop-progress-sidebar-list button { display:flex; justify-content:space-between; align-items:center; gap:8px; width:100%; padding:9px 10px; border:1px solid transparent; border-radius:9px; background:transparent; text-align:left; }
.shop-progress-sidebar-list button:hover { border-color:#d9e2db; background:#f7f9f7; }
.shop-progress-sidebar-list button > span { display:grid; min-width:0; }
.shop-progress-sidebar-list strong,.shop-progress-sidebar-list small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shop-progress-sidebar-list small { color:var(--muted); font-size:9px; }
.shop-progress-sidebar-list em { flex:none; padding:4px 7px; border-radius:999px; background:#edf2ee; color:#52675a; font-size:10px; font-style:normal; }
.shop-progress-sidebar-list em.tone-warning { background:#fff0c9; color:#875d09; }
.shop-progress-sidebar-list em.tone-danger { background:#ffe0dd; color:#a52e2e; }
.shop-progress-sidebar-list em.tone-achieved { background:#dff3e5; color:#237447; }
@media (max-width: 1100px) {
  .shop-progress-grid { grid-template-columns:1fr; }
  .shop-progress-hero { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 720px) {
  .shop-progress-dashboard { padding:12px; }
  .shop-progress-kpis { width:100%; }
  .shop-progress-kpis span { min-width:0; flex:1; }
  .shop-progress-metrics { grid-template-columns:repeat(2,1fr); }
  .shop-plan-form { grid-template-columns:1fr 1fr; }
  .shop-plan-form button { grid-column:1/-1; }
}

/* Larger, inspectable product thumbnails in the operator schedule. */
.operator-schedule-row {
  grid-template-columns: 18px 26px 48px 68px minmax(260px, 680px) 112px 58px 34px;
  min-height: 78px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.operator-schedule-row.schedule-readonly {
  grid-template-columns: 18px 26px 48px 68px minmax(260px, 680px) 112px 34px;
}
.operator-schedule-columns {
  grid-template-columns: 18px 26px 48px 68px minmax(260px, 680px) 112px 58px 34px;
}
.operator-schedule-columns.schedule-readonly {
  grid-template-columns: 18px 26px 48px 68px minmax(260px, 680px) 112px 34px;
}
.operator-schedule-image {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid #dce4e9;
  cursor: zoom-in;
}
button.operator-schedule-image:hover {
  border-color: #6f91aa;
  box-shadow: 0 3px 12px rgba(40, 93, 130, .15);
}
@media (max-width: 1200px) {
  .operator-schedule-row,
  .operator-schedule-columns {
    grid-template-columns: 18px 26px 44px 58px minmax(190px, 1fr) 105px 32px;
  }
  .operator-schedule-row.schedule-readonly,
  .operator-schedule-columns.schedule-readonly {
    grid-template-columns: 18px 26px 44px 58px minmax(190px, 1fr) 105px 32px;
  }
  .operator-schedule-image {
    width: 54px;
    height: 54px;
  }
}
