:root {
  color-scheme: light;
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --ink: #1d2522;
  --muted: #6b746f;
  --line: #dce1dd;
  --line-strong: #c5ccc7;
  --sidebar: #202724;
  --sidebar-soft: #303936;
  --blue: #1769e0;
  --blue-soft: #eaf2ff;
  --green: #16845b;
  --green-soft: #e8f6ef;
  --amber: #a96800;
  --amber-soft: #fff4d9;
  --red: #c13d43;
  --red-soft: #ffedef;
  --shadow: 0 16px 44px rgba(25, 34, 30, 0.14);
  --sidebar-width: 232px;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; stroke-width: 1.8; }

.auth-locked { overflow: hidden; }
.auth-screen {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.1fr);
  min-height: 100vh;
  background: var(--surface);
  z-index: 200;
}
.auth-brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(42px, 7vw, 86px);
  color: #f6f8f6;
  background: #202724;
}
.auth-brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: clamp(54px, 12vh, 120px);
  border-radius: 6px;
  color: #202724;
  background: #f0c34e;
  font-size: 16px;
  font-weight: 850;
}
.auth-brand > div:nth-child(2) > span {
  color: #8fd7bb;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.auth-brand h1 {
  max-width: 540px;
  margin: 12px 0 14px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
}
.auth-brand p {
  max-width: 520px;
  margin: 0;
  color: #b8c2bd;
  font-size: 15px;
  line-height: 1.75;
}
.auth-service-list {
  display: grid;
  gap: 13px;
  margin-top: auto;
  padding-top: 42px;
}
.auth-service-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d9e0dd;
  font-size: 13px;
}
.auth-service-list svg { color: #f0c34e; }
.auth-entry {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 46px;
  background: #f7f8f6;
}
.license-form {
  width: min(430px, 100%);
}
.license-heading > span {
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}
.license-heading h2 {
  margin: 10px 0 8px;
  font-size: 28px;
}
.license-heading p {
  margin: 0 0 32px;
  color: var(--muted);
  line-height: 1.6;
}
.license-form .input-icon input {
  min-height: 46px;
  padding-left: 42px;
  font-family: "Cascadia Mono", Consolas, monospace;
}
.license-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
}
.license-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}
.license-support {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.license-support svg {
  width: 16px;
  min-width: 16px;
  margin-top: 1px;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  color: #f6f8f6;
  background: var(--sidebar);
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #f0c34e;
  color: #202724;
  font-weight: 800;
}
.brand strong, .brand span { display: block; }
.brand strong { font-size: 16px; }
.brand span { margin-top: 2px; color: #b8c2bd; font-size: 12px; }

.nav-list { display: grid; gap: 5px; padding: 18px 12px; }
.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #c6ceca;
  background: transparent;
  text-align: left;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: var(--sidebar-soft); }
.nav-item.active::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  background: #f0c34e;
}
.nav-item b {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 10px;
  color: #dfe5e2;
  background: rgba(255,255,255,.1);
  font-size: 11px;
  text-align: center;
}
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 18px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { margin-top: 2px; color: #9ca9a3; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #39c786; }
.sidebar-logout {
  margin-left: auto;
  color: #aeb9b4;
  border-color: rgba(255,255,255,.13);
  background: transparent;
}
.sidebar-logout:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.main { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 15px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-size: 20px; line-height: 1.25; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.connection-strip { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
}
.connection-pill i { width: 7px; height: 7px; border-radius: 50%; background: #a9b1ad; }
.connection-pill.connected { color: var(--green); border-color: #acd9c7; background: var(--green-soft); }
.connection-pill.connected i { background: var(--green); }

.view { display: none; padding: 24px 28px 36px; }
.view.active { display: block; }
.search-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { color: #55605a; font-size: 12px; font-weight: 600; }
.field.grow { flex: 1 1 220px; }
.field.compact { width: 130px; }
.field.tiny { width: 72px; }
input, select, textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: none;
  color: var(--ink);
  background: var(--surface);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23,105,224,.1);
}
.input-icon { position: relative; min-width: 0; }
.input-icon > svg {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 16px;
  height: 16px;
  color: #8b9590;
  transform: translateY(-50%);
  pointer-events: none;
}
.input-icon input { padding-left: 34px; }
.segmented {
  display: grid;
  grid-auto-flow: column;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  overflow: hidden;
  background: var(--surface);
}
.segmented button {
  min-width: 60px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}
.segmented button:last-child { border-right: 0; }
.segmented button.active { color: #fff; background: var(--blue); }
.switch-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  white-space: nowrap;
}
.switch-field input {
  position: absolute;
  z-index: 1;
  width: 32px;
  height: 18px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.switch {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 10px;
  background: #b9c1bd;
  transition: background .18s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}
.switch-field input:checked + .switch { background: var(--green); }
.switch-field input:checked + .switch::after { transform: translateX(14px); }
.switch-field b { font-size: 12px; font-weight: 600; }

.btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
}
.btn.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.btn.secondary { color: var(--blue); background: var(--blue-soft); border-color: #b9d2f8; }
.btn.ghost { color: #4f5a54; background: var(--surface); border-color: var(--line-strong); }
.btn.danger { color: #fff; background: var(--red); border-color: var(--red); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:hover:not(:disabled) { filter: brightness(.97); }
.search-btn { min-width: 112px; }
.link-match {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
}
.link-match[hidden] { display: none; }
.link-match-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--green);
}
.link-match-copy { min-width: 0; }
.link-match-copy span,
.link-match-copy strong,
.link-match-copy small { display: block; }
.link-match-copy span {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}
.link-match-copy strong {
  margin-top: 2px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-match-copy small { margin-top: 3px; color: var(--muted); }
.link-match .icon-btn { background: rgba(255,255,255,.7); }
.icon-btn {
  width: 36px;
  min-height: 36px;
  padding: 0;
  color: #59635e;
  background: transparent;
  border-color: var(--line);
}
.icon-btn:hover { color: var(--blue); background: var(--blue-soft); }

.metric-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  margin: 22px 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.metric-band div { padding: 16px 18px; border-right: 1px solid var(--line); }
.metric-band div:last-child { border-right: 0; }
.metric-band span, .metric-band strong { display: block; }
.metric-band span { color: var(--muted); font-size: 12px; }
.metric-band strong { margin-top: 6px; font-size: 20px; }
#metricJob { font-size: 14px; line-height: 24px; }

.store-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.store-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.store-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: #fff;
  background: #1565d8;
  border-radius: 6px;
}
.store-mark svg { width: 20px; height: 20px; }
.store-identity span,
.store-identity h2,
.store-identity small { display: block; }
.store-identity span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.store-identity h2 { margin: 2px 0 0; font-size: 17px; }
.store-identity small { margin-top: 3px; color: var(--muted); }
.store-period-field { width: 116px; }
.store-metric-band { grid-template-columns: repeat(6, minmax(100px, 1fr)); }
.store-metric-band strong { font-size: 18px; }
.store-warning {
  margin: -8px 0 20px;
  padding: 10px 12px;
  border-left: 3px solid var(--amber);
  color: #745719;
  background: var(--amber-soft);
  font-size: 12px;
  line-height: 1.6;
}
.store-filter {
  position: relative;
  width: min(320px, 100%);
}
.store-filter svg {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 16px;
  height: 16px;
  color: #8b9590;
  transform: translateY(-50%);
  pointer-events: none;
}
.store-filter input { padding-left: 34px; }
.store-table { min-width: 980px; }
.store-table td { height: 66px; }
.store-table .product-cell { min-width: 310px; }
.store-number {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.store-number.muted { color: var(--muted); font-weight: 500; }
.store-number.danger { color: var(--red); }
.store-health-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin: 0 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
}
.store-health-band div {
  padding: 12px 18px;
  border-right: 1px solid var(--line);
}
.store-health-band div:last-child { border-right: 0; }
.store-health-band span,
.store-health-band strong { display: block; }
.store-health-band span { color: var(--muted); font-size: 11px; }
.store-health-band strong {
  margin-top: 4px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.store-subtabs {
  display: flex;
  gap: 4px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}
.store-subtabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 650;
}
.store-subtabs button:hover { color: var(--ink); background: #f7f9f7; }
.store-subtabs button.active { color: var(--blue); }
.store-subtabs button.active::after {
  content: "";
  position: absolute;
  inset: auto 10px -1px;
  height: 2px;
  background: var(--blue);
}
.store-subtabs svg { width: 15px; height: 15px; }
.store-subtabs b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 10px;
}
.store-panel { display: none; }
.store-panel.active { display: block; }
.automation-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 18px;
}
.automation-head > div:first-child { max-width: 760px; }
.automation-head span,
.automation-head h2,
.automation-head p { display: block; }
.automation-head > div:first-child > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}
.automation-head h2 { margin: 4px 0 0; font-size: 18px; }
.automation-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.automation-switch { align-self: center; }
.automation-status-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
}
.automation-status-line > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}
.automation-status-line > div:last-child { border-right: 0; }
.automation-status-line svg {
  grid-row: 1 / 3;
  width: 18px;
  color: var(--blue);
}
.automation-status-line span { color: var(--muted); font-size: 11px; }
.automation-status-line strong {
  margin-top: 2px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.automation-form-grid {
  display: grid;
  grid-template-columns: 180px 180px minmax(260px, 1fr);
  align-items: start;
  gap: 16px;
  padding: 22px 0;
}
.automation-ai {
  min-height: 64px;
  padding-top: 19px;
  white-space: normal;
}
.automation-keywords { grid-column: 1 / -1; }
.automation-keywords textarea { min-height: 112px; }
.automation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.automation-actions > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}
.review-head .action-row { flex-wrap: nowrap; }
.review-time-field { width: 142px; }
.review-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
}
.review-summary div {
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}
.review-summary div:last-child { border-right: 0; }
.review-summary span,
.review-summary strong { display: block; }
.review-summary span { color: var(--muted); font-size: 11px; }
.review-summary strong {
  margin-top: 4px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 10px;
}
.review-toolbar-copy span,
.review-toolbar-copy b,
.review-toolbar-copy small { display: block; }
.review-toolbar-copy span { color: var(--muted); font-size: 12px; }
.review-toolbar-copy b { margin-top: 3px; color: var(--blue); font-size: 11px; }
.review-toolbar-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.review-toolbar select { width: 132px; min-height: 34px; }
.review-list { border-top: 1px solid var(--line); }
.review-item {
  display: grid;
  grid-template-columns: 30px 64px minmax(0, 1fr) 128px;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.review-select {
  display: grid;
  width: 30px;
  min-height: 64px;
  place-items: center;
}
.review-select input { width: 16px; min-height: 16px; }
.review-item > img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f1f2f0;
}
.review-item-main { min-width: 0; }
.review-item-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.review-item-title strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-item-main h3 {
  margin: 7px 0 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-item-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.review-metrics,
.review-actions-copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 9px;
}
.review-metrics span {
  color: #59635e;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.review-actions-copy span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 11px;
}
.review-actions-copy svg { width: 12px; height: 12px; }
.review-actions-copy b { color: var(--blue); font-size: 11px; }
.review-actions-copy b.pricing-blocked { color: var(--red); }
.review-item-controls {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 6px;
}
.review-item-controls small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-item-controls .btn {
  min-height: 32px;
  padding: 0 8px;
  font-size: 11px;
}
.operations-config {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
}
.operations-config > div {
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}
.operations-config > div:last-child { border-right: 0; }
.operations-config span,
.operations-config strong { display: block; }
.operations-config span { color: var(--muted); font-size: 11px; }
.operations-config strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.operations-config select {
  width: 100%;
  height: 30px;
  margin-top: 4px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
}

.pricing-index-cell {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-width: 132px;
}
.pricing-index-cell .price-sub {
  margin-top: 0;
  white-space: nowrap;
}
.operations-issues {
  display: grid;
  gap: 7px;
  padding: 16px 0;
}
.operations-issue {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-left: 3px solid #b88422;
  background: #fff9e9;
}
.operations-issue.high {
  border-left-color: var(--red);
  background: var(--red-soft);
}
.operations-issue.info {
  border-left-color: var(--blue);
  background: #eef6ff;
}
.operations-issue.ok {
  border-left-color: var(--green);
  background: var(--green-soft);
}
.operations-issue svg { width: 18px; color: #9d701b; }
.operations-issue.high svg { color: var(--red); }
.operations-issue.info svg { color: var(--blue); }
.operations-issue.ok svg { color: var(--green); }
.operations-issue strong,
.operations-issue span { display: block; }
.operations-issue strong { font-size: 12px; }
.operations-issue span { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.operations-issue > b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
.operations-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 10px;
  border-top: 1px solid var(--line);
}
.operations-toolbar > div:first-child strong,
.operations-toolbar > div:first-child span { display: block; }
.operations-toolbar > div:first-child strong { font-size: 13px; }
.operations-toolbar > div:first-child span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.ads-policy {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9f8;
}
.ads-policy > div {
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}
.ads-policy > div:last-child { border-right: 0; }
.ads-policy span,
.ads-policy strong { display: block; }
.ads-policy span {
  color: var(--muted);
  font-size: 11px;
}
.ads-policy strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ads-toolbar { border-top: 0; }
.ads-candidate-table { min-width: 920px; }
.ads-candidate-table .product-cell { min-width: 280px; }
.ads-candidate-table td > small,
#adsCampaigns td > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.ads-campaign-heading {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.muted-row { opacity: .68; }
.btn.small {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}
.stock-target-field { width: 116px; }
.logistics-template {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 118px)) minmax(320px, 1fr);
  align-items: end;
  gap: 10px;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
}
.logistics-field { min-width: 0; }
.stock-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 18px;
}
.stock-control-head > span {
  color: var(--muted);
  font-size: 11px;
}
.switch-field.compact {
  min-height: 18px;
  gap: 5px;
}
.switch-field.compact b { font-size: 10px; }
.stock-control-field > input { margin-top: 4px; }
.logistics-actions {
  justify-content: flex-end;
}
.logistics-actions .stock-target-field {
  width: 158px;
}
.logistics-actions .stock-target-field b {
  display: flex;
  align-items: center;
  min-height: 36px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.operations-selection-actions select {
  width: 132px;
}
.operations-table { min-width: 1120px; }
.operations-table .product-cell { min-width: 300px; }
.mode-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.operations-table td > small,
.mode-badges + small,
.error-badges small,
.dimension-cell span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.error-badges {
  min-width: 124px;
}
.error-badges .badge {
  margin: 0 4px 4px 0;
}
.dimension-cell {
  min-width: 148px;
}
.dimension-cell strong {
  font-size: 12px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 20px 0 12px;
}
.section-heading h2, .panel-title h2 { margin: 0; font-size: 16px; }
.section-heading span, .panel-title span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.select-control { width: auto; min-width: 120px; }
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.filter-bar .input-icon { width: min(360px, 100%); }
.filter-spacer { flex: 1; }
.batch-filter {
  display: grid;
  gap: 3px;
  width: min(300px, 34vw);
}
.batch-filter > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}
.batch-filter select { min-height: 36px; }
.batch-cell {
  max-width: 180px;
}
.batch-cell strong,
.batch-cell span { display: block; }
.batch-cell strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.table-wrap {
  position: relative;
  min-height: 210px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; }
th {
  height: 42px;
  padding: 8px 12px;
  color: #5f6a64;
  background: #f3f5f3;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
.sortable-th { padding: 0; }
.sort-button {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 0 12px;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.sort-button:hover { color: var(--blue); background: #edf3fb; }
.sort-button.active { color: var(--blue); background: var(--blue-soft); }
.sort-button svg { width: 14px; height: 14px; }
td {
  height: 64px;
  padding: 9px 12px;
  border-bottom: 1px solid #e7eae8;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbf9; }
.check-cell { width: 42px; text-align: center; }
.check-cell input { width: 16px; min-height: 16px; }
.action-cell { width: 72px; text-align: right; }
.product-cell {
  display: grid;
  grid-template-columns: 46px minmax(190px, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 520px;
}
.product-cell img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f1f2f0;
}
.product-cell strong, .product-cell span { display: block; }
.product-cell strong {
  max-width: 440px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.product-cell span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.score-cell strong { font-size: 16px; }
.score-bar { width: 56px; height: 3px; margin-top: 5px; background: #e3e7e4; }
.score-bar i { display: block; height: 100%; background: var(--green); }
.price-main { display: block; font-weight: 700; }
.price-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.profit-positive { color: var(--green); }
.profit-negative { color: var(--red); }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #59635e;
  background: #f7f8f7;
  font-size: 11px;
  white-space: nowrap;
}
.badge.success { color: var(--green); border-color: #a7d8c5; background: var(--green-soft); }
.badge.warning { color: var(--amber); border-color: #ecd193; background: var(--amber-soft); }
.badge.danger { color: var(--red); border-color: #edb6b9; background: var(--red-soft); }
.mapping-status { display: grid; gap: 4px; }
.mapping-status span { font-size: 11px; }
.mapping-status .ok { color: var(--green); }
.mapping-status .pending { color: var(--amber); }
.empty-state {
  display: none;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: #86908a;
}
.empty-state.show { display: grid; }
.empty-state svg { width: 30px; height: 30px; }
.table-action {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  color: #5b6660;
  background: transparent;
}
.table-action:hover { color: var(--blue); background: var(--blue-soft); }

.settings-view { padding-top: 0; }
.settings-tabs {
  display: flex;
  gap: 22px;
  margin: 0 -28px 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.settings-tabs button, .subtabs button {
  position: relative;
  min-height: 48px;
  padding: 0 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
}
.settings-tabs button.active, .subtabs button.active { color: var(--blue); }
.settings-tabs button.active::after, .subtabs button.active::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--blue);
}
.settings-panel { display: none; max-width: 920px; }
.settings-panel.active { display: block; }
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.managed-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 0 14px;
}
.managed-service {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.managed-service-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 5px;
  color: var(--blue);
  background: var(--blue-soft);
}
.managed-service strong,
.managed-service span { display: block; }
.managed-service strong { font-size: 13px; }
.managed-service span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.managed-service b {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}
.managed-service b.managed-ready {
  color: var(--green);
  border-color: #acd9c7;
  background: var(--green-soft);
}
.managed-service b.managed-missing {
  color: var(--amber);
  border-color: #e6c778;
  background: var(--amber-soft);
}
.managed-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 16px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
}
.managed-note > svg {
  min-width: 18px;
  color: var(--green);
}
.managed-note strong,
.managed-note span { display: block; }
.managed-note strong { font-size: 12px; }
.managed-note span {
  margin-top: 4px;
  color: #4f665c;
  font-size: 11px;
  line-height: 1.55;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  padding: 22px 0;
}
.span-2 { grid-column: 1 / -1; }
.settings-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  background: rgba(244,245,242,.96);
}
#settingsSaved { color: var(--green); font-size: 12px; }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(680px, calc(100vw - 40px));
  height: 100vh;
  overflow: auto;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform .22s ease;
  z-index: 60;
}
.drawer.open { transform: translateX(0); }
.backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(20,25,23,.34);
  z-index: 50;
}
.backdrop.show { display: block; }
.drawer-head, .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head span, .modal-head span { color: var(--muted); font-size: 11px; }
.drawer-head h2, .modal-head h2 { margin: 3px 0 0; font-size: 17px; }
.drawer-section { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 16px; font-size: 14px; }
.drawer-section .field + .field { margin-top: 15px; }
.localization-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.localization-heading > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.localization-heading h3 { margin: 0; }
.localization-heading img {
  width: 112px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f6f8;
}
.two-col, .three-col { display: grid; gap: 14px; margin-top: 14px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.drawer-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.97);
}
.subtabs { display: flex; gap: 22px; margin: -8px 0 18px; border-bottom: 1px solid var(--line); }
.subtabs button { min-height: 42px; }
.mapping-panel { display: none; }
.mapping-panel.active { display: block; }
.input-action { display: grid; grid-template-columns: 1fr 36px; gap: 7px; }
.lookup-results { display: grid; gap: 5px; margin: 8px 0; }
.lookup-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  text-align: left;
}
.lookup-item:hover { border-color: var(--blue); }
.lookup-item span { color: var(--muted); font-size: 11px; }

.modal {
  width: min(900px, calc(100vw - 40px));
  max-height: calc(100vh - 44px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(20,25,23,.42); }
.compact-modal { width: min(760px, calc(100vw - 40px)); }
.preview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.preview-stat {
  min-width: 0;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}
.preview-stat:last-child { border-right: 0; }
.preview-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.preview-stat strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-stat strong.success { color: var(--green); }
.preview-stat strong.danger { color: var(--red); }
.issue-list {
  display: grid;
  gap: 7px;
  padding: 14px 22px 0;
}
.issue-list:empty { display: none; }
.issue {
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  color: #8f2d32;
  background: var(--red-soft);
  font-size: 12px;
}
.preview-products {
  display: grid;
  gap: 0;
  padding: 8px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.preview-product {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  border-bottom: 1px solid var(--line-soft);
}
.preview-product:last-child { border-bottom: 0; }
.preview-product > img {
  width: 36px !important;
  min-width: 36px;
  max-width: 36px;
  height: 36px !important;
  max-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
}
.preview-product strong,
.preview-product span { display: block; }
.preview-product strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-product span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.preview-product-value {
  min-width: 118px;
  text-align: right;
}
.preview-product-value strong { font-size: 13px; }
.preview-more {
  padding: 11px 0 2px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.preview-loading {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}
.preview-loading svg {
  width: 24px;
  height: 24px;
  color: var(--blue);
}
.preview-loading strong {
  color: var(--ink);
  font-size: 13px;
}
.preview-loading span {
  max-width: 520px;
  font-size: 11px;
  line-height: 1.6;
}
.technical-details {
  border-bottom: 1px solid var(--line);
}
.technical-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 22px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  font-size: 12px;
}
.technical-details summary::-webkit-details-marker { display: none; }
.technical-details summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 650;
}
.technical-details summary svg { width: 15px; }
.technical-details summary small { font-size: 11px; }
.technical-details[open] summary { border-bottom: 1px solid var(--line); }
.technical-details .json-viewer {
  min-height: 220px;
  max-height: 44vh;
}
.json-viewer {
  min-height: 260px;
  max-height: 48vh;
  margin: 0;
  padding: 18px 22px;
  overflow: auto;
  color: #dfe8e3;
  background: #202724;
  font: 12px/1.6 "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.json-viewer.tall { min-height: 480px; }
.live-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
}
.confirm-copy strong,
.confirm-copy span { display: block; }
.confirm-copy strong { font-size: 13px; }
.confirm-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.confirm-upload { min-width: 180px; }
.operation-modal { width: min(980px, calc(100vw - 40px)); }
.operation-plan-list {
  max-height: 52vh;
  overflow: auto;
  border-bottom: 1px solid var(--line);
}
.operation-plan {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(220px, 34%);
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.operation-plan:last-child { border-bottom: 0; }
.operation-plan.manual { background: #fafbf9; }
.operation-plan.destructive {
  border-left: 3px solid var(--red);
  background: var(--red-soft);
}
.operation-plan > img {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
  background: #f1f2f0;
}
.operation-plan-copy { min-width: 0; }
.operation-plan-copy > div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.operation-plan-copy > div b { font-size: 11px; }
.operation-plan-copy > div small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.operation-plan-copy > strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.operation-plan-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.operation-diff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px;
}
.operation-diff span { color: var(--muted); font-size: 10px; }
.operation-diff span:first-of-type { grid-column: 1; grid-row: 1; }
.operation-diff strong:first-of-type { grid-column: 1; grid-row: 2; }
.operation-diff span:nth-of-type(2),
.operation-diff strong:nth-of-type(2) { grid-column: 3; }
.operation-diff span:nth-of-type(2) { grid-row: 1; }
.operation-diff strong:nth-of-type(2) { grid-row: 2; }
.operation-diff strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.operation-diff svg {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 16px;
  color: var(--blue);
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  z-index: 100;
}
.toast {
  width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.toast.error { border-left-color: var(--red); }
.toast strong, .toast span { display: block; }
.toast span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.job-result {
  display: block;
  max-width: 210px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jobs-table .action-cell {
  min-width: 82px;
  white-space: nowrap;
}

.loading { pointer-events: none; opacity: .68; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
  :root { --sidebar-width: 196px; }
  .metric-band { grid-template-columns: repeat(3, 1fr); }
  .store-metric-band { grid-template-columns: repeat(3, 1fr); }
  .automation-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automation-ai { grid-column: 1 / -1; padding-top: 0; min-height: 38px; }
  .review-summary { grid-template-columns: repeat(3, 1fr); }
  .review-summary div:nth-child(3) { border-right: 0; }
  .review-summary div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .metric-band div:nth-child(3) { border-right: 0; }
  .metric-band div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .operations-config { grid-template-columns: repeat(3, 1fr); }
  .operations-config > div:nth-child(3) { border-right: 0; }
  .operations-config > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .ads-policy { grid-template-columns: repeat(2, 1fr); }
  .ads-policy > div:nth-child(2n) { border-right: 0; }
  .ads-policy > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .logistics-template {
    grid-template-columns: repeat(5, minmax(82px, 1fr));
  }
  .logistics-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .auth-screen {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .auth-brand {
    min-height: 270px;
    padding: 34px 28px;
  }
  .auth-brand-mark {
    width: 42px;
    height: 42px;
    margin-bottom: 34px;
  }
  .auth-brand h1 { font-size: 30px; }
  .auth-brand p { font-size: 13px; }
  .auth-service-list { display: none; }
  .auth-entry {
    place-items: start center;
    padding: 34px 24px 48px;
  }
  :root { --sidebar-width: 64px; }
  .sidebar { width: 64px; }
  .brand { justify-content: center; padding: 12px; }
  .brand > div:last-child, .nav-item span, .nav-item b, .sidebar-foot div { display: none; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .sidebar-foot { justify-content: center; padding: 16px 0; }
  .topbar { align-items: flex-start; padding: 14px 16px; }
  .connection-strip { max-width: 160px; }
  .connection-pill { padding: 4px 6px; }
  .connection-pill span { display: none; }
  .view { padding: 18px 14px 28px; }
  .search-toolbar { align-items: stretch; }
  .field.compact, .field.tiny { width: calc(50% - 6px); }
  .segmented button { min-width: 62px; }
  .search-btn { flex: 1; }
  .metric-band { grid-template-columns: repeat(2, 1fr); }
  .metric-band div { border-top: 1px solid var(--line); }
  .metric-band div:nth-child(1), .metric-band div:nth-child(2) { border-top: 0; }
  .metric-band div:nth-child(2n) { border-right: 0; }
  .store-toolbar { align-items: stretch; flex-direction: column; }
  .store-toolbar .action-row { display: grid; grid-template-columns: 112px 1fr; }
  .store-period-field { width: 112px; }
  .store-health-band { grid-template-columns: repeat(2, 1fr); }
  .store-health-band div:nth-child(2) { border-right: 0; }
  .store-health-band div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .store-subtabs { overflow-x: auto; }
  .store-subtabs button { flex: 0 0 auto; padding: 0 10px; }
  .automation-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .automation-status-line { grid-template-columns: 1fr; }
  .automation-status-line > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .automation-status-line > div:last-child { border-bottom: 0; }
  .automation-form-grid { grid-template-columns: 1fr; }
  .automation-ai,
  .automation-keywords { grid-column: auto; }
  .automation-actions { align-items: stretch; flex-direction: column; }
  .automation-actions > span { margin: 0 0 4px; }
  .review-head .action-row { display: grid; grid-template-columns: 1fr 1fr; }
  .review-time-field { width: auto; grid-column: 1 / -1; }
  .review-summary { grid-template-columns: repeat(2, 1fr); }
  .review-summary div,
  .review-summary div:nth-child(3) { border-right: 1px solid var(--line); }
  .review-summary div:nth-child(2n) { border-right: 0; }
  .review-summary div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .review-toolbar { align-items: stretch; flex-direction: column; }
  .review-toolbar .action-row { display: grid; grid-template-columns: 1fr 1fr; }
  .review-toolbar select { width: auto; grid-column: 1 / -1; }
  .review-item { grid-template-columns: 30px 52px minmax(0, 1fr); }
  .review-select { width: 30px; min-height: 52px; }
  .review-item > img { width: 52px; height: 52px; }
  .review-item-controls { grid-column: 2 / -1; flex-direction: row; flex-wrap: wrap; }
  .review-item-controls small { width: 100%; text-align: left; }
  .review-item-controls .btn { flex: 1; }
  .operations-config { grid-template-columns: 1fr; }
  .operations-config > div { border-right: 0; border-top: 1px solid var(--line); }
  .operations-config > div:first-child { border-top: 0; }
  .operations-toolbar { align-items: stretch; flex-direction: column; }
  .operations-toolbar .action-row { display: grid; grid-template-columns: 1fr 1fr; }
  .ads-policy { grid-template-columns: 1fr; }
  .ads-policy > div {
    border-top: 1px solid var(--line);
    border-right: 0;
  }
  .ads-policy > div:first-child { border-top: 0; }
  .stock-target-field { width: auto; }
  .logistics-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logistics-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }
  .logistics-actions .stock-target-field {
    width: auto;
    grid-column: 1 / -1;
  }
  .operation-plan { grid-template-columns: 42px minmax(0, 1fr); }
  .operation-plan > img { width: 40px; height: 40px; }
  .operation-diff { grid-column: 2; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .action-row { width: 100%; }
  .action-row .btn { flex: 1; }
  .candidate-heading .action-row {
    display: grid;
    grid-template-columns: 90px minmax(82px, .8fr) minmax(112px, 1.2fr);
    gap: 7px;
  }
  .candidate-heading .select-control { min-width: 0; width: 90px; }
  .candidate-heading .btn {
    min-width: 0;
    padding: 0 7px;
    font-size: 12px;
    white-space: nowrap;
  }
  .filter-bar { align-items: stretch; flex-wrap: wrap; }
  .batch-filter { width: 100%; }
  .filter-spacer { display: none; }
  .product-table { min-width: 1160px; }
  .jobs-table { min-width: 680px; }
  .settings-tabs { overflow: auto; margin-left: -14px; margin-right: -14px; padding: 0 14px; }
  .form-grid, .two-col, .three-col, .managed-service-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .drawer { width: calc(100vw - 24px); }
  .preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-stat:nth-child(2) { border-right: 0; }
  .preview-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .preview-product { grid-template-columns: 38px minmax(0, 1fr); }
  .preview-product-value {
    grid-column: 2;
    min-width: 0;
    text-align: left;
  }
  .live-confirm { align-items: stretch; flex-direction: column; }
  .live-confirm .btn { width: 100%; }
}
