.warehouse-config-section {
  --warehouse-ink: #172033;
  --warehouse-muted: #667085;
  --warehouse-line: #dce2ea;
  --warehouse-soft: #f6f8fb;
  --warehouse-accent: #4f46e5;
  --warehouse-success: #047857;
  color: var(--warehouse-ink);
  background: #fff;
  border: 1px solid var(--warehouse-line);
  padding: clamp(1rem, 2.4vw, 1.5rem);
  container-type: inline-size;
}

.warehouse-title-row,
.warehouse-toolbar,
.warehouse-save-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.warehouse-title-row > div:first-child,
.warehouse-toolbar > div,
.warehouse-save-row > p {
  min-width: 0;
}

.warehouse-kicker {
  color: var(--warehouse-accent);
  letter-spacing: .13em;
  text-transform: uppercase;
  font-size: .68rem;
  font-weight: 760;
}

.warehouse-title-row h2,
.clearance-marker-section h3,
.priority-section h3 {
  color: var(--warehouse-ink);
  margin-top: .38rem;
  font-size: 1.08rem;
  font-weight: 740;
}

.warehouse-title-row p:last-child,
.clearance-marker-section > div:first-child > p:last-child,
.priority-section > div:first-child > p:last-child {
  color: var(--warehouse-muted);
  max-width: 52rem;
  margin-top: .35rem;
  font-size: .75rem;
  line-height: 1.55;
}

.warehouse-progress {
  flex: 0 0 auto;
  color: #3730a3;
  background: #eef2ff;
  min-width: 5.3rem;
  padding: .55rem .7rem;
  text-align: right;
}

.warehouse-progress strong,
.warehouse-progress span {
  display: block;
}

.warehouse-progress strong {
  font-size: 1rem;
}

.warehouse-progress span {
  margin-top: .1rem;
  font-size: .62rem;
}

.warehouse-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.2rem;
  border-block: 1px solid var(--warehouse-line);
}

.warehouse-flow li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .12rem .65rem;
  align-items: center;
  min-height: 62px;
  padding: .65rem .8rem;
  color: #98a2b3;
}

.warehouse-flow li + li {
  border-inline-start: 1px solid var(--warehouse-line);
}

.warehouse-flow li > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid #cfd6e1;
  font-size: .66rem;
  font-weight: 750;
}

.warehouse-flow strong {
  color: #475467;
  font-size: .72rem;
}

.warehouse-flow small {
  font-size: .63rem;
}

.warehouse-flow li.active > span,
.warehouse-flow li.done > span {
  color: #fff;
  background: var(--warehouse-accent);
  border-color: var(--warehouse-accent);
}

.warehouse-flow li.active strong,
.warehouse-flow li.done strong {
  color: var(--warehouse-ink);
}

.warehouse-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .25rem .75rem;
  margin-top: 1rem;
  border-inline-start: 3px solid;
  padding: .75rem .9rem;
  font-size: .72rem;
}

.warehouse-message strong {
  white-space: nowrap;
}

.warehouse-message.error {
  color: #9f1239;
  background: #fff1f2;
  border-color: #e11d48;
}

.warehouse-message.warning {
  color: #92400e;
  background: #fffbeb;
  border-color: #d97706;
}

.warehouse-message.success {
  color: var(--warehouse-success);
  background: #ecfdf5;
  border-color: #059669;
}

.warehouse-message.loading {
  color: #3730a3;
  background: #eef2ff;
  border-color: #6366f1;
}

.platform-discovery-empty {
  display: grid;
  gap: .25rem;
  margin-top: 1rem;
  color: #475467;
  background: #f8fafc;
  border: 1px dashed #cfd6e1;
  padding: .9rem 1rem;
}

.platform-discovery-empty strong {
  color: var(--warehouse-ink);
  font-size: .76rem;
}

.platform-discovery-empty span {
  color: var(--warehouse-muted);
  font-size: .68rem;
  line-height: 1.55;
}

.platform-discovery-empty.is-loading,
.historical-shop-section.is-loading {
  border-inline-start: 3px solid #6366f1;
  border-style: solid;
  background: #eef2ff;
}

.historical-shop-section.is-loading > div {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .7rem;
  align-items: baseline;
}

.historical-shop-section.is-loading strong {
  color: #3730a3;
  font-size: .72rem;
}

.historical-shop-section.is-loading span {
  color: #475467;
  font-size: .66rem;
}

.platform-discovery-summary {
  margin-top: 1rem;
  border: 1px solid var(--warehouse-line);
  background: #fbfcfe;
}

.discovery-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--warehouse-line);
}

.discovery-metrics > div {
  display: grid;
  gap: .08rem;
  min-height: 64px;
  align-content: center;
  padding: .65rem .85rem;
}

.discovery-metrics > div + div {
  border-inline-start: 1px solid var(--warehouse-line);
}

.discovery-metrics strong {
  color: #3730a3;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.discovery-metrics span,
.discovery-facts > div > span {
  color: #98a2b3;
  font-size: .62rem;
}

.discovery-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  padding: .8rem .9rem;
}

.discovery-facts p {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .35rem;
  color: var(--warehouse-muted);
  font-size: .68rem;
}

.discovery-facts b {
  color: #344054;
  background: #eef2ff;
  padding: .24rem .45rem;
  font-size: .64rem;
  font-weight: 680;
}

.discovered-shops {
  border-top: 1px solid var(--warehouse-line);
}

.discovered-shops summary {
  cursor: pointer;
  color: #4338ca;
  padding: .72rem .9rem;
  font-size: .68rem;
  font-weight: 700;
}

.shop-table {
  border-top: 1px solid var(--warehouse-line);
  max-height: 360px;
  overflow: auto;
}

.shop-row {
  display: grid;
  grid-template-columns: minmax(90px, .55fr) minmax(180px, 1.6fr) minmax(90px, .6fr);
  gap: .7rem;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid #edf0f4;
  padding: .48rem .9rem;
  font-size: .65rem;
}

.shop-row strong {
  overflow: hidden;
  color: var(--warehouse-ink);
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-head {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #667085;
  background: #f2f4f7;
  font-weight: 700;
}

.shop-limit-note {
  color: var(--warehouse-muted);
  padding: .6rem .9rem;
  font-size: .62rem;
}

.historical-shop-section {
  margin-top: 1rem;
  border: 1px solid var(--warehouse-line);
  background: var(--warehouse-soft);
  padding: clamp(.85rem, 2vw, 1.15rem);
}

.historical-shop-section.is-empty {
  border-inline-start: 3px solid #059669;
  background: #ecfdf5;
  padding-block: .72rem;
}

.historical-shop-section.is-empty > div {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .7rem;
  align-items: baseline;
}

.historical-shop-section.is-empty strong {
  color: #047857;
  font-size: .72rem;
}

.historical-shop-section.is-empty span {
  color: #475467;
  font-size: .66rem;
}

.historical-shop-title,
.historical-shop-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.historical-shop-title > div {
  min-width: 0;
}

.historical-shop-title h3 {
  margin-top: .35rem;
  color: var(--warehouse-ink);
  font-size: .98rem;
  font-weight: 740;
}

.historical-shop-title p:last-child,
.historical-shop-boundary {
  color: var(--warehouse-muted);
  font-size: .68rem;
  line-height: 1.55;
}

.historical-shop-title p:last-child {
  max-width: 58rem;
  margin-top: .3rem;
}

.historical-count {
  flex: 0 0 auto;
  padding: .38rem .55rem;
  font-size: .64rem;
  font-weight: 720;
}

.historical-count.needs-action {
  color: #9a3412;
  background: #fff7ed;
}

.historical-count.ready {
  color: #047857;
  background: #ecfdf5;
}

.historical-shop-boundary {
  margin-top: .75rem;
  border-inline-start: 2px solid #f59e0b;
  background: #fffbeb;
  padding: .55rem .7rem;
  color: #92400e;
}

.historical-shop-list {
  margin-top: .8rem;
  border-top: 1px solid var(--warehouse-line);
}

.historical-shop-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(180px, .85fr) minmax(260px, 1fr);
  gap: .8rem 1rem;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--warehouse-line);
  padding: .72rem .15rem;
}

.historical-shop-row.resolved {
  border-inline-start: 2px solid #10b981;
  padding-inline-start: .7rem;
}

.historical-shop-identity,
.historical-shop-evidence,
.historical-shop-row label {
  display: grid;
  gap: .2rem;
  min-width: 0;
}

.historical-shop-identity > span,
.historical-shop-evidence > span,
.historical-shop-row label > span {
  color: #98a2b3;
  font-size: .6rem;
}

.historical-shop-identity strong {
  overflow: hidden;
  color: var(--warehouse-ink);
  font-size: .72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.historical-shop-identity small,
.historical-shop-evidence p {
  color: var(--warehouse-muted);
  font-size: .63rem;
  line-height: 1.45;
}

.historical-shop-evidence p {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

.historical-shop-evidence b {
  color: #4338ca;
  background: #eef2ff;
  padding: .2rem .35rem;
  font-weight: 680;
}

.historical-shop-row select {
  width: 100%;
  min-height: 38px;
  color: var(--warehouse-ink);
  background: #fff;
  border: 1px solid #cfd6e1;
  padding: .45rem .55rem;
  font-size: .68rem;
}

.historical-shop-actions {
  align-items: center;
  margin-top: .8rem;
}

.historical-shop-actions > span {
  color: var(--warehouse-muted);
  font-size: .64rem;
}

.configuration-sync-gate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .2rem .75rem;
  align-items: center;
  margin-top: 1rem;
  color: #92400e;
  background: #fffbeb;
  border-inline-start: 3px solid #d97706;
  padding: .72rem .9rem;
  font-size: .7rem;
}

.configuration-sync-gate strong {
  white-space: nowrap;
}

.configuration-sync-gate.ready {
  color: #047857;
  background: #ecfdf5;
  border-color: #059669;
}

.configuration-sync-gate.syncing {
  color: #3730a3;
  background: #eef2ff;
  border-color: #6366f1;
}

.sync-action-row.configuration-blocked button {
  cursor: not-allowed;
  filter: grayscale(.35);
  opacity: .55;
}

.warehouse-toolbar {
  align-items: center;
  margin-top: 1rem;
  padding: .85rem 0;
}

.warehouse-toolbar strong,
.warehouse-toolbar small,
.warehouse-save-row strong,
.warehouse-save-row span {
  display: block;
}

.warehouse-toolbar strong,
.warehouse-save-row strong {
  font-size: .76rem;
}

.warehouse-toolbar small,
.warehouse-save-row span {
  color: var(--warehouse-muted);
  margin-top: .2rem;
  font-size: .66rem;
  line-height: 1.45;
}

.warehouse-button {
  min-height: 44px;
  padding: .62rem .9rem;
  border: 1px solid;
  font-size: .72rem;
  font-weight: 720;
  white-space: nowrap;
}

.warehouse-button.secondary {
  color: #3730a3;
  background: #f8fafc;
  border-color: #c7d2fe;
}

.warehouse-button.primary {
  color: #fff;
  background: var(--warehouse-accent);
  border-color: var(--warehouse-accent);
}

.warehouse-button:hover:not(:disabled) {
  filter: brightness(.96);
}

.warehouse-button:active:not(:disabled) {
  transform: translateY(1px);
}

.warehouse-button:focus-visible,
.clearance-marker-field input:focus-visible,
.warehouse-row select:focus-visible,
.priority-actions button:focus-visible {
  outline: 2px solid var(--warehouse-accent);
  outline-offset: 2px;
}

.warehouse-button:disabled,
.priority-actions button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

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

.warehouse-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(190px, .8fr) minmax(190px, .8fr);
  gap: clamp(.7rem, 2vw, 1.25rem);
  align-items: start;
  border-bottom: 1px solid #edf0f4;
  padding: .9rem .2rem;
}

.warehouse-identity {
  min-width: 0;
}

.warehouse-identity strong,
.warehouse-identity small {
  display: block;
  overflow-wrap: anywhere;
}

.warehouse-identity strong {
  color: var(--warehouse-ink);
  margin-top: .38rem;
  font-size: .78rem;
}

.warehouse-identity small,
.warehouse-row label small {
  color: #98a2b3;
  margin-top: .22rem;
  font-size: .62rem;
  line-height: 1.4;
}

.warehouse-platform {
  display: inline-block;
  color: #475467;
  background: #f2f4f7;
  padding: .2rem .4rem;
  font-size: .6rem;
  font-weight: 730;
}

.warehouse-platform.bigseller {
  color: #9a3412;
  background: #fff7ed;
}

.warehouse-platform.dianxiaomi {
  color: #1d4ed8;
  background: #eff6ff;
}

.warehouse-row label {
  display: flex;
  flex-direction: column;
  gap: .32rem;
  min-width: 0;
}

.warehouse-row label > span {
  color: #475467;
  font-size: .66rem;
  font-weight: 680;
}

.warehouse-row select {
  width: 100%;
  min-height: 42px;
  color: #344054;
  background: #fff;
  border: 1px solid #cfd6e1;
  border-radius: .35rem;
  padding: .5rem .6rem;
  font-size: .72rem;
}

.warehouse-row select:disabled {
  color: #475467;
  background: #f6f8fb;
  opacity: 1;
}

.warehouse-empty {
  color: var(--warehouse-muted);
  background: var(--warehouse-soft);
  border-inline-start: 3px solid #98a2b3;
  padding: 1rem;
  font-size: .72rem;
  line-height: 1.65;
}

.warehouse-empty.compact {
  margin: 0;
  padding: .75rem;
}

.clearance-marker-section {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(340px, 1.3fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
  padding: 1.1rem;
  background: #fffdf5;
  border: 1px solid #f3dfac;
}

.clearance-marker-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 0;
}

.clearance-marker-field > span {
  color: #475467;
  font-size: .66rem;
  font-weight: 680;
}

.clearance-marker-field input {
  width: 100%;
  min-height: 42px;
  color: #344054;
  background: #fff;
  border: 1px solid #d6c27f;
  border-radius: .35rem;
  padding: .5rem .6rem;
  font-size: .72rem;
}

.clearance-marker-field small {
  color: #8a6d1d;
  font-size: .62rem;
  line-height: 1.45;
}

.priority-section {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(340px, 1.3fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
  padding: 1.1rem;
  background: var(--warehouse-soft);
  border: 1px solid var(--warehouse-line);
}

.priority-list {
  align-self: start;
  background: #fff;
  border-top: 1px solid var(--warehouse-line);
}

.priority-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .2rem .65rem;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid #edf0f4;
  padding: .55rem .7rem;
}

.priority-number {
  grid-row: 1 / 3;
  color: var(--warehouse-accent);
  font-variant-numeric: tabular-nums;
  font-size: .66rem;
  font-weight: 760;
}

.priority-row strong {
  font-size: .75rem;
}

.priority-row small {
  color: #98a2b3;
  font-size: .62rem;
}

.priority-actions {
  grid-row: 1 / 3;
  grid-column: 3;
  display: flex;
  gap: .35rem;
}

.priority-actions button {
  min-width: 44px;
  min-height: 36px;
  color: #4338ca;
  background: #f8fafc;
  border: 1px solid #d7dcf8;
  padding: .35rem .5rem;
  font-size: .64rem;
  font-weight: 680;
}

.warehouse-save-row {
  align-items: center;
  margin-top: 1rem;
  border-top: 1px solid var(--warehouse-line);
  padding-top: 1rem;
}

html[data-agent-role="team_admin"] .capability-version,
html[data-agent-role="operator"] .capability-version,
html[data-agent-role="team_admin"] .schedule-row small,
html[data-agent-role="team_admin"] .identity-band > .identity-fact:nth-child(3) small,
html[data-agent-role="team_admin"] .identity-band > .identity-fact:nth-child(4) small,
html[data-agent-role="operator"] .identity-band > .identity-fact:nth-child(3) small,
html[data-agent-role="operator"] .identity-band > .identity-fact:nth-child(4) small {
  display: none;
}

.admin-team-configurations {
  --admin-ink: #172033;
  --admin-muted: #667085;
  --admin-line: #dce2ea;
  margin-top: 1rem;
  color: var(--admin-ink);
  background: #fff;
  border: 1px solid var(--admin-line);
  padding: clamp(1rem, 2.4vw, 1.5rem);
}

.admin-config-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-config-title h2 {
  margin-top: .35rem;
  font-size: 1.08rem;
  font-weight: 740;
}

.admin-config-title p:last-child {
  max-width: 54rem;
  margin-top: .35rem;
  color: var(--admin-muted);
  font-size: .72rem;
  line-height: 1.55;
}

.admin-config-grid {
  display: grid;
  gap: .9rem;
  margin-top: 1rem;
}

.admin-config-card {
  border: 1px solid var(--admin-line);
  border-inline-start: 4px solid #d97706;
  background: #fbfcfe;
}

.admin-config-card.ready {
  border-inline-start-color: #059669;
}

.admin-config-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--admin-line);
}

.admin-config-card header p {
  color: var(--admin-muted);
  font-size: .62rem;
}

.admin-config-card header h3 {
  margin-top: .15rem;
  font-size: .88rem;
  font-weight: 740;
}

.admin-config-card header > span {
  color: #92400e;
  background: #fffbeb;
  padding: .32rem .55rem;
  font-size: .65rem;
  font-weight: 720;
}

.admin-config-card.ready header > span {
  color: #047857;
  background: #ecfdf5;
}

.admin-config-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-config-metrics > div {
  display: grid;
  gap: .1rem;
  min-height: 62px;
  align-content: center;
  padding: .65rem 1rem;
}

.admin-config-metrics > div + div {
  border-inline-start: 1px solid var(--admin-line);
}

.admin-config-metrics strong {
  color: #3730a3;
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
}

.admin-config-metrics span,
.admin-config-issues {
  color: var(--admin-muted);
  font-size: .64rem;
}

.admin-config-issues {
  border-top: 1px solid var(--admin-line);
  padding: .7rem 1rem;
  color: #92400e;
  background: #fffbeb;
}

.admin-config-details {
  border-top: 1px solid var(--admin-line);
}

.admin-config-details > summary {
  cursor: pointer;
  padding: .75rem 1rem;
  color: #4338ca;
  font-size: .68rem;
  font-weight: 720;
}

.admin-detail-block {
  border-top: 1px solid var(--admin-line);
  padding: .9rem 1rem;
}

.admin-detail-block h4 {
  margin-bottom: .55rem;
  font-size: .72rem;
  font-weight: 740;
}

.admin-detail-block p,
.admin-detail-block dl {
  color: var(--admin-muted);
  font-size: .65rem;
  line-height: 1.55;
}

.admin-detail-block dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem 1rem;
}

.admin-detail-block dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: .5rem;
}

.admin-detail-block dt {
  color: #98a2b3;
}

.admin-detail-block dd,
.admin-detail-block code {
  overflow-wrap: anywhere;
}

.admin-shop-list,
.admin-warehouse-list {
  max-height: 320px;
  margin-top: .65rem;
  overflow: auto;
  border-top: 1px solid var(--admin-line);
}

.admin-shop-list > div,
.admin-warehouse-list > div {
  display: grid;
  gap: .6rem;
  align-items: center;
  min-height: 38px;
  padding: .45rem 0;
  border-bottom: 1px solid #edf0f4;
  font-size: .62rem;
}

.admin-shop-list > div {
  grid-template-columns: 70px minmax(160px, 1fr) 90px minmax(120px, .7fr);
}

.admin-warehouse-list > div {
  grid-template-columns: 72px minmax(150px, 1fr) 95px 90px minmax(110px, .65fr);
}

.admin-shop-list strong,
.admin-warehouse-list strong {
  font-weight: 680;
}

.admin-shop-list code,
.admin-warehouse-list code,
.admin-detail-block code {
  color: #475467;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .58rem;
}

.dark .warehouse-config-section {
  --warehouse-ink: #f1f5f9;
  --warehouse-muted: #94a3b8;
  --warehouse-line: #334155;
  --warehouse-soft: #111c30;
  background: #0f172a;
}

.dark .admin-team-configurations {
  --admin-ink: #f1f5f9;
  --admin-muted: #94a3b8;
  --admin-line: #334155;
  background: #0f172a;
}

.dark .admin-config-card {
  background: #111c30;
}

.dark .admin-shop-list > div,
.dark .admin-warehouse-list > div {
  border-color: #1e293b;
}

.dark .warehouse-row,
.dark .priority-row {
  border-color: #1e293b;
}

.dark .warehouse-row label > span,
.dark .warehouse-row select,
.dark .priority-row strong {
  color: #e2e8f0;
}

.dark .warehouse-row select,
.dark .clearance-marker-field input,
.dark .priority-list {
  background: #0f172a;
  border-color: #475569;
}

.dark .warehouse-row select:disabled,
.dark .warehouse-empty {
  background: #1e293b;
}

.dark .clearance-marker-section {
  background: #2b2111;
  border-color: #5f481d;
}

.dark .clearance-marker-field > span,
.dark .clearance-marker-field input {
  color: #e2e8f0;
}

.dark .clearance-marker-field small {
  color: #fcd34d;
}

.dark .platform-discovery-summary,
.dark .platform-discovery-empty,
.dark .shop-head {
  background: #111c30;
}

.dark .discovery-facts b {
  color: #c7d2fe;
  background: #1e293b;
}

.dark .shop-row {
  border-color: #1e293b;
}

.dark .historical-shop-section {
  background: #111c30;
}

.dark .historical-shop-section.is-empty,
.dark .historical-count.ready {
  background: #052e2b;
}

.dark .historical-shop-section.is-empty span,
.dark .historical-shop-actions > span {
  color: #94a3b8;
}

.dark .historical-shop-boundary,
.dark .historical-count.needs-action {
  color: #fcd34d;
  background: #2b2111;
}

.dark .historical-shop-evidence b {
  color: #c7d2fe;
  background: #1e293b;
}

.dark .historical-shop-row select {
  color: #e2e8f0;
  background: #0f172a;
  border-color: #475569;
}

@container (max-width: 760px) {
  .warehouse-row,
  .clearance-marker-section,
  .priority-section {
    grid-template-columns: 1fr;
  }

  .warehouse-flow {
    grid-template-columns: 1fr;
  }

  .discovery-facts {
    grid-template-columns: 1fr;
  }

  .shop-row {
    grid-template-columns: minmax(80px, .7fr) minmax(150px, 1.3fr) minmax(80px, .7fr);
  }

  .admin-detail-block dl,
  .admin-shop-list > div,
  .admin-warehouse-list > div,
  .historical-shop-row {
    grid-template-columns: 1fr;
  }

  .warehouse-flow li + li {
    border-block-start: 1px solid var(--warehouse-line);
    border-inline-start: 0;
  }
}

@container (max-width: 520px) {
  .warehouse-title-row,
  .warehouse-toolbar,
  .warehouse-save-row,
  .admin-config-title,
  .historical-shop-title,
  .historical-shop-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .warehouse-progress {
    width: fit-content;
    text-align: left;
  }

  .warehouse-button {
    width: 100%;
    white-space: normal;
  }

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

  .admin-config-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .discovery-metrics > div:nth-child(3) {
    border-inline-start: 0;
    border-top: 1px solid var(--warehouse-line);
  }

  .discovery-metrics > div:nth-child(4) {
    border-top: 1px solid var(--warehouse-line);
  }

  .configuration-sync-gate {
    grid-template-columns: 1fr;
  }

  .priority-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .priority-actions {
    grid-row: auto;
    grid-column: 2;
    margin-top: .25rem;
  }
}

@media (pointer: coarse) {
  .priority-actions button,
  .warehouse-row select {
    min-height: 44px;
  }

  .historical-shop-row select {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .warehouse-config-section * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.admin-query-patterns {
  margin-top: 1.25rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--warehouse-line);
  background: var(--warehouse-surface, #fff);
}

.admin-query-patterns > div:first-child {
  max-width: 760px;
}

.admin-query-patterns h3 {
  margin: .25rem 0 .45rem;
  color: var(--warehouse-ink);
}

.admin-query-patterns p {
  margin: 0;
  color: var(--warehouse-muted);
  line-height: 1.65;
}

.admin-query-pattern-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.admin-query-pattern-list article {
  display: grid;
  gap: .35rem;
  padding: .9rem 1rem;
  border: 1px solid var(--warehouse-line);
  background: #f8fafc;
}

.admin-query-pattern-list article.candidate {
  border-inline-start: 3px solid #4f46e5;
  background: #eef2ff;
}

.admin-query-pattern-list strong,
.admin-query-pattern-list b {
  color: var(--warehouse-ink);
}

.admin-query-pattern-list span,
.admin-query-pattern-list small {
  color: var(--warehouse-muted);
}

.admin-query-pattern-list b {
  justify-self: start;
  font-size: .78rem;
}

.dark .admin-query-patterns,
.dark .admin-query-pattern-list article {
  background: #0f172a;
  border-color: #334155;
}

.dark .admin-query-pattern-list article.candidate {
  background: #1e1b4b;
  border-inline-start-color: #818cf8;
}
