﻿:root {
  color-scheme: light;
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-raised: #fbfcfb;
  --line: #d9ded8;
  --text: #17201c;
  --muted: #637068;
  --primary: #1f6f5b;
  --primary-strong: #164d40;
  --blue: #2f5f9f;
  --amber: #956719;
  --red: #a13a35;
  --green-soft: #e5f3ec;
  --blue-soft: #e8eef8;
  --amber-soft: #f8eddc;
  --red-soft: #f8e7e5;
  --thumb-bg: #edf0ee;
  --code-bg: #101614;
  --code-text: #f4f7f5;
  --toast-bg: #14201c;
  --topbar-bg: rgba(247, 248, 246, 0.96);
  --remove-bg: rgba(255, 255, 255, 0.94);
  --remove-border: rgba(17, 24, 39, 0.24);
  --shadow: 0 8px 24px rgba(20, 32, 28, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101014;
  --surface: #17171d;
  --surface-raised: #1d1c25;
  --line: #32313c;
  --text: #f1f0f6;
  --muted: #a6a3b3;
  --primary: #9b8cff;
  --primary-strong: #c8c0ff;
  --blue: #aab9ff;
  --amber: #f0c36f;
  --red: #f09992;
  --green-soft: #282340;
  --blue-soft: #20263f;
  --amber-soft: #382b16;
  --red-soft: #3a211f;
  --thumb-bg: #24232b;
  --code-bg: #0a0a0f;
  --code-text: #f1f0f6;
  --toast-bg: #f1f0f6;
  --topbar-bg: rgba(16, 16, 20, 0.96);
  --remove-bg: rgba(23, 23, 29, 0.94);
  --remove-border: rgba(241, 240, 246, 0.2);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
  min-width: 0;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  min-height: 42px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}

button:hover {
  border-color: var(--primary);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.primary:hover {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.danger {
  border-color: var(--red);
  color: var(--red);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.brand-block {
  min-width: 0;
}

.brand-button {
  display: inline-grid;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.brand-button:hover {
  border-color: transparent;
  background: transparent;
  color: var(--primary-strong);
}

.brand-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  letter-spacing: 0;
}

main {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 1rem;
  overflow-x: hidden;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.tabs,
.actions,
.inline-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.segmented {
  display: flex;
  gap: 0.22rem;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 0.22rem 0.22rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-raised) 76%, var(--bg));
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--primary) 45%, transparent) transparent;
}

.segmented::-webkit-scrollbar {
  height: 5px;
}

.segmented::-webkit-scrollbar-track {
  background: transparent;
}

.segmented::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 42%, transparent);
}

.dashboard-status-strip {
  margin-bottom: 0.75rem;
}

.tab,
.filter {
  min-height: 38px;
  padding: 0.5rem 0.7rem;
}

.nav-tab {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-content: center;
  padding-inline: 2.1rem 0.82rem;
  line-height: 1;
}

.nav-tab span {
  justify-self: center;
  align-self: center;
  line-height: 1;
}

.new-item-tab {
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
  background: color-mix(in srgb, var(--primary) 11%, var(--surface));
  color: var(--primary-strong);
  font-weight: 780;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 6%, transparent), 0 6px 18px color-mix(in srgb, var(--primary) 10%, transparent);
}

.new-item-tab .nav-icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.25;
}

.new-item-tab:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
}

.batch-tab {
  border-color: color-mix(in srgb, var(--blue) 54%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 46%, var(--surface));
  color: var(--blue);
  font-weight: 780;
}

.batch-tab:hover {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue-soft) 68%, var(--surface));
}

.add-item-tab.active,
.add-item-tab.active:hover {
  border-color: var(--primary);
}

.icon-tab {
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 999px;
}

.nav-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.nav-tab .nav-icon {
  position: absolute;
  left: 0.72rem;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  gap: 0.34rem;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-height: 38px;
  padding: 0 0.62rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 62%, var(--surface));
  color: var(--blue);
  font-weight: 760;
}

.theme-toggle::after {
  content: "Dark";
  font-size: 0.76rem;
  line-height: 1;
}

.theme-icon {
  width: 16px;
  height: 16px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.theme-icon-moon {
  display: block;
  fill: color-mix(in srgb, var(--primary) 28%, transparent);
}

.theme-icon-sun {
  display: none;
  fill: none;
}

.theme-toggle[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--amber) 48%, var(--line));
  background: color-mix(in srgb, var(--amber-soft) 72%, var(--surface));
  color: var(--amber);
}

.theme-toggle[aria-pressed="true"]::after {
  content: "Light";
}

.theme-toggle[aria-pressed="true"] .theme-icon-moon {
  display: none;
}

.theme-toggle[aria-pressed="true"] .theme-icon-sun {
  display: block;
}

.tab.active,
.filter.active {
  border-color: var(--primary);
  background: var(--green-soft);
  color: var(--primary-strong);
}

.status-filter {
  display: inline-flex;
  gap: 0.34rem;
  align-items: center;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0.34rem 0.52rem;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.status-filter:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, transparent);
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

.status-filter.active {
  border-color: color-mix(in srgb, var(--primary) 44%, transparent);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary-strong);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 8%, transparent);
}

.status-label {
  flex: 0 0 auto;
}

.status-count {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 1.32rem;
  height: 1.32rem;
  padding-inline: 0.28rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.toolbar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dashboard-filter-toggle {
  display: none;
}

.dashboard-filter-popover {
  display: grid;
  gap: 0.75rem;
}

.dashboard-filter-sheet {
  display: contents;
}

.dashboard-filter-close {
  display: none;
}

.filter-toggle-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.search {
  display: grid;
  gap: 0.25rem;
  max-width: 320px;
}

.sort-field {
  display: grid;
  gap: 0.25rem;
  width: 8.5rem;
}

.dashboard-tools {
  display: grid;
  gap: 0.5rem;
  align-items: end;
}

.box-filter-group {
  display: grid;
  gap: 0.36rem;
  min-width: 0;
}

.box-filter-heading {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
}

.box-filter-heading > span:first-child {
  font-size: 0.82rem;
  font-weight: 800;
}

.box-filter-heading .muted {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.box-filter-list {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
}

.box-filter {
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  min-height: 32px;
  padding: 0.3rem 0.48rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
}

.box-filter-list .box-filter {
  width: 100%;
  justify-content: space-between;
}

.box-filter strong {
  display: inline-grid;
  place-items: center;
  min-width: 1.32rem;
  height: 1.32rem;
  padding-inline: 0.28rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1;
}

.box-filter.active {
  border-color: color-mix(in srgb, var(--primary) 42%, transparent);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary-strong);
}

.storage-filter-groups {
  display: grid;
  gap: 0.38rem;
  min-width: 0;
  width: 100%;
}

.storage-filter-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.storage-filter-group.active {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.storage-filter-group.contains-active:not(.active) {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
}

.storage-filter-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 0.7rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0.52rem 0.56rem;
  cursor: pointer;
  list-style: none;
}

.storage-filter-group summary::-webkit-details-marker {
  display: none;
}

.storage-filter-group summary::after {
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  opacity: 0.7;
  transform: rotate(45deg) translateY(-0.08rem);
  transition: transform 0.14s ease;
}

.storage-filter-group[open] summary::after {
  transform: rotate(225deg) translate(-0.08rem, -0.02rem);
}

.storage-filter-group-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.storage-filter-group-copy strong,
.storage-filter-group-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-filter-group-copy strong {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 820;
}

.storage-filter-group-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 680;
}

.storage-filter-group-select {
  display: inline-flex;
  gap: 0.34rem;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.18rem 0.26rem 0.18rem 0.48rem;
  border-radius: 999px;
  border-color: color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--surface-raised) 62%, transparent);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.storage-filter-group-select strong {
  display: inline-grid;
  place-items: center;
  min-width: 1.34rem;
  height: 1.34rem;
  padding-inline: 0.26rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 11%, transparent);
  color: var(--text);
  font-size: 0.7rem;
  line-height: 1;
}

.storage-filter-group-select.active {
  border-color: color-mix(in srgb, var(--primary) 46%, transparent);
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
  color: var(--primary-strong);
}

.storage-filter-group-select.active strong {
  background: color-mix(in srgb, var(--primary) 28%, transparent);
  color: var(--primary-strong);
}

.storage-filter-group-body {
  display: grid;
  gap: 0.34rem;
  padding: 0 0.44rem 0.44rem;
}

.storage-filter-options {
  display: grid;
  gap: 0.28rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.75rem), 1fr));
  min-width: 0;
  width: 100%;
}

.storage-filter-option {
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.storage-filter-option-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.storage-filter-option-copy span,
.storage-filter-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-filter-option-copy small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 660;
}

.filter-tools {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(7rem, 1fr) 44px;
  gap: 0.52rem;
  align-items: end;
}

.order-tools {
  display: flex;
  gap: 0.52rem;
  flex-wrap: wrap;
  align-items: end;
}

.filter-tools .search {
  max-width: none;
}

.view-toggle {
  display: inline-flex;
  gap: 0.12rem;
  align-items: center;
  height: 44px;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 76%, var(--bg));
}

.view-toggle button {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
}

.view-toggle button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: transparent;
  transition: background 0.15s ease, transform 0.15s ease;
}

.view-toggle button.active {
  border-color: color-mix(in srgb, var(--primary) 44%, transparent);
  color: var(--primary-strong);
}

.view-toggle button.active::before {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
}

.view-toggle button[data-dashboard-mode="cards"].active::before {
  transform: translateX(-1px);
}

.view-toggle button[data-dashboard-mode="compact"].active::before {
  transform: translateX(1px);
}

.layout-icon {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

[data-dashboard-mode="cards"] .layout-icon {
  transform: translateX(-1px);
}

[data-dashboard-mode="compact"] .layout-icon {
  transform: translateX(1px);
}

.sort-direction,
.clear-filters {
  min-height: 44px;
}

.sort-direction,
.clear-filters {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.sort-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.sort-icon-asc {
  display: none;
}

.sort-direction.ascending .sort-icon-desc {
  display: none;
}

.sort-direction.ascending .sort-icon-asc {
  display: block;
}

.clear-filters {
  color: var(--muted);
}

.clear-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.field-hint {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  margin-top: 0.35rem;
}

.field-hint.warning {
  color: var(--red);
}

.batch-notes-label {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.batch-notes-label small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.25;
}

.batch-washing-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.16rem 0.62rem;
  align-items: start;
  padding: 0.62rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 52%, transparent);
}

.batch-washing-toggle input {
  grid-row: 1 / span 2;
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 0.04rem;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--primary);
}

.batch-washing-toggle span {
  color: var(--text);
  font-weight: 760;
}

.batch-washing-toggle small {
  grid-column: 2;
  margin-top: 0;
}

.batch-reference-photo-field {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.batch-reference-photo-field > span {
  display: grid;
  gap: 0.16rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.batch-reference-photo-field > span small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.25;
}

.batch-reference-photo-control {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
}

.batch-reference-photo-preview {
  display: grid;
  place-items: center;
  width: 6rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 62%, var(--bg));
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
}

.batch-reference-photo-preview.has-photo {
  border-style: solid;
}

.batch-reference-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-reference-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.label-with-help {
  display: inline-flex;
  gap: 0.34rem;
  align-items: center;
  max-width: 100%;
  min-width: 0;
}

.help-tip {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.05rem;
  min-width: 1.05rem;
  height: 1.05rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 70%, var(--surface));
  color: var(--muted);
  cursor: help;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  text-transform: none;
}

.help-tip::before,
.help-tip::after {
  position: absolute;
  left: 50%;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.18rem);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.help-tip::before {
  content: "";
  bottom: calc(100% + 0.34rem);
  border-right: 0.34rem solid transparent;
  border-left: 0.34rem solid transparent;
  border-top: 0.34rem solid var(--surface-raised);
  filter: drop-shadow(0 1px 0 var(--line));
}

.help-tip::after {
  content: attr(aria-label);
  bottom: calc(100% + 0.66rem);
  width: max-content;
  max-width: min(280px, calc(100vw - 2rem));
  padding: 0.5rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.32;
  overflow-wrap: break-word;
  text-align: left;
  text-transform: none;
  white-space: normal;
}

.help-tip:hover,
.help-tip:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 46%, var(--line));
  color: var(--primary-strong);
  outline: 0;
}

.help-tip:hover::before,
.help-tip:hover::after,
.help-tip:focus-visible::before,
.help-tip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

#putAwayView .putaway-head .help-tip::before,
#putAwayView .putaway-head .help-tip::after {
  bottom: auto;
  transform: translate(-50%, -0.18rem);
}

#putAwayView .putaway-head .help-tip::before {
  top: calc(100% + 0.34rem);
  border-top: 0;
  border-bottom: 0.34rem solid var(--surface-raised);
  filter: drop-shadow(0 -1px 0 var(--line));
}

#putAwayView .putaway-head .help-tip::after {
  top: calc(100% + 0.66rem);
}

#putAwayView .putaway-head .help-tip:hover::before,
#putAwayView .putaway-head .help-tip:hover::after,
#putAwayView .putaway-head .help-tip:focus-visible::before,
#putAwayView .putaway-head .help-tip:focus-visible::after {
  transform: translate(-50%, 0);
}

.form-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 0.4rem;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0.65rem 0.7rem;
}

select option {
  background: var(--surface);
  color: var(--text);
}

:root[data-theme="dark"] select option {
  background: #f7f8f6;
  color: #17201c;
}

textarea {
  resize: vertical;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.auto-grow-textarea {
  overflow-y: hidden;
}

.copy-field .auto-grow-textarea {
  min-height: calc(2.8em + 1.5rem);
  max-height: 18rem;
}

.description-field .auto-grow-textarea {
  min-height: calc(2.8em + 1.5rem);
  max-height: 30rem;
}

#conditionNotes {
  margin-bottom: 0.22rem;
}

.item-list {
  display: grid;
  gap: 0.85rem;
}

.item-list.empty {
  grid-template-columns: 1fr;
}

.item-list.compact {
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.item-list.compact.empty {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.item-card,
.panel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.item-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
}

.dashboard-empty-state {
  grid-column: 1 / -1;
  justify-items: start;
  gap: 0.5rem;
  min-height: 13rem;
  padding: clamp(1.1rem, 3vw, 1.7rem);
  color: var(--muted);
}

.dashboard-empty-state strong {
  color: var(--text);
  font-size: 1.08rem;
}

.dashboard-empty-state button {
  margin-top: 0.4rem;
}

.dashboard-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.8rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.62rem;
  padding: 0.12rem 0;
}

.pager-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.44rem 0.78rem;
  align-items: center;
}

.pager-summary {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.pager-size {
  display: flex;
  gap: 0.38rem;
  align-items: center;
  width: auto;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.pager-size span {
  font-size: inherit;
}

.pager-size select {
  width: auto;
  min-width: 4.1rem;
  min-height: 32px;
  padding: 0.24rem 1.65rem 0.24rem 0.54rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 750;
}

.pager-controls,
.pager-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  align-items: center;
}

.pager-nav,
.pager-page {
  min-height: 32px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 760;
}

.pager-page {
  min-width: 32px;
  padding-inline: 0.58rem;
}

.pager-page.active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 13%, var(--surface));
  color: var(--primary-strong);
}

.pager-gap {
  min-width: 1.4rem;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.item-card.selected,
.compact-item-row.selected {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

.item-card-body {
  display: grid;
  gap: 0.82rem;
  min-width: 0;
  padding: 0.82rem;
}

.item-card button {
  justify-self: stretch;
}

.item-card-media {
  position: relative;
  min-width: 0;
}

.dashboard-select {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  cursor: pointer;
}

.dashboard-select input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dashboard-select > span {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  border: 1.4px solid color-mix(in srgb, var(--muted) 62%, var(--line));
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 28%, transparent);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-select > span::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 3px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  opacity: 0;
  transform: rotate(42deg);
  transform-origin: center;
}

.dashboard-select input:checked + span {
  border-color: color-mix(in srgb, var(--primary) 82%, #fff);
  background: color-mix(in srgb, var(--primary) 78%, #2b2445);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 24%, transparent),
    0 0 0 2px color-mix(in srgb, var(--primary) 13%, transparent);
}

.dashboard-select input:checked + span::after {
  opacity: 1;
}

.item-card-select {
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  left: 0.5rem;
  border: 1px solid var(--remove-border);
  border-radius: 8px;
  background: var(--remove-bg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.dashboard-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1.92 / 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--thumb-bg);
  box-shadow: none;
}

.dashboard-thumb.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-card-media .badge {
  position: absolute;
  top: 0.58rem;
  right: 0.58rem;
  min-height: 30px;
  padding-inline: 0.62rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.card-head {
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: start;
}

.card-copy {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.card-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.44em;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sku {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.item-price {
  margin-top: 0.32rem;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1;
}

.stock-line {
  color: var(--muted);
  font-size: 0.92rem;
}

.item-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 0.72rem;
  align-items: center;
}

.item-open-button {
  min-height: 46px;
  border-radius: 8px;
  background: #0f8a60;
  border-color: #0f8a60;
  font-weight: 760;
}

.item-open-button:hover {
  background: #0b7551;
  border-color: #0b7551;
}

.item-delete-button {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 0;
  border-color: color-mix(in srgb, var(--red) 24%, var(--line));
  color: #ef4444;
  background: color-mix(in srgb, var(--red-soft) 20%, var(--surface));
}

.item-delete-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.compact-item-row {
  display: grid;
  grid-template-columns: 22px 46px minmax(0, 1fr) 98px 140px 86px 38px;
  gap: 0.68rem;
  align-items: center;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 0.26rem 0.62rem;
}

.compact-item-row.selection-disabled {
  grid-template-columns: 46px minmax(0, 1fr) 98px 140px 86px 38px;
}

.compact-item-row:last-child {
  border-bottom: 0;
}

.compact-thumb {
  display: grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  overflow: hidden;
  border-radius: 7px;
  background: var(--thumb-bg);
}

.compact-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-thumb svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
}

.compact-item-main {
  display: grid;
  gap: 0.16rem;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.compact-item-main:hover {
  border-color: transparent;
  background: transparent;
  color: var(--primary-strong);
}

.compact-title,
.compact-sku {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-title {
  font-size: 0.94rem;
  font-weight: 760;
}

.compact-sku,
.compact-stock {
  color: var(--muted);
  font-size: 0.75rem;
}

.compact-price-editor {
  display: flex;
  gap: 0.16rem;
  align-items: center;
  justify-self: end;
  width: 98px;
  height: 34px;
  min-width: 0;
  margin: 0;
  padding: 0 0.48rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--muted));
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 88%, var(--bg));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 45%, transparent);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.compact-price-editor:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.compact-price-editor span {
  flex: 0 0 auto;
  color: var(--primary-strong);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.compact-price-editor input {
  flex: 1 1 auto;
  width: auto;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  text-align: right;
  font-size: 0.84rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.compact-price-editor input::-webkit-outer-spin-button,
.compact-price-editor input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.compact-price-editor input[type="number"] {
  appearance: textfield;
}

.compact-stock {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-status {
  justify-self: end;
  min-height: 24px;
  padding: 0.16rem 0.46rem;
  font-size: 0.68rem;
}

.compact-delete-button {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-color: transparent;
  color: #ef4444;
  background: transparent;
}

.compact-delete-button:hover {
  border-color: color-mix(in srgb, var(--red) 24%, var(--line));
  background: color-mix(in srgb, var(--red-soft) 20%, var(--surface));
}

.compact-delete-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge.draft,
.badge.ai_generated {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.ready_for_review {
  background: #e7f4ff;
  color: #0b65a3;
  border: 1px solid #b7ddfa;
  box-shadow: 0 0 0 2px rgba(58, 183, 255, 0.08);
}

.badge.approved {
  background: #e6f7f6;
  color: #0f6f74;
  border: 1px solid #aee4df;
  box-shadow: 0 0 0 2px rgba(34, 198, 200, 0.09);
}

.badge.ebay_offer_created {
  background: #fff4db;
  color: #7a4a05;
  border: 1px solid #f1d08b;
  box-shadow: 0 0 0 2px rgba(242, 182, 67, 0.1);
}

.badge.published {
  background: #e7f7ee;
  color: #1f7043;
  border: 1px solid #b5e2c9;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.08);
}

.badge.ended {
  background: #f0f2f5;
  color: #475467;
  border: 1px solid #d0d5dd;
  box-shadow: 0 0 0 2px rgba(71, 84, 103, 0.06);
}

.badge.sold {
  background: color-mix(in srgb, var(--blue-soft) 78%, var(--surface));
  color: var(--blue);
  border: 1px solid color-mix(in srgb, var(--blue) 34%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 8%, transparent);
}

:root[data-theme="dark"] .badge.ready_for_review {
  background: color-mix(in srgb, #3ab7ff 18%, var(--surface));
  color: #7fd2ff;
  border-color: color-mix(in srgb, #3ab7ff 42%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, #3ab7ff 12%, transparent), 0 0 18px color-mix(in srgb, #3ab7ff 16%, transparent);
}

:root[data-theme="dark"] .badge.approved {
  background: color-mix(in srgb, #22c6c8 18%, var(--surface));
  color: #6ee7e8;
  border-color: color-mix(in srgb, #22c6c8 42%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, #22c6c8 12%, transparent), 0 0 18px color-mix(in srgb, #22c6c8 16%, transparent);
}

:root[data-theme="dark"] .badge.ebay_offer_created {
  background: color-mix(in srgb, #f2b643 18%, var(--surface));
  color: #ffd47a;
  border-color: color-mix(in srgb, #f2b643 42%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, #f2b643 12%, transparent), 0 0 18px color-mix(in srgb, #f2b643 16%, transparent);
}

:root[data-theme="dark"] .badge.published {
  background: color-mix(in srgb, #33d17a 18%, var(--surface));
  color: #62e695;
  border-color: color-mix(in srgb, #33d17a 42%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, #33d17a 12%, transparent), 0 0 18px color-mix(in srgb, #33d17a 16%, transparent);
}

:root[data-theme="dark"] .badge.ended {
  background: color-mix(in srgb, #98a2b3 18%, var(--surface));
  color: #cbd5e1;
  border-color: color-mix(in srgb, #98a2b3 42%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, #98a2b3 12%, transparent), 0 0 18px color-mix(in srgb, #98a2b3 12%, transparent);
}

:root[data-theme="dark"] .badge.sold {
  background: color-mix(in srgb, var(--blue) 18%, var(--surface));
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 42%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 12%, transparent), 0 0 18px color-mix(in srgb, var(--blue) 14%, transparent);
}

.badge.needs_attention {
  background: var(--red-soft);
  color: var(--red);
}

.panel {
  padding: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  min-width: 0;
}

.form-grid.nested {
  margin-top: 0.75rem;
}

.form-grid > *,
.field-list > *,
label {
  min-width: 0;
  max-width: 100%;
}

.full {
  grid-column: 1 / -1;
}

.advanced-fields {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  padding: 0.7rem;
  min-width: 0;
}

.advanced-fields summary,
.sanity-query-details summary {
  cursor: pointer;
  color: var(--primary-strong);
  font-weight: 750;
}

.key-specifics-card {
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent 58%),
    var(--panel-soft);
  padding: 0.78rem;
  display: grid;
  gap: 0.72rem;
}

.key-specifics-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.key-specifics-head p {
  margin: 0.18rem 0 0;
}

.key-specifics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.62rem;
}

.key-specifics-grid label {
  display: grid;
  gap: 0.28rem;
}

.new-storage-grid,
.storage-create-row,
.putaway-controls,
.putaway-item-actions,
.container-row-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  align-items: end;
  min-width: 0;
}

.storage-create-row button,
.new-storage-grid button,
.putaway-item-actions button,
.stored-item-actions button,
.container-row-actions button {
  min-height: 42px;
}

.new-storage-grid {
  grid-template-columns: minmax(0, 1fr) auto;
}

.new-container-select-shell {
  position: relative;
  min-width: 0;
}

.new-container-select-shell::after {
  content: "";
  position: absolute;
  right: 0.92rem;
  top: 50%;
  width: 0.48rem;
  height: 0.48rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  pointer-events: none;
  transform: translateY(-68%) rotate(45deg);
}

#newContainer {
  appearance: none;
  padding-right: 2.65rem;
}

#newCreateContainer {
  align-self: end;
  width: auto;
  min-width: 64px;
  min-height: 42px;
  padding-inline: 0.8rem;
}

.putaway-layout {
  display: grid;
  gap: 1rem;
}

.putaway-head,
.putaway-panel,
.putaway-item,
.container-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.putaway-head,
.putaway-panel {
  padding: 1rem;
}

.putaway-head {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(300px, 420px);
  column-gap: 0.75rem;
  row-gap: 0.72rem;
  align-items: center;
}

.putaway-controls {
  display: flex;
  gap: 0.48rem;
  justify-content: flex-end;
}

.putaway-refresh-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 8px;
}

.putaway-refresh-button.is-loading svg {
  animation: putaway-refresh-spin 0.8s linear infinite;
}

@keyframes putaway-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.putaway-guide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  padding-top: 0.68rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.putaway-guide div {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.putaway-guide strong {
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 850;
}

.putaway-guide span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.putaway-scan-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.putaway-scan-panel p {
  grid-column: 1 / -1;
  margin: 0;
}

.putaway-scan-panel p:empty {
  display: none;
}

.putaway-list,
.container-manager {
  display: grid;
  gap: 0.7rem;
}

#containerManager {
  gap: 0;
}

.putaway-stored-panel {
  display: block;
}

.putaway-stored-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.putaway-stored-summary::-webkit-details-marker {
  display: none;
}

.putaway-stored-summary span {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.putaway-stored-summary strong {
  color: var(--primary-strong);
  font-size: 1rem;
}

.putaway-stored-summary::after {
  content: "View";
  min-width: 4.6rem;
  padding: 0.52rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary-strong);
  font-weight: 800;
  text-align: center;
}

.putaway-stored-panel[open] .putaway-stored-summary {
  margin-bottom: 0.7rem;
}

.putaway-stored-panel[open] .putaway-stored-summary::after {
  content: "Hide";
}

.putaway-item,
.container-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.85rem;
  align-items: center;
}

.putaway-item-main,
.container-row-main {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.putaway-item.is-busy {
  opacity: 0.72;
}

.putaway-item.scanned {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 28%, transparent);
}

.putaway-item-actions {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  align-items: end;
}

.stored-item-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 0.55rem;
  align-items: end;
}

.putaway-item-actions .putaway-picker {
  grid-column: span 2;
}

.putaway-picker {
  position: relative;
  display: grid;
  gap: 0.34rem;
  min-width: 0;
}

.putaway-picker-control {
  display: grid;
  grid-template-columns: minmax(118px, 0.48fr) minmax(150px, 1fr);
  gap: 0.45rem;
  align-items: end;
  min-width: 0;
}

.putaway-picker-search {
  display: grid;
  gap: 0.26rem;
  min-width: 0;
}

.putaway-picker-search span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.putaway-picker-search input {
  min-height: 40px;
}

.putaway-picker-current {
  display: grid;
  align-content: center;
  gap: 0.04rem;
  width: 100%;
  min-height: 40px;
  padding: 0.38rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 56%, var(--surface));
  color: var(--primary-strong);
  font-size: 0.78rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: left;
}

.putaway-picker-current:hover {
  border-color: var(--primary);
}

.putaway-picker-current span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.putaway-picker-current .help-tip {
  width: 0.95rem;
  min-width: 0.95rem;
  height: 0.95rem;
  font-size: 0.58rem;
  line-height: 1;
  text-transform: none;
}

.putaway-picker-current strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.putaway-picker-groups {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  display: none;
  gap: 0.42rem;
  max-height: min(280px, 56vh);
  overflow: auto;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.putaway-picker.open .putaway-picker-groups,
.putaway-picker:focus-within .putaway-picker-groups {
  display: grid;
}

.putaway-picker:not(.has-query) [data-put-away-search-results],
.putaway-picker.has-query .putaway-picker-group:not([data-put-away-search-results]) {
  display: none;
}

.putaway-picker-group {
  display: grid;
  gap: 0.3rem;
}

.putaway-picker-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.putaway-picker-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.putaway-container-choice {
  display: grid;
  gap: 0.1rem;
  width: auto;
  min-height: 44px;
  max-width: 100%;
  padding: 0.42rem 0.55rem;
  text-align: left;
}

.putaway-container-choice strong,
.putaway-container-choice span {
  overflow-wrap: anywhere;
}

.putaway-container-choice span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.putaway-container-choice.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary-strong);
}

.putaway-container-dialog {
  align-items: center;
  justify-items: end;
  padding: 0.8rem;
}

.app-modal-sheet.putaway-container-sheet {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(100%, 420px);
  min-height: 0;
  max-height: min(680px, calc(100dvh - 1.6rem));
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.putaway-container-head {
  align-items: center;
  padding: 1rem 1rem 0.88rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.putaway-container-head > div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.putaway-container-head .muted {
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.putaway-container-head h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.15;
}

.putaway-container-form {
  display: grid;
  align-content: start;
  gap: 0.82rem;
  overflow: auto;
  padding: 1rem;
}

.putaway-container-form label:not(.checkbox-row) {
  display: grid;
  gap: 0.32rem;
}

.putaway-container-form label span {
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.putaway-container-form input,
.putaway-container-form select {
  min-height: 44px;
  background: color-mix(in srgb, var(--surface-raised) 58%, var(--surface));
}

.putaway-container-form input[readonly] {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
  color: var(--primary-strong);
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.putaway-container-form .checkbox-row {
  display: flex;
  min-height: 46px;
  padding: 0.64rem 0.72rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 55%, var(--surface));
}

.putaway-container-form .checkbox-row[hidden] {
  display: none;
}

.putaway-container-form .checkbox-row input {
  accent-color: var(--primary);
}

.putaway-container-form .checkbox-row span {
  color: var(--primary-strong);
  font-size: 0.86rem;
  font-weight: 780;
}

.putaway-container-form .help-tip,
.container-row-actions .help-tip {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
  text-transform: none;
}

.putaway-container-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.25rem;
  padding-top: 0.82rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 0%, transparent),
    var(--surface) 18%
  );
}

.putaway-container-actions button {
  min-height: 46px;
}

.putaway-eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.putaway-item-main span,
.putaway-item-main small,
.container-row-main span,
.container-row-main small {
  color: var(--muted);
}

.container-row.dirty {
  box-shadow: inset 3px 0 0 var(--primary);
}

.container-row-dirty-note:not([hidden]) {
  color: var(--primary-strong);
  font-weight: 750;
}

@media (min-width: 980px) {
  .putaway-item-actions {
    grid-template-columns: minmax(520px, 1fr) repeat(2, minmax(128px, 150px));
  }

  .putaway-item-actions .putaway-picker {
    grid-column: auto;
  }

  .container-row-actions {
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.9fr) repeat(2, minmax(128px, 1fr));
  }
}

@media (max-width: 1180px) and (min-width: 721px) {
  .putaway-item,
  .container-row {
    grid-template-columns: minmax(200px, 0.5fr) minmax(0, 1fr);
  }

  .putaway-item-actions {
    grid-template-columns: minmax(0, 1fr) minmax(128px, 160px);
  }

  .putaway-item-actions .putaway-picker {
    grid-column: 1 / -1;
  }

  .container-row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .putaway-head,
  .putaway-item,
  .container-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .putaway-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .putaway-item-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .putaway-guide {
    grid-template-columns: minmax(0, 1fr);
  }

  .putaway-item-actions .putaway-picker {
    grid-column: auto;
  }

  .putaway-picker-control {
    grid-template-columns: minmax(0, 1fr);
  }

  .putaway-picker-groups {
    position: static;
    max-height: 240px;
  }

  .putaway-container-dialog {
    align-items: end;
    padding: 0.64rem;
  }

  .app-modal-sheet.putaway-container-sheet {
    width: 100%;
    min-height: auto;
    max-height: min(620px, calc(100dvh - 1.28rem));
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .putaway-container-head {
    padding: 0.92rem 0.92rem 0.78rem;
  }

  .putaway-container-form {
    gap: 0.72rem;
    padding: 0.88rem;
  }
}

#putAwayView {
  --putaway-panel-bg: color-mix(in srgb, var(--surface) 88%, var(--bg));
  --putaway-table-bg: color-mix(in srgb, var(--surface-raised) 44%, var(--surface));
  --putaway-row-hover: color-mix(in srgb, var(--primary) 7%, transparent);
  --storage-filter-height: 42px;
  --storage-filter-gap: 0.72rem;
  --storage-filter-table-gap: 0.78rem;
}

#putAwayView .putaway-layout {
  gap: 0.78rem;
}

#putAwayView .putaway-head {
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 240px) minmax(360px, 420px);
  padding: 0;
  border: 0;
  background: transparent;
}

.putaway-title-block {
  display: grid;
  gap: 0.25rem;
}

.putaway-title-block h2,
.putaway-panel-title h3 {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0;
}

.putaway-title-block h2 {
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.05;
}

.putaway-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.18rem 0.48rem;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary) 17%, var(--surface));
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1;
}

#putAwayView .putaway-panel {
  overflow: visible;
  padding: 0.82rem;
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-raised) 38%, transparent), transparent 28rem),
    var(--putaway-panel-bg);
}

.putaway-panel-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto) auto;
  gap: 0.72rem;
  align-items: center;
  margin-bottom: 0.82rem;
  min-width: 0;
}

.putaway-panel-title {
  min-width: 0;
}

.putaway-panel-title h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.putaway-storage-controls {
  display: flex;
  gap: 0.52rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
}

.putaway-storage-search,
.putaway-storage-filter {
  display: inline-grid;
  grid-template-columns: auto minmax(150px, 178px);
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}

.putaway-storage-search {
  grid-template-columns: auto minmax(190px, 260px);
}

.putaway-storage-search span,
.putaway-storage-filter span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.putaway-storage-search input,
.putaway-storage-filter select {
  min-height: 34px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-raised) 48%, var(--surface));
  font-size: 0.82rem;
  padding-block: 0.42rem;
}

.putaway-filter-disabled-note {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 720;
}

.putaway-hide-sold {
  display: inline-flex;
  gap: 0.42rem;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.36rem 0.62rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-raised) 46%, var(--surface));
  color: var(--text);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 780;
  white-space: nowrap;
}

.putaway-hide-sold:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}

.putaway-hide-sold input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: var(--primary);
}

.putaway-panel-actions {
  display: flex;
  gap: 0.52rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.putaway-panel-actions span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  white-space: nowrap;
}

#putAwaySelectedSummary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}

.putaway-panel-actions button,
.putaway-bulk-strip button,
.putaway-row-actions button,
#putAwayCreateContainer,
#storageLocationAdd {
  min-height: 34px;
  padding: 0.42rem 0.82rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 780;
}

.storage-location-panel {
  padding-bottom: 0.66rem;
}

.putaway-storage-management-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 0.78rem;
  align-items: stretch;
}

.putaway-storage-management-row > .putaway-panel {
  min-width: 0;
  height: 100%;
}

.storage-location-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.container-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.container-toolbar #putAwayCreateContainer {
  justify-self: end;
}

.storage-location-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--storage-filter-gap);
  align-items: center;
  min-height: var(--storage-filter-height);
  margin-bottom: var(--storage-filter-table-gap);
}

.storage-location-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}

.storage-location-search span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.storage-location-search input {
  height: var(--storage-filter-height);
  min-height: var(--storage-filter-height);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-raised) 48%, var(--surface));
  font-size: 0.82rem;
}

.storage-location-table-shell {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: var(--putaway-table-bg);
}

.storage-location-table {
  display: grid;
}

.storage-location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.3rem 6.8rem;
  gap: 0.52rem;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.72rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 64%, transparent);
}

.storage-location-row:last-child {
  border-bottom: 0;
}

.storage-location-header {
  display: grid;
  min-height: 38px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.storage-location-header span:nth-child(2),
.storage-location-header span:nth-child(3) {
  justify-self: end;
}

.storage-location-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-location-count {
  justify-self: end;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.storage-location-action {
  display: flex;
  gap: 0.38rem;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
}

.storage-location-action button {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 32px;
  padding: 0.32rem 0.58rem;
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 840;
}

.storage-location-action button:hover,
.storage-location-action button:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.storage-location-action [data-storage-location-edit] {
  min-width: 61px;
}

.storage-location-action .storage-location-delete-icon {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
}

.storage-location-action button.danger {
  border-color: color-mix(in srgb, var(--dashboard-danger) 88%, transparent);
  background: transparent;
  color: var(--dashboard-danger);
}

.storage-location-action button.danger:hover,
.storage-location-action button.danger:focus-visible {
  border-color: var(--dashboard-danger);
  background: color-mix(in srgb, var(--dashboard-danger) 10%, transparent);
  color: color-mix(in srgb, var(--dashboard-danger) 86%, white);
}

.storage-location-row.editing {
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.storage-location-row.system {
  background: color-mix(in srgb, var(--surface-raised) 24%, transparent);
}

.storage-location-empty {
  grid-template-columns: minmax(0, 1fr);
}

.storage-location-row input {
  width: 100%;
  min-height: 36px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-raised) 54%, var(--surface));
  font-size: 0.92rem;
}

#putAwayView .putaway-controls,
#putAwayView .putaway-scan-panel {
  align-items: end;
}

#putAwayView .putaway-scan-panel {
  grid-template-columns: minmax(0, 1fr) auto;
}

#putAwayView .putaway-scan-field input {
  min-height: 42px;
}

.putaway-table-shell {
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: var(--putaway-table-bg);
}

.putaway-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
  font-size: 0.84rem;
}

.putaway-items-table {
  min-width: 1290px;
  table-layout: fixed;
}

.putaway-containers-table {
  min-width: 1120px;
}

.putaway-col-check {
  width: 2.4rem;
}

.putaway-col-listing-price {
  width: 89px;
}

.putaway-col-sold-price {
  width: 94px;
}

.putaway-col-status {
  width: 79.2px;
}

.putaway-col-zone {
  width: 119px;
}

.putaway-col-container {
  width: 173.8px;
}

.putaway-col-home {
  width: 93.6px;
}

.putaway-col-date {
  width: 126.5px;
}

.putaway-col-actions {
  width: 154px;
}

.putaway-table th,
.putaway-table td {
  padding: 0.48rem 0.66rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 64%, transparent);
  text-align: left;
  vertical-align: middle;
}

.putaway-table.putaway-items-table td {
  padding-top: 0.24rem;
  padding-bottom: 0.24rem;
}

.putaway-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.putaway-table th[aria-sort] {
  padding: 0;
}

.putaway-sort-heading {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.34rem;
  width: 100%;
  min-height: 2.28rem;
  padding: 0.48rem 0.66rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  white-space: nowrap;
}

.putaway-sort-heading:hover,
.putaway-sort-heading:focus-visible,
.putaway-sort-heading.active {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--text);
}

.putaway-sort-heading:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 72%, transparent);
  outline-offset: -2px;
}

.putaway-sort-arrow {
  position: relative;
  display: inline-block;
  flex: 0 0 10px;
  width: 10px;
  height: 12px;
  color: currentColor;
}

.putaway-sort-arrow::before,
.putaway-sort-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.28;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.putaway-sort-arrow::before {
  top: 1px;
  border-bottom: 5px solid currentColor;
}

.putaway-sort-arrow::after {
  bottom: 1px;
  border-top: 5px solid currentColor;
}

.putaway-sort-heading.active .putaway-sort-arrow {
  color: var(--primary-strong);
}

.putaway-sort-heading.active[data-sort-direction="asc"] .putaway-sort-arrow::before,
.putaway-sort-heading.active[data-sort-direction="desc"] .putaway-sort-arrow::after {
  opacity: 0.95;
}

.putaway-sort-heading.active[data-sort-direction="asc"] .putaway-sort-arrow::after,
.putaway-sort-heading.active[data-sort-direction="desc"] .putaway-sort-arrow::before {
  opacity: 0.14;
}

.putaway-table tbody tr:last-child td {
  border-bottom: 0;
}

.putaway-table tbody tr:hover {
  background: var(--putaway-row-hover);
}

.putaway-table .putaway-item,
.putaway-table .container-row {
  display: table-row;
  padding: 0;
  border: 0;
  background: transparent;
}

.putaway-table .putaway-item.scanned {
  box-shadow: inset 3px 0 0 var(--primary);
}

.putaway-table .putaway-item:not(.stored-item) td:first-child {
  box-shadow: inset 3px 0 0 var(--dashboard-danger);
}

.putaway-table .putaway-item:not(.stored-item) td {
  background: color-mix(in srgb, var(--dashboard-danger) 8%, transparent);
  border-bottom-color: color-mix(in srgb, var(--dashboard-danger) 18%, var(--line));
}

.putaway-table tbody tr.putaway-item:not(.stored-item):hover td {
  background: color-mix(in srgb, var(--dashboard-danger) 12%, transparent);
}

.putaway-table .stored-item td {
  background: color-mix(in srgb, var(--blue-soft) 46%, transparent);
  border-bottom-color: color-mix(in srgb, var(--blue) 20%, var(--line));
}

.putaway-table .stored-item td:first-child {
  box-shadow: inset 3px 0 0 var(--blue);
}

.putaway-table tbody tr.stored-item:hover td {
  background: color-mix(in srgb, var(--blue-soft) 68%, transparent);
}

.putaway-check-cell {
  width: 2.4rem;
  text-align: center;
}

.putaway-check-cell input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
}

.putaway-item-cell {
  min-width: 220px;
}

.putaway-item-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.56rem;
  align-items: center;
  min-width: 0;
}

.putaway-item-summary-button {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.putaway-item-summary-button:hover {
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.putaway-item-summary-button:disabled {
  cursor: not-allowed;
}

.putaway-item-thumb {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 72%, var(--bg));
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

.putaway-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.putaway-item-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.putaway-price-cell {
  min-width: 94px;
  white-space: nowrap;
}

.putaway-listing-price-cell {
  width: 89px;
  min-width: 89px;
}

.putaway-date-cell {
  min-width: 92px;
  white-space: nowrap;
}

.putaway-price-cell span {
  color: var(--text);
  font-weight: 780;
}

.putaway-price-cell.muted-price span {
  color: var(--muted);
  font-weight: 720;
}

.putaway-zone-cell {
  width: 119px;
  min-width: 119px;
}

.putaway-zone-select {
  min-width: 112px;
  min-height: 34px;
  padding: 0.38rem 0.58rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 780;
}

.putaway-item-cell strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.22;
}

.putaway-item-cell small {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.putaway-type-pill {
  display: inline-flex;
  gap: 0.42rem;
  align-items: center;
  color: var(--muted);
  font-weight: 720;
}

.putaway-type-pill span {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.putaway-type-pill.stored {
  color: var(--blue);
  font-weight: 820;
}

.putaway-type-pill.stored span {
  background: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent);
}

.putaway-storage-state {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.16rem 0.45rem;
  border: 1px solid color-mix(in srgb, var(--blue) 36%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue-soft) 82%, var(--surface));
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 820;
}

.putaway-status-cell {
  width: 72px;
  min-width: 72px;
  white-space: nowrap;
}

.putaway-storage-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.48rem;
  padding: 0.12rem 0.42rem;
  border: 1px solid color-mix(in srgb, var(--blue) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue-soft) 74%, var(--surface));
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 840;
  line-height: 1;
}

.putaway-storage-status.unstored {
  border-color: color-mix(in srgb, var(--red) 34%, transparent);
  background: color-mix(in srgb, var(--red-soft) 82%, var(--surface));
  color: var(--red);
}

.putaway-picker-table-cell {
  width: 158px;
  min-width: 158px;
}

.putaway-home-cell {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.putaway-home-cell .putaway-sort-heading {
  padding-right: 0.48rem;
  padding-left: 0.48rem;
}

.putaway-listing-price-cell .putaway-sort-heading,
.putaway-home-cell .putaway-sort-heading {
  line-height: 1.05;
  white-space: normal;
}

.putaway-listing-price-cell .putaway-sort-heading span:first-child,
.putaway-home-cell .putaway-sort-heading span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.putaway-picker-table-cell > small {
  display: none;
}

.putaway-picker-compact .putaway-picker-control {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.putaway-picker-compact .putaway-picker-groups {
  position: fixed;
  z-index: 90;
  top: var(--putaway-picker-top, 0);
  right: auto;
  left: var(--putaway-picker-left, 0);
  width: var(--putaway-picker-width, min(420px, calc(100vw - 1rem)));
  max-height: var(--putaway-picker-max-height, min(300px, 56vh));
}

.putaway-picker-compact .putaway-picker-groups .putaway-picker-search {
  margin-bottom: 0.16rem;
}

.putaway-picker-compact .putaway-picker-current,
.putaway-picker-compact .putaway-picker-search input,
.putaway-table-input,
.putaway-status-select,
.putaway-container-tools input,
.putaway-container-tools select {
  min-height: 34px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface-raised) 48%, var(--surface));
  font-size: 0.82rem;
}

.putaway-picker-compact .putaway-picker-current {
  position: relative;
  padding: 0.36rem 1.9rem 0.36rem 0.58rem;
}

.putaway-picker-compact .putaway-picker-current::after {
  content: "v";
  position: absolute;
  right: 0.7rem;
  top: 50%;
  color: var(--muted);
  font-size: 0.72rem;
  transform: translateY(-50%);
}

.putaway-picker-compact .putaway-picker-current strong {
  font-size: 0.82rem;
}

.putaway-picker-compact .putaway-picker-search input {
  padding-left: 0.7rem;
}

.putaway-table td.putaway-row-actions {
  white-space: nowrap;
}

.putaway-row-actions-inner {
  position: relative;
  display: inline-flex;
  gap: 0.44rem;
  align-items: center;
  justify-content: flex-end;
}

.putaway-row-primary {
  min-width: 82px;
}

.putaway-icon-action {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  padding-right: 0;
  padding-left: 0;
}

.putaway-action-menu {
  position: relative;
  display: inline-grid;
}

.putaway-action-menu.open .putaway-icon-action {
  border-color: color-mix(in srgb, var(--primary) 56%, var(--line));
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary-strong);
}

.putaway-action-menu-panel {
  position: fixed;
  z-index: 60;
  display: grid;
  width: min(230px, 80vw);
  padding: 0.35rem;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-raised));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
}

.putaway-action-menu-panel[hidden] {
  display: none;
}

.putaway-action-menu-panel button {
  display: grid;
  gap: 0.12rem;
  justify-items: start;
  min-height: 44px;
  padding: 0.5rem 0.58rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.putaway-action-menu-panel button:hover,
.putaway-action-menu-panel button:focus-visible {
  background: color-mix(in srgb, var(--primary) 9%, var(--surface-raised));
}

.putaway-action-menu-panel button:disabled {
  color: var(--muted);
  opacity: 0.64;
}

.putaway-action-menu-panel .danger-menu-action {
  color: var(--dashboard-danger);
}

.putaway-action-menu-panel .danger-menu-action:hover,
.putaway-action-menu-panel .danger-menu-action:focus-visible {
  background: color-mix(in srgb, var(--dashboard-danger) 9%, var(--surface-raised));
}

.putaway-action-menu-panel button span {
  font-size: 0.86rem;
  font-weight: 820;
}

.putaway-action-menu-panel button small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  white-space: normal;
}

.putaway-table-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.44rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.putaway-page-size {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

.putaway-page-size strong {
  min-width: 2.2rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  text-align: center;
}

.putaway-bulk-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 0.8fr) auto auto auto;
  gap: 0.72rem;
  align-items: center;
  margin-top: 0.78rem;
  padding: 0.7rem 0.82rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 38%, var(--surface));
}

.putaway-bulk-status {
  color: var(--text);
  font-weight: 760;
}

.putaway-bulk-container {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 0.58rem;
  align-items: center;
}

.putaway-bulk-container span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 780;
}

.putaway-bulk-container select {
  min-height: 36px;
}

.putaway-container-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.3fr) minmax(150px, 0.3fr) auto;
  gap: var(--storage-filter-gap);
  align-items: center;
  min-height: var(--storage-filter-height);
  margin-bottom: var(--storage-filter-table-gap);
}

.putaway-container-tools button {
  height: var(--storage-filter-height);
  min-height: var(--storage-filter-height);
  border-radius: 6px;
}

.putaway-container-tools input,
.putaway-container-tools select {
  height: var(--storage-filter-height);
  min-height: var(--storage-filter-height);
}

.putaway-table-input {
  min-width: 170px;
}

.putaway-home-cell {
  min-width: 250px;
}

.putaway-containers-table .putaway-item-cell {
  min-width: 124px;
}

.putaway-containers-table .putaway-home-cell {
  min-width: 145px;
}

.putaway-containers-table .putaway-table-input {
  min-width: 123px;
  width: 100%;
}

.putaway-containers-table .putaway-status-select {
  min-width: 106px;
}

.putaway-containers-table th:nth-child(8),
.putaway-containers-table td:nth-child(8) {
  min-width: 132px;
}

.putaway-containers-table .putaway-row-actions {
  padding-right: 0.42rem;
  padding-left: 0.42rem;
  white-space: nowrap;
}

.container-row-actions-inner {
  gap: 0.28rem;
  justify-content: flex-start;
}

.putaway-row-actions .container-table-icon-action,
.storage-location-action .storage-location-delete-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  line-height: 1;
}

.putaway-row-actions .container-label-action {
  width: 54px;
  min-width: 54px;
  height: 32px;
  min-height: 32px;
  padding: 0 0.42rem;
}

.putaway-row-actions .container-table-icon-action svg,
.storage-location-action .storage-location-delete-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  pointer-events: none;
}

.putaway-row-actions .container-table-icon-action:not(.danger) {
  border-color: color-mix(in srgb, var(--line) 92%, transparent);
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  color: var(--text);
}

.putaway-row-actions .container-table-icon-action:not(.danger):hover,
.putaway-row-actions .container-table-icon-action:not(.danger):focus-visible {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.putaway-row-actions .container-table-icon-action.danger,
.storage-location-action .storage-location-delete-icon.danger {
  border-color: color-mix(in srgb, var(--dashboard-danger) 88%, transparent);
  background: transparent;
  color: var(--dashboard-danger);
}

.putaway-row-actions .container-table-icon-action.danger:hover,
.putaway-row-actions .container-table-icon-action.danger:focus-visible,
.storage-location-action .storage-location-delete-icon.danger:hover,
.storage-location-action .storage-location-delete-icon.danger:focus-visible {
  border-color: var(--dashboard-danger);
  background: color-mix(in srgb, var(--dashboard-danger) 10%, transparent);
  color: color-mix(in srgb, var(--dashboard-danger) 86%, white);
}

.putaway-row-actions .container-table-icon-action.danger svg,
.storage-location-action .storage-location-delete-icon.danger svg {
  width: 18px;
  height: 18px;
}

.putaway-container-contents-cell {
  min-width: 210px;
}

.container-contents-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.58rem;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0.32rem 0.44rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 42%, var(--surface));
  color: var(--text);
  text-align: left;
}

.container-contents-toggle:hover {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.container-contents-toggle[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
  background: color-mix(in srgb, var(--primary) 11%, var(--surface));
}

.container-content-thumbs {
  display: inline-flex;
  align-items: center;
  min-width: 82px;
  padding-left: 0.12rem;
}

.container-content-thumb {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: -0.16rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 78%, var(--bg));
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
}

.container-content-thumb:first-child {
  margin-left: 0;
}

.container-content-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.container-content-thumb.more {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary-strong);
}

.container-contents-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.container-contents-copy strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 840;
  line-height: 1.16;
}

.container-contents-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-contents-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.container-row.contents-open td {
  border-bottom-color: transparent;
}

.container-contents-row td {
  padding: 0 0.66rem 0.66rem;
  background: color-mix(in srgb, var(--surface-raised) 28%, var(--putaway-table-bg));
}

.container-contents-panel {
  display: grid;
  gap: 0.65rem;
  padding: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
}

.container-contents-panel-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.container-contents-panel-head > div {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.container-contents-panel-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-contents-panel-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.container-contents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 0.56rem;
}

.container-content-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 0.58rem;
  align-items: center;
  min-width: 0;
  padding: 0.52rem;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 42%, var(--surface));
}

.container-content-card .container-content-thumb {
  width: 46px;
  height: 46px;
  margin-left: 0;
}

.container-content-card > div {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.container-content-card strong,
.container-content-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-content-card strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 820;
}

.container-content-card small {
  color: var(--muted);
  font-size: 0.7rem;
}

.container-content-card button {
  min-height: 32px;
  padding: 0.34rem 0.58rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 780;
}

.putaway-status-select {
  min-width: 118px;
}

.container-row.dirty {
  box-shadow: inset 3px 0 0 var(--primary);
}

.putaway-stored-panel {
  padding: 0.78rem 0.95rem;
}

@media (max-width: 1180px) {
  #putAwayView .putaway-head {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .putaway-storage-management-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #putAwayView .putaway-scan-panel {
    grid-column: 1 / -1;
  }

  .putaway-bulk-strip {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr);
  }

  .putaway-bulk-strip .putaway-icon-action {
    justify-self: end;
  }
}

@media (max-width: 720px) {
  #putAwayView .putaway-head,
  .putaway-panel-toolbar,
  .putaway-storage-controls,
  .putaway-panel-actions,
  .putaway-container-tools,
  .putaway-bulk-strip,
  .putaway-bulk-container,
  .storage-location-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .putaway-panel-toolbar,
  .putaway-storage-controls,
  .putaway-panel-actions {
    display: grid;
    justify-items: stretch;
  }

  .putaway-storage-search,
  .putaway-storage-filter,
  .storage-location-search {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .putaway-hide-sold {
    justify-content: flex-start;
  }

  .putaway-panel-actions button,
  .putaway-bulk-strip button {
    width: 100%;
  }

  .storage-location-header {
    display: none;
  }

  .storage-location-row {
    gap: 0.36rem;
    align-items: start;
  }

  .storage-location-row:not(.editing):not(.system) .storage-location-count::after {
    content: " containers";
  }

  .storage-location-action {
    flex-direction: column;
    justify-self: stretch;
  }

  .storage-location-action button {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    background: color-mix(in srgb, var(--surface-raised) 44%, var(--surface));
  }

  .putaway-table {
    min-width: 980px;
  }

  .putaway-items-table {
    min-width: 1220px;
  }

  .putaway-table-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--thumb-bg);
}

.reorderable-photo-grid {
  align-items: start;
  gap: 0.68rem;
}

.uploaded-photo {
  position: relative;
  min-width: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--thumb-bg);
  cursor: grab;
  box-shadow: 0 6px 16px rgba(8, 15, 12, 0.14);
}

.uploaded-photo:active {
  cursor: grabbing;
}

.uploaded-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  cursor: zoom-in;
}

.uploaded-photo::before,
.uploaded-photo::after {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
}

.uploaded-photo::before {
  top: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(4, 8, 6, 0.64), rgba(4, 8, 6, 0));
}

.uploaded-photo::after {
  bottom: 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(4, 8, 6, 0.68), rgba(4, 8, 6, 0));
}

.uploaded-photo.dragging {
  opacity: 0.55;
}

.uploaded-photo.drop-target {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.photo-order {
  position: absolute;
  top: 0.42rem;
  left: 0.42rem;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(4, 8, 6, 0.7);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.uploaded-photo-remove {
  position: absolute;
  top: 0.42rem;
  right: 0.42rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(4, 8, 6, 0.7);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.uploaded-photo-remove::before,
.uploaded-photo-remove::after {
  position: absolute;
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.uploaded-photo-remove::before {
  transform: rotate(45deg);
}

.uploaded-photo-remove::after {
  transform: rotate(-45deg);
}

.uploaded-photo-remove:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(161, 58, 53, 0.88);
  color: #fff;
}

.photo-move-actions {
  position: absolute;
  left: 0.42rem;
  right: 0.42rem;
  bottom: 0.42rem;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.photo-move-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 34px;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(4, 8, 6, 0.72);
  color: #fff;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.photo-move-button::before {
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  content: "";
}

.photo-move-button.previous::before {
  transform: translateX(2px) rotate(45deg);
}

.photo-move-button.next::before {
  transform: translateX(-2px) rotate(225deg);
}

.photo-move-button:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(31, 111, 91, 0.9);
  color: #fff;
}

.photo-move-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.photo-uploader {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.photo-action {
  display: inline-grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0.65rem 0.75rem;
  text-align: center;
  cursor: pointer;
}

.photo-action:hover {
  border-color: var(--primary);
}

.photo-action span {
  color: inherit;
  font-size: 0.95rem;
  font-weight: 750;
}

.photo-action.busy {
  cursor: wait;
  opacity: 0.58;
  pointer-events: none;
}

.photo-status {
  margin: 0;
  font-size: 0.9rem;
}

.pending-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.pending-photo-grid[hidden] {
  display: none;
}

.pending-photo {
  position: relative;
  min-width: 0;
}

.pending-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--thumb-bg);
}

.pending-photo-remove {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--remove-border);
  background: var(--remove-bg);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1;
}

.pending-photo-remove:hover {
  border-color: var(--red);
  color: var(--red);
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.add-item-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 0.85rem;
  align-items: start;
  width: min(100%, 1080px);
  margin: 0 auto;
}

.add-item-photos,
.add-item-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.add-item-photos,
.add-item-details {
  display: grid;
  gap: 0.85rem;
  padding: 0.92rem;
}

.add-item-section-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.add-item-section-head h2 {
  margin-bottom: 0.18rem;
  font-size: 1.05rem;
}

.new-photo-drop-zone {
  display: grid;
  place-items: center;
  gap: 0.32rem;
  min-height: 220px;
  padding: 1rem;
  border: 1.5px dashed color-mix(in srgb, var(--primary) 42%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 7%, transparent), transparent),
    color-mix(in srgb, var(--surface-raised) 74%, var(--surface));
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.new-photo-drop-zone:hover,
.new-photo-drop-zone:focus-visible,
.new-photo-drop-zone.drag-over {
  border-color: var(--primary);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 13%, transparent), transparent),
    color-mix(in srgb, var(--surface-raised) 86%, var(--surface));
}

.new-photo-drop-zone.drag-over {
  transform: translateY(-1px);
}

.drop-zone-icon {
  width: 42px;
  height: 42px;
  padding: 0.52rem;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary-strong);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.new-photo-drop-zone strong {
  font-size: 1.08rem;
  line-height: 1.2;
}

.new-photo-drop-zone span {
  max-width: 24rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.36;
}

.new-photo-source-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.new-photo-source-row .photo-action {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
}

.new-photo-source-row .photo-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.add-item-details {
  grid-template-columns: 1fr;
}

.new-inventory-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 0.65rem;
}

.quick-approval-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
  min-height: 48px;
  padding: 0.68rem 0.78rem;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 56%, transparent);
  cursor: pointer;
}

.quick-approval-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.quick-approval-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.quick-approval-copy strong {
  color: var(--text);
  font-size: 0.92rem;
}

.quick-approval-copy small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.add-item-save-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin: 0.1rem -0.92rem -0.92rem;
  padding: 0.62rem 0.92rem 0.72rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 0 0 8px 8px;
  background: color-mix(in srgb, var(--surface-raised) 64%, transparent);
}

.save-flow-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.save-flow-copy strong {
  font-size: 0.9rem;
}

.save-flow-copy span {
  display: none;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.add-item-save-actions {
  display: flex;
  gap: 0.52rem;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.add-item-save-actions button {
  min-width: 112px;
}

.batch-view {
  position: fixed;
  top: var(--batch-viewport-top, 0);
  left: var(--batch-viewport-left, 0);
  width: var(--batch-viewport-width, 100vw);
  height: var(--batch-viewport-height, 100dvh);
  z-index: 40;
  overflow: hidden;
  background: #08080c;
  color: #fff;
}

body[data-view="valuation"] {
  overflow: hidden;
  background: #101418;
}

body[data-view="valuation"] .topbar {
  display: none;
}

body[data-view="valuation"] main {
  width: 100%;
  max-width: none;
  height: var(--batch-viewport-height, 100dvh);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.batch-view button {
  letter-spacing: 0;
}

.batch-camera-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #08080c;
}

.batch-camera-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #08080c;
}

.batch-camera-frame {
  --batch-camera-frame-height: min(100dvh, calc(100vw * 1.333333));
  --batch-camera-frame-lift: min(55px, max(0px, calc((100dvh - var(--batch-camera-frame-height)) * 0.204)));
  position: relative;
  width: min(100vw, calc(100dvh * 0.75));
  height: var(--batch-camera-frame-height);
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #050508;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 22px 72px rgba(0, 0, 0, 0.38);
  transform: translateY(calc(-1 * var(--batch-camera-frame-lift)));
}

.batch-camera-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  pointer-events: none;
}

.batch-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #08080c;
  transform: scale(var(--batch-camera-zoom, 1));
  transform-origin: center center;
}

.batch-rule-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent calc(33.333% - 0.5px), rgba(255, 255, 255, 0.46) calc(33.333% - 0.5px), rgba(255, 255, 255, 0.46) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
    linear-gradient(to right, transparent calc(66.666% - 0.5px), rgba(255, 255, 255, 0.46) calc(66.666% - 0.5px), rgba(255, 255, 255, 0.46) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.333% - 0.5px), rgba(255, 255, 255, 0.46) calc(33.333% - 0.5px), rgba(255, 255, 255, 0.46) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.666% - 0.5px), rgba(255, 255, 255, 0.46) calc(66.666% - 0.5px), rgba(255, 255, 255, 0.46) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px));
  opacity: 0.78;
}

.valuation-view {
  position: fixed;
  top: var(--batch-viewport-top, 0);
  left: var(--batch-viewport-left, 0);
  width: var(--batch-viewport-width, 100vw);
  height: var(--batch-viewport-height, 100dvh);
  z-index: 45;
  margin: 0;
  overflow: hidden;
  background: #101418;
}

.valuation-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #101418;
  color: #fff;
}

.valuation-camera-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #111827;
}

.valuation-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #101418;
}

.valuation-camera-fallback {
  width: min(360px, calc(100vw - 32px));
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.valuation-camera-fallback[hidden] {
  display: none;
}

.valuation-camera-fallback h2 {
  margin: 0 0 8px;
  color: #fff;
}

.valuation-camera-fallback .muted {
  color: rgba(255, 255, 255, 0.72);
}

.valuation-busy-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: rgba(10, 14, 18, 0.58);
  backdrop-filter: blur(3px);
  z-index: 3;
}

.valuation-busy-overlay[hidden] {
  display: none;
}

.valuation-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: putaway-refresh-spin 0.9s linear infinite;
}

.valuation-top-bar {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 14px;
  right: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.valuation-top-bar > div {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
}

.valuation-top-bar span {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.7);
}

.valuation-top-bar strong {
  font-size: 1rem;
}

.valuation-top-bar button {
  pointer-events: auto;
}

.valuation-shell.result-mode .valuation-top-bar,
.valuation-shell.result-mode .valuation-bottom-dock {
  display: none;
}

.valuation-bottom-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 14px));
  z-index: 4;
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 0 14px;
  pointer-events: none;
}

.valuation-status {
  max-width: min(560px, calc(100vw - 28px));
  margin: 0;
  padding: 9px 13px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(8px);
  text-align: center;
}

.valuation-status.error-text {
  color: #fecaca;
}

.valuation-controls {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) 76px minmax(92px, 1fr);
  align-items: center;
  gap: 14px;
  width: min(440px, calc(100vw - 28px));
  pointer-events: auto;
}

.valuation-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  cursor: pointer;
}

.valuation-file-button.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.valuation-shutter {
  width: 76px;
  height: 76px;
}

.valuation-result {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: auto;
  padding: max(16px, calc(env(safe-area-inset-top) + 12px)) 14px max(104px, calc(env(safe-area-inset-bottom) + 96px));
  background: rgba(246, 248, 250, 0.98);
  color: var(--text);
}

:root[data-theme="dark"] .valuation-result {
  background: rgba(16, 16, 22, 0.98);
}

.valuation-result[hidden] {
  display: none;
}

.valuation-result-sheet {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  width: min(920px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  color: inherit;
}

:root[data-theme="dark"] .valuation-result-sheet {
  background: transparent;
  color: inherit;
}

.valuation-result-sheet.empty {
  align-items: center;
}

.valuation-result-sheet.no-preview {
  grid-template-columns: minmax(0, 1fr);
}

.valuation-preview-image {
  width: clamp(72px, 16vw, 118px);
  height: clamp(72px, 16vw, 118px);
  object-fit: cover;
  border-radius: 8px;
  background: #111827;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.valuation-result-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.valuation-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.valuation-result-copy h2,
.valuation-result-sheet.empty h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.valuation-facts {
  margin: 0;
  color: var(--muted);
}

.valuation-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.valuation-price-tile {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.valuation-price-tile span {
  font-size: 0.78rem;
  color: var(--muted);
}

.valuation-price-tile strong {
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.valuation-price-tile.primary {
  border-color: rgba(31, 111, 91, 0.34);
  background: rgba(31, 111, 91, 0.1);
}

.valuation-confidence-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.valuation-evidence-note {
  margin: 0;
}

.valuation-warnings {
  margin: 0;
}

.valuation-comparables summary {
  cursor: pointer;
  font-weight: 700;
}

.valuation-result-actions {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(14px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  width: min(920px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 248, 250, 0.92);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

:root[data-theme="dark"] .valuation-result-actions {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(16, 16, 22, 0.92);
}

.valuation-result-actions button {
  min-width: 118px;
}

@media (max-width: 720px) {
  body[data-view="valuation"] {
    position: fixed;
    inset: 0;
    width: 100%;
  }

  .valuation-result {
    padding: max(14px, calc(env(safe-area-inset-top) + 10px)) 12px max(104px, calc(env(safe-area-inset-bottom) + 96px));
  }

  .valuation-result-sheet {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }

  .valuation-preview-image {
    width: 72px;
    height: 72px;
  }

  .valuation-price-grid {
    grid-template-columns: 1fr;
  }

  .valuation-result-actions {
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 10px));
    width: calc(100vw - 24px);
    justify-content: stretch;
  }

  .valuation-result-actions button {
    flex: 1 1 0;
    min-width: 0;
  }

  .valuation-controls {
    grid-template-columns: minmax(78px, 1fr) 72px minmax(78px, 1fr);
    gap: 10px;
  }
}

.batch-camera-shell.drawer-open .batch-camera-stage,
.batch-camera-shell.drawer-open .batch-status-pill,
.batch-camera-shell.drawer-open .batch-camera-lens-control,
.batch-camera-shell.drawer-open .batch-bottom-dock {
  filter: blur(12px);
}

.batch-camera-shell.drawer-open .batch-camera-lens-control {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.batch-camera-shell.drawer-open .batch-exit {
  position: relative;
  z-index: 7;
}

.batch-camera-fallback {
  position: absolute;
  inset: 1rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(12, 12, 18, 0.88);
  text-align: center;
}

.batch-camera-fallback[hidden] {
  display: none;
}

.batch-top-bar,
.batch-camera-lens-control,
.batch-bottom-dock,
.batch-capture-drawer {
  position: absolute;
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 2;
}

.batch-top-bar {
  top: max(0.75rem, env(safe-area-inset-top));
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
  pointer-events: none;
}

.batch-top-bar > * {
  pointer-events: auto;
}

.batch-camera-lens-control {
  top: auto;
  left: 50%;
  right: auto;
  z-index: 4;
  display: inline-grid;
  grid-template-columns: minmax(0, auto);
  justify-items: center;
  gap: 0.28rem;
  width: max-content;
  max-width: calc(100vw - 1.5rem);
  bottom: calc(max(0.9rem, env(safe-area-inset-bottom)) + 10.1rem);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  transform: translateX(-50%);
  pointer-events: auto;
}

.batch-camera-lens-control[hidden] {
  display: none;
}

.batch-camera-zoom-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.06rem;
  min-height: 38px;
  padding: 0.19rem;
  border-radius: 999px;
  background: rgba(34, 34, 38, 0.86);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.batch-camera-device-rail {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.08rem;
  max-width: min(20rem, calc(100vw - 1.5rem));
  min-height: 30px;
  padding: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
  background: rgba(12, 12, 16, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.batch-camera-device-rail::-webkit-scrollbar {
  display: none;
}

.batch-camera-device-rail[hidden] {
  display: none;
}

.batch-camera-zoom-button {
  display: grid;
  place-items: center;
  min-width: 35px;
  height: 32px;
  min-height: 32px;
  padding: 0 0.5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  box-shadow: none;
  backdrop-filter: none;
}

.batch-camera-device-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 32px;
  height: 25px;
  min-height: 25px;
  padding: 0 0.38rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  box-shadow: none;
}

.batch-camera-zoom-button.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.batch-camera-device-button.active {
  background: rgba(130, 216, 189, 0.18);
  color: #d7ffea;
  box-shadow: inset 0 0 0 1px rgba(130, 216, 189, 0.18);
}

.batch-camera-zoom-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.batch-camera-device-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.batch-camera-lens-control small {
  display: none;
  max-width: min(16rem, calc(100vw - 2rem));
  padding: 0.26rem 0.56rem;
  border-radius: 999px;
  background: rgba(74, 32, 34, 0.72);
  color: #ffcdc8;
  font-size: 0.72rem;
  font-weight: 780;
  text-align: center;
  backdrop-filter: blur(12px);
}

.batch-camera-lens-control small.warning {
  display: block;
  color: #ffcdc8;
}

.batch-camera-lens-control small.info {
  display: block;
  background: rgba(16, 18, 24, 0.72);
  color: rgba(255, 255, 255, 0.86);
}

.batch-status-pill {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  flex: 1 1 auto;
  gap: 0.78rem;
  align-items: center;
  max-width: min(86vw, 640px);
  min-width: 0;
  min-height: 44px;
  padding: 0.42rem 0.48rem 0.42rem 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.72);
  color: #fff;
  text-align: left;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.batch-status-pill:hover {
  border-color: rgba(190, 160, 255, 0.68);
  background: rgba(20, 18, 30, 0.86);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24), 0 0 0 3px rgba(139, 99, 255, 0.14);
  transform: translateY(-1px);
}

.batch-status-pill:focus-visible {
  outline: 2px solid rgba(210, 195, 255, 0.92);
  outline-offset: 3px;
}

.batch-status-pill.needs-storage {
  border-color: rgba(255, 180, 173, 0.46);
  background: rgba(74, 32, 34, 0.62);
}

.batch-status-pill:disabled {
  opacity: 0.76;
  cursor: default;
  transform: none;
}

.batch-status-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.batch-status-kicker {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.batch-status-pill strong,
.batch-hud-batch {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-status-pill strong {
  font-size: 0.96rem;
  line-height: 1.08;
}

.batch-status-action {
  display: inline-flex;
  gap: 0.22rem;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding-inline: 0.56rem 0.42rem;
  border: 1px solid rgba(190, 160, 255, 0.32);
  border-radius: 999px;
  background: rgba(116, 84, 204, 0.24);
  color: #ded2ff;
  font-size: 0.72rem;
  font-weight: 860;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.batch-status-action svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.batch-status-pill:hover .batch-status-action {
  border-color: rgba(213, 198, 255, 0.52);
  background: rgba(139, 99, 255, 0.36);
  color: #fff;
}

.ebay-find-links {
  align-items: center;
  margin-top: 0.85rem;
}

.ebay-find-hint {
  font-size: 0.88rem;
}

.ebay-api-offer-note {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--amber) 34%, var(--line));
  border-left-width: 3px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber) 10%, var(--surface));
  padding: 0.75rem 0.85rem;
}

.ebay-api-offer-note span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.google-link {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  padding-inline: 0;
}

.batch-hud-batch {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 760;
}

.batch-hud-batch[hidden] {
  display: none;
}

.batch-exit,
.batch-secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(10, 10, 16, 0.68);
  color: #fff;
  backdrop-filter: blur(14px);
}

.batch-exit {
  min-height: 44px;
  border-radius: 999px;
  padding-inline: 0.82rem;
  font-weight: 820;
}

.batch-drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(14px);
}

.batch-drawer-backdrop[hidden],
.batch-capture-drawer[hidden] {
  display: none;
}

.batch-capture-drawer {
  top: calc(max(0.75rem, env(safe-area-inset-top)) + 3.55rem);
  right: auto;
  z-index: 3;
  display: grid;
  gap: 0.62rem;
  width: min(calc(100vw - 1.5rem), 560px);
  max-height: calc(100dvh - 8.75rem);
  overflow: auto;
  padding: 0.66rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(12, 14, 20, 0.82);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
  transform: none;
}

.batch-capture-drawer.setup-mode,
.batch-capture-drawer.warning-mode {
  top: 50%;
  left: 50%;
  right: auto;
  width: min(calc(100vw - 1.5rem), 620px);
  max-height: min(calc(100dvh - 2rem), 760px);
  gap: 1.18rem;
  padding: 1.42rem;
  transform: translate(-50%, -50%);
}

.batch-capture-drawer.warning-mode {
  border-color: rgba(255, 180, 173, 0.36);
}

.batch-capture-drawer.setup-mode .batch-drawer-close,
.batch-capture-drawer.warning-mode .batch-drawer-close {
  display: none;
}

.batch-drawer-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.batch-drawer-head div {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.batch-drawer-head span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.batch-drawer-head strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-capture-drawer.setup-mode .batch-drawer-head,
.batch-capture-drawer.warning-mode .batch-drawer-head {
  display: block;
}

.batch-capture-drawer.setup-mode .batch-drawer-head div,
.batch-capture-drawer.warning-mode .batch-drawer-head div {
  gap: 0.72rem;
}

.batch-capture-drawer.setup-mode .batch-drawer-head strong,
.batch-capture-drawer.warning-mode .batch-drawer-head strong {
  white-space: normal;
}

.batch-drawer-close {
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.batch-drawer-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.batch-drawer-close:disabled {
  opacity: 0.42;
  cursor: default;
}

.batch-storage-guard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 180, 173, 0.28);
  border-radius: 14px;
  background: rgba(74, 32, 34, 0.54);
}

.batch-storage-guard[hidden] {
  display: none;
}

.batch-storage-guard-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: rgba(255, 135, 135, 0.22);
  color: #ff9a9a;
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1;
}

.batch-storage-guard-copy {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.batch-storage-guard strong {
  color: #fff;
  font-size: 0.94rem;
}

.batch-storage-guard span {
  color: rgba(255, 226, 223, 0.84);
  font-size: 0.84rem;
  line-height: 1.35;
  text-transform: none;
}

.batch-inventory-card {
  display: grid;
  grid-template-areas:
    "field action"
    "hint hint";
  grid-template-columns: minmax(0, 4fr) minmax(4rem, 1fr);
  column-gap: 0.7rem;
  row-gap: 0.5rem;
  align-items: end;
}

.batch-inventory-card > label,
.batch-picker-field {
  grid-area: field;
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.batch-inventory-card > button {
  grid-area: action;
}

.batch-approval-card {
  grid-template-areas: none;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 0.78rem 0.86rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.batch-approval-card input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: #82d8bd;
}

.batch-approval-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.batch-approval-copy strong {
  color: #fff;
  font-size: 0.9rem;
}

.batch-approval-copy small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  line-height: 1.28;
}

.compact-select {
  justify-self: start;
  width: 22px;
  height: 22px;
}

.batch-container-field {
  min-width: 0;
}

.batch-purchase-field {
  min-width: 0;
}

.batch-lens-field {
  min-width: 0;
}

.batch-inventory-card span {
  color: rgba(255, 255, 255, 0.72);
}

.batch-container-picker {
  position: relative;
  min-width: 0;
}

.batch-container-current {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0.52rem 2.45rem 0.52rem 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: left;
}

.batch-container-current::after {
  content: "";
  position: absolute;
  right: 0.92rem;
  top: 50%;
  width: 0.48rem;
  height: 0.48rem;
  border-right: 2px solid rgba(255, 255, 255, 0.72);
  border-bottom: 2px solid rgba(255, 255, 255, 0.72);
  pointer-events: none;
  transform: translateY(-68%) rotate(45deg);
}

.batch-container-current span {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.batch-container-current strong,
.batch-container-current small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-container-current strong {
  color: #fff;
  font-size: 0.95rem;
}

.batch-container-current small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.74rem;
  font-weight: 720;
}

.batch-container-current svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.batch-container-current:disabled {
  opacity: 0.68;
  cursor: default;
}

.batch-container-picker-sheet {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  padding: max(0.8rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.9rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: rgba(5, 6, 10, 0.96);
}

.batch-container-picker-sheet[hidden] {
  display: none;
}

.batch-container-picker-sheet-inner {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.82rem;
  min-height: 0;
}

.batch-container-picker-sheet-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
}

.batch-container-picker-sheet-head div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.batch-container-picker-sheet-head span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.batch-container-picker-sheet-head strong {
  color: #fff;
  font-size: 1.22rem;
}

.batch-container-picker-close {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.batch-container-picker-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.batch-container-search {
  display: grid;
  gap: 0.28rem;
}

.batch-container-search input {
  min-height: 40px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.batch-container-picker-sheet-body {
  display: grid;
  align-content: start;
  gap: 0.78rem;
  min-height: 0;
  overflow: auto;
  padding: 0 0.1rem 0.45rem;
}

.batch-container-quick-picks,
.batch-container-browse {
  display: grid;
  gap: 0.5rem;
}

.batch-container-quick-picks {
  padding: 0.62rem;
  border: 1px solid rgba(190, 160, 255, 0.28);
  border-radius: 13px;
  background: rgba(139, 99, 255, 0.1);
}

.batch-container-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: end;
  min-width: 0;
}

.batch-container-section-head span {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 860;
  text-transform: uppercase;
}

.batch-container-section-head small {
  min-width: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 720;
  text-align: right;
}

.batch-container-picker-group {
  display: grid;
  gap: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.batch-container-picker-group summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1rem;
  gap: 0.5rem;
  align-items: center;
  min-height: 42px;
  padding: 0.58rem 0.68rem;
  cursor: pointer;
  list-style: none;
}

.batch-container-picker-group summary::-webkit-details-marker {
  display: none;
}

.batch-container-picker-group summary::after {
  content: "v";
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  transform: rotate(-90deg);
}

.batch-container-picker-group[open] summary::after {
  transform: rotate(0deg);
}

.batch-container-picker-group summary span {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-container-picker-group summary small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 760;
  white-space: nowrap;
}

.batch-container-picker-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 0.42rem;
}

.batch-container-picker-group .batch-container-picker-options {
  padding: 0 0.58rem 0.58rem;
}

.batch-container-picker-options.quick {
  grid-template-columns: repeat(auto-fit, minmax(134px, 1fr));
}

.batch-container-choice {
  display: grid;
  gap: 0.16rem;
  min-height: 50px;
  padding: 0.5rem 0.58rem;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: left;
}

.batch-container-choice.compact {
  min-height: 54px;
  border-color: rgba(190, 160, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
}

.batch-container-choice:hover,
.batch-container-choice:focus-visible {
  border-color: rgba(190, 160, 255, 0.7);
  background: rgba(139, 99, 255, 0.16);
}

.batch-container-choice.selected {
  border-color: rgba(190, 160, 255, 0.82);
  background: rgba(139, 99, 255, 0.24);
}

.batch-container-choice strong,
.batch-container-choice span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.batch-container-choice strong {
  color: #fff;
  font-size: 0.88rem;
}

.batch-container-choice span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  line-height: 1.25;
}

.batch-container-no-matches {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
  font-weight: 720;
}

.batch-storage-hint {
  grid-area: hint;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  line-height: 1.35;
}

.batch-storage-hint.warning {
  color: #ffcdc8;
}

.batch-storage-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  padding-top: 0.55rem;
}

.batch-storage-actions[hidden] {
  display: none;
}

.batch-storage-actions button {
  min-height: 45px;
  font-weight: 820;
}

.batch-inventory-card input,
.batch-inventory-card select {
  min-height: 40px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.batch-capture-drawer.setup-mode .batch-inventory-card select,
.batch-capture-drawer.warning-mode .batch-inventory-card select,
.batch-capture-drawer.setup-mode .batch-container-current,
.batch-capture-drawer.warning-mode .batch-container-current,
.batch-capture-drawer.setup-mode .batch-create-container,
.batch-capture-drawer.warning-mode .batch-create-container,
.batch-capture-drawer.setup-mode .batch-create-purchase,
.batch-capture-drawer.warning-mode .batch-create-purchase {
  min-height: 56px;
}

.batch-inventory-card input:disabled,
.batch-inventory-card select:disabled {
  opacity: 0.68;
}

.batch-create-container,
.batch-create-purchase {
  align-self: end;
  min-height: 40px;
  white-space: nowrap;
  width: 100%;
}

.batch-container-card {
  padding-bottom: 1.18rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.batch-bottom-dock {
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
  --batch-float-bottom: max(0.9rem, env(safe-area-inset-bottom));
}

.batch-status-row {
  position: absolute;
  left: 50%;
  bottom: calc(var(--batch-float-bottom) + 5.8rem);
  display: flex;
  justify-content: center;
  gap: 0.42rem;
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 760;
  transform: translateX(-50%);
  pointer-events: auto;
}

.batch-status-row span {
  min-height: 26px;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 12, 18, 0.58);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  white-space: nowrap;
}

.batch-status-row .batch-timer {
  min-width: 4.1rem;
  text-align: center;
  border-color: rgba(134, 239, 172, 0.32);
  background: rgba(12, 50, 38, 0.68);
  color: #d7ffea;
  font-variant-numeric: tabular-nums;
}

.batch-retry {
  min-height: 28px;
  padding: 0.18rem 0.48rem;
  border-color: rgba(255, 180, 173, 0.42);
  background: rgba(90, 25, 25, 0.72);
  color: #ffddd9;
  font-size: 0.78rem;
  font-weight: 820;
}

.batch-retry[hidden] {
  display: none;
}

.batch-thumb-strip {
  position: absolute;
  left: 50%;
  bottom: calc(var(--batch-float-bottom) + 12.2rem);
  display: flex;
  gap: 0.38rem;
  width: max-content;
  max-width: min(calc(100vw - 1.5rem), 540px);
  min-height: 60px;
  padding: 0.28rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(10, 12, 18, 0.46);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.batch-thumb-strip[hidden] {
  display: none;
}

.batch-thumb {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  cursor: zoom-in;
}

.batch-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
}

.batch-thumb span {
  position: absolute;
  left: 0.25rem;
  top: 0.25rem;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.72);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 850;
}

.batch-thumb button {
  position: absolute;
  top: -0.12rem;
  right: -0.12rem;
  display: grid;
  place-items: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(10, 10, 16, 0.88);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 850;
}

.batch-status {
  position: absolute;
  left: 50%;
  bottom: calc(var(--batch-float-bottom) + 16.4rem);
  width: max-content;
  max-width: min(calc(100vw - 1.5rem), 520px);
  min-height: 1.15rem;
  margin: 0;
  padding: 0.34rem 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.5);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  text-align: center;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  pointer-events: none;
  white-space: nowrap;
}

.batch-status.error-text {
  background: rgba(90, 25, 25, 0.76);
  border-color: rgba(255, 180, 173, 0.34);
  color: #ffb4ad;
}

.batch-controls {
  position: absolute;
  left: 50%;
  bottom: var(--batch-float-bottom);
  display: grid;
  grid-template-columns: minmax(5.6rem, 1fr) 82px minmax(6.5rem, 1fr);
  gap: 0.62rem;
  align-items: center;
  width: min(calc(100vw - 1.5rem), 460px);
  transform: translateX(-50%);
  pointer-events: none;
}

.batch-controls > * {
  pointer-events: auto;
}

.batch-shutter {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  min-height: 82px;
  padding: 0;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.batch-shutter::before {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #fff;
  transition: transform 120ms ease;
}

.batch-shutter.ready:active::before {
  transform: scale(0.88);
}

.batch-next {
  min-height: 48px;
  font-weight: 850;
}

.batch-secondary {
  min-height: 48px;
  font-weight: 760;
}

.batch-controls .batch-next,
.batch-controls .batch-secondary {
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.batch-inventory-card .batch-secondary {
  min-height: 40px;
}

.batch-intake-review {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  align-items: end;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: rgba(5, 7, 10, 0.58);
  backdrop-filter: blur(8px);
}

.batch-intake-review[hidden] {
  display: none;
}

.batch-intake-sheet {
  display: grid;
  gap: 0.78rem;
  width: min(100%, 720px);
  max-height: min(82dvh, 760px);
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.82rem 0.82rem 0;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.batch-intake-head {
  display: flex;
  gap: 0.75rem;
  align-items: start;
  justify-content: space-between;
}

.batch-intake-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.42rem;
  align-items: center;
  justify-content: flex-end;
}

.batch-review-timer {
  display: inline-grid;
  place-items: center;
  min-width: 3.3rem;
  min-height: 29px;
  padding: 0.29rem 0.46rem;
  border: 1px solid rgba(134, 239, 172, 0.32);
  border-radius: 999px;
  background: rgba(12, 50, 38, 0.68);
  color: #d7ffea;
  font-size: 0.69rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.batch-intake-head h2 {
  font-size: 1.02rem;
}

.batch-intake-kicker {
  margin-bottom: 0.18rem;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 820;
}

.batch-intake-leave {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.42rem 0.62rem;
  color: var(--muted);
}

.batch-intake-error {
  padding: 0.45rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--red) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--red-soft) 48%, var(--surface));
  color: var(--red);
  font-size: 0.84rem;
}

.batch-intake-photos {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74px;
  gap: 0.48rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.batch-intake-photos img {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--thumb-bg);
}

.batch-intake-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
}

.batch-intake-fields label,
.batch-refinement-notes,
.batch-size-control {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}

.batch-refinement-notes > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.batch-refinement-notes textarea {
  min-height: 4.4rem;
  resize: vertical;
}

.batch-size-control {
  grid-column: 1 / -1;
}

.batch-size-control > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.batch-size-chip-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.3rem;
}

.batch-size-chip-row button {
  min-height: 34px;
  padding: 0.32rem 0.18rem;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 760;
}

.batch-size-chip-row button.active {
  border-color: var(--primary);
  background: var(--green-soft);
  color: var(--primary-strong);
}

.batch-sku-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.56rem;
  padding: 0.56rem 0.64rem;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--green-soft) 58%, var(--surface));
}

.batch-sku-preview > div {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
}

.batch-sku-preview span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.batch-sku-preview strong {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
}

.batch-sku-refresh {
  flex: 0 0 auto;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--primary-strong);
}

.batch-sku-refresh.is-loading svg {
  animation: putaway-refresh-spin 0.82s linear infinite;
}

.batch-intake-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr) minmax(0, 1.16fr);
  gap: 0.48rem;
  margin: 0 -0.82rem;
  padding: 0.58rem 0.82rem 0.82rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.batch-intake-actions button {
  min-height: 42px;
  padding-inline: 0.52rem;
  font-size: 0.88rem;
  font-weight: 760;
}

.batch-photo-preview {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(8px);
}

.batch-photo-preview[hidden] {
  display: none;
}

.batch-preview-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  color: #fff;
  font-weight: 850;
}

.batch-preview-top button {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(20, 20, 28, 0.86);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 850;
}

.batch-photo-preview img {
  align-self: center;
  justify-self: center;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.batch-preview-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.batch-preview-controls button {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(20, 20, 28, 0.88);
  color: #fff;
  font-weight: 780;
}

.detail-layout {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.detail-layout > * {
  min-width: 0;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.detail-ebay-rail {
  display: grid;
  gap: 1rem;
  align-self: start;
}

.detail-ebay-sidebar {
  align-self: start;
}

.detail-sidebar-header {
  display: grid;
  gap: 0.75rem;
}

.detail-title-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.detail-title-row > div {
  min-width: 0;
}

.detail-title-row h2 {
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.detail-title-row .sku {
  padding-top: 0.4rem;
}

.detail-title-row .badge {
  flex: 0 0 auto;
}

.detail-action-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
}

.detail-action-bar.two-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-action-bar.four-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-action-bar button {
  width: 100%;
  min-height: 44px;
  padding: 0.48rem 0.34rem;
  font-size: 0.86rem;
  line-height: 1.16;
  text-align: center;
  white-space: nowrap;
}

.detail-approval-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
}

.detail-approval-actions.approved {
  grid-template-columns: 1fr;
}

.detail-approval-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-raised));
  color: var(--primary-strong);
  font-size: 0.84rem;
  font-weight: 820;
}

.detail-approval-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: 100%;
  min-height: 44px;
  padding: 0.48rem 0.34rem;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.16;
  text-align: center;
  white-space: normal;
}

.detail-approval-actions button.primary {
  color: #fff;
}

.detail-approval-actions .listing-queue-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.detail-approval-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.32;
}

.print-label-status {
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.print-label-status.printed {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  color: var(--primary-strong);
}

.print-label-status.failed {
  border-color: color-mix(in srgb, var(--red) 48%, var(--line));
  color: var(--red);
}

.sidebar-photo-panel {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.sidebar-photo-panel.empty {
  display: grid;
  place-items: center;
  min-height: 9rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--thumb-bg);
}

.sidebar-photo-panel.empty .sidebar-add-photo-tile {
  width: min(100%, 7.5rem);
}

.sidebar-photo-grid {
  display: grid;
  gap: 0.5rem;
}

.sidebar-photo-button {
  display: block;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
}

.sidebar-uploaded-photo {
  box-shadow: none;
}

.sidebar-uploaded-photo.lead {
  aspect-ratio: 4 / 3;
}

.sidebar-uploaded-photo .sidebar-photo-button {
  height: 100%;
}

.sidebar-uploaded-photo .sidebar-photo-button img {
  height: 100%;
}

.sidebar-uploaded-photo .photo-order {
  display: none;
}

.sidebar-uploaded-photo .uploaded-photo-remove {
  top: 0.24rem;
  right: 0.24rem;
  width: 22px;
  height: 22px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(4, 8, 6, 0.58);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.sidebar-uploaded-photo .uploaded-photo-remove::before,
.sidebar-uploaded-photo .uploaded-photo-remove::after {
  width: 10px;
  height: 1.5px;
}

.sidebar-uploaded-photo .photo-move-actions {
  left: 0.24rem;
  right: 0.24rem;
  bottom: 0.24rem;
  gap: 0.24rem;
}

.sidebar-uploaded-photo .photo-move-button {
  height: 22px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(4, 8, 6, 0.58);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.sidebar-uploaded-photo .photo-move-button::before {
  width: 7px;
  height: 7px;
  border-width: 0 0 1.5px 1.5px;
}

.sidebar-uploaded-photo.lead .photo-move-button {
  justify-self: center;
  width: min(100%, 86px);
  height: 34px;
}

.sidebar-uploaded-photo.lead .photo-move-button::before {
  width: 9px;
  height: 9px;
  border-width: 0 0 2px 2px;
}

.sidebar-add-photo-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 1px dashed color-mix(in srgb, var(--primary) 54%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: var(--primary-strong);
  padding: 0;
}

.sidebar-add-photo-tile:hover,
.sidebar-add-photo-tile:focus-visible,
.sidebar-add-photo-tile.drag-over {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent);
}

.sidebar-add-photo-tile span {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
}

.sidebar-add-photo-tile span::before,
.sidebar-add-photo-tile span::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.sidebar-add-photo-tile span::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.sidebar-add-photo-tile.busy {
  cursor: wait;
  opacity: 0.58;
}

.sidebar-photo-button:hover {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sidebar-photo-lead,
.sidebar-photo-button img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--thumb-bg);
  object-fit: cover;
}

.sidebar-photo-lead {
  aspect-ratio: 4 / 3;
}

.sidebar-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.5rem, 4rem));
  justify-content: start;
  gap: 0.5rem;
}

.sidebar-photo-strip .sidebar-photo-button {
  aspect-ratio: 1 / 1;
}

.sidebar-photo-strip img {
  aspect-ratio: 1 / 1;
  height: 100%;
}

.sidebar-photo-more {
  display: none;
}

.detail-photo-source-dialog {
  z-index: 86;
}

.detail-photo-source-sheet {
  width: min(100%, 360px);
}

.detail-photo-source-head {
  align-items: center;
}

.detail-photo-source-options {
  display: grid;
  gap: 0.5rem;
}

.detail-photo-source-option {
  display: grid;
  place-items: center;
  min-height: 54px;
  font-weight: 800;
}

.detail-photo-preview {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(3.4rem, 0.12fr) minmax(0, 1fr) minmax(3.4rem, 0.12fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.7rem;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: rgba(5, 5, 8, 0.94);
  backdrop-filter: blur(8px);
}

.detail-photo-preview[hidden] {
  display: none;
}

.detail-preview-top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  color: #fff;
  font-weight: 850;
}

.detail-preview-top button,
.detail-preview-nav {
  display: grid;
  place-items: center;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(20, 20, 28, 0.86);
  color: #fff;
}

.detail-preview-top button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 999px;
  padding: 0;
  font-size: 1.1rem;
  font-weight: 850;
}

.detail-photo-preview img {
  grid-column: 2;
  align-self: center;
  justify-self: center;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.detail-preview-nav {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 52px;
  min-width: 52px;
  height: 72px;
  min-height: 72px;
  padding: 0;
  border-radius: 999px;
}

.detail-preview-nav::before {
  width: 15px;
  height: 15px;
  border: solid currentColor;
  border-width: 0 0 3px 3px;
  content: "";
}

.detail-preview-nav.previous {
  grid-column: 1;
}

.detail-preview-nav.previous::before {
  transform: translateX(3px) rotate(45deg);
}

.detail-preview-nav.next {
  grid-column: 3;
}

.detail-preview-nav.next::before {
  transform: translateX(-3px) rotate(225deg);
}

.panel.listing-workspace {
  display: flex;
  flex-direction: column;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.listing-head-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.section-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  min-width: 0;
}

.section-head.compact {
  align-items: start;
  margin-bottom: 0.7rem;
}

.field-list {
  display: grid;
  gap: 0.7rem;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.32rem;
  align-items: end;
  margin-top: 0.7rem;
  margin-bottom: -1px;
}

.flow-step {
  position: relative;
  border: 1px solid var(--line);
  border-bottom-color: var(--line);
  border-radius: 9px 9px 0 0;
  background: var(--surface-raised);
  color: var(--muted);
  width: 100%;
  min-height: 46px;
  padding: 0.62rem 0.65rem;
  display: grid;
  place-items: center;
  font-size: 0.92rem;
  font-weight: 850;
  text-align: center;
  box-shadow: none;
}

.flow-step.done {
  border-color: var(--line);
  background: var(--green-soft);
  color: var(--primary-strong);
}

.flow-step.active {
  z-index: 1;
  border-color: var(--primary);
  border-bottom-color: var(--surface-raised);
  background: var(--surface-raised);
  color: var(--primary-strong);
  min-height: 52px;
  box-shadow: none;
}

.flow-step.pending {
  background: var(--surface);
}

.flow-step:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.step-content {
  position: relative;
  flex: 1 1 auto;
  border: 1px solid var(--line);
  border-radius: 0 0 9px 9px;
  background: var(--surface-raised);
  padding: 0.85rem;
  min-width: 0;
}

.step-content.no-flow-steps {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.flow-steps:has(.flow-step.active) + .step-content {
  border-top-color: var(--primary);
}

.step-content:has(.listing-review-card) {
  flex: 0 0 auto;
}

.workflow-card {
  display: grid;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 0.95rem;
  background: var(--surface-raised);
  min-width: 0;
}

.workflow-card h3 {
  margin-bottom: 0.25rem;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.step-content > .workflow-card.listing-review-card,
.step-content > .context-block {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 0;
}

.context-block,
.price-basis,
.similar-block {
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: var(--surface-raised);
  min-width: 0;
}

.final-review-stack {
  display: grid;
  gap: 0.85rem;
}

.final-review-notes {
  gap: 0.72rem;
  margin-bottom: 0;
  padding: 0.9rem 1.1rem;
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green-soft) 48%, transparent), transparent 46%),
    var(--surface-raised);
}

.similar-block {
  gap: 0.6rem;
  padding: 0.72rem 0.8rem;
  border-color: color-mix(in srgb, var(--blue) 24%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue-soft) 30%, transparent), transparent 42%),
    var(--surface-raised);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 8%, transparent);
}

.final-review-notes .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.8rem;
  margin-bottom: 0;
}

.final-review-notes summary {
  cursor: pointer;
  list-style: none;
}

.final-review-notes summary::-webkit-details-marker {
  display: none;
}

.final-review-notes .section-head > div {
  display: grid;
  gap: 0.72rem;
}

.final-review-notes .section-head > .listing-refine-heading {
  grid-template-columns: clamp(2.2rem, 3.2vw, 2.6rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(0.72rem, 1.2vw, 0.95rem);
}

.listing-refine-icon {
  display: inline-grid;
  place-items: center;
  width: clamp(2.2rem, 3.2vw, 2.6rem);
  height: clamp(2.2rem, 3.2vw, 2.6rem);
  border-radius: 8px;
  background: linear-gradient(180deg, #23283a 0%, #171b2a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0.42rem 0.9rem rgba(5, 8, 20, 0.18);
  color: #a79bcf;
  pointer-events: none;
}

.listing-refine-icon svg {
  width: clamp(1.24rem, 1.9vw, 1.52rem);
  height: clamp(1.24rem, 1.9vw, 1.52rem);
  overflow: visible;
}

.listing-refine-star {
  fill: currentColor;
}

.listing-refine-star-small,
.listing-refine-star-tiny {
  fill: #9c91c5;
}

.listing-refine-copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.final-review-notes .section-head h3,
.final-review-notes .section-head p {
  margin: 0;
}

.final-review-notes .section-head h3 {
  font-size: clamp(0.92rem, 1.15vw, 1.05rem);
  line-height: 1.12;
}

.final-review-notes .section-head p {
  max-width: 41rem;
  font-size: clamp(0.82rem, 0.9vw, 0.9rem);
  line-height: 1.36;
}

.final-review-notes .section-head .muted + .muted {
  margin-top: 0;
}

.listing-generator-toggle {
  width: 0.76rem;
  height: 0.76rem;
  margin-top: 0.26rem;
  border: solid var(--primary-strong);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.final-review-notes:not([open]) {
  gap: 0;
}

.final-review-notes:not([open]) > .final-review-notes-body {
  display: none;
}

.final-review-notes:not([open]) .listing-generator-toggle {
  transform: rotate(-45deg);
}

.final-review-notes-body {
  display: grid;
  gap: 0.72rem;
  padding-top: clamp(0.35rem, 1.4vw, 0.9rem);
}

.listing-refine-expanded-copy {
  max-width: 48rem;
  margin: 0;
  line-height: 1.45;
}

.final-review-notes-field,
.listing-template-field {
  display: grid;
  gap: 0.34rem;
}

.listing-template-field {
  margin-top: 0.1rem;
}

.listing-template-field .managed-select-field {
  margin: 0;
}

.generation-action-row {
  display: grid;
  justify-items: end;
  margin-top: 0.55rem;
}

.final-review-notes #refreshListingContent {
  justify-self: end;
  width: min(100%, 18.5rem);
  max-width: 100%;
  min-height: 44px;
  white-space: normal;
}

.final-review-notes label {
  margin-top: 0;
}

.final-review-notes textarea {
  min-height: 4.75rem;
}

.similar-block h3 {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  color: color-mix(in srgb, var(--blue) 70%, var(--text));
}

.similar-block .section-head.compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 0;
  padding-bottom: 0;
}

.price-basis {
  gap: 0.65rem;
  padding: 0.72rem 0.75rem 0.68rem;
  border-color: color-mix(in srgb, var(--primary) 20%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, transparent), transparent 48%),
    var(--surface-raised);
}

.market-evidence {
  display: block;
  border-color: var(--line);
  background: var(--bg);
  padding: 0.55rem;
}

.market-evidence summary {
  display: list-item;
  cursor: pointer;
  color: var(--primary-strong);
  font-weight: 750;
  line-height: 1.3;
}

.market-evidence summary::-webkit-details-marker {
  color: var(--primary-strong);
}

.market-evidence summary::marker {
  color: var(--primary-strong);
}

.market-evidence summary span {
  color: var(--primary-strong);
  font-weight: 750;
}

.market-evidence summary strong {
  float: right;
  min-width: 0;
  max-width: 60%;
  margin-left: 0.75rem;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
  text-align: right;
}

.market-evidence-body {
  position: relative;
  display: grid;
  gap: 0.65rem;
  padding-top: 0.72rem;
}

.market-evidence.is-refreshing .market-evidence-body > :not(.valuation-refresh-overlay) {
  opacity: 0.38;
  filter: saturate(0.72);
  pointer-events: none;
}

.valuation-refresh-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: start center;
  padding: clamp(1rem, 4vw, 2.2rem);
  border-radius: 12px;
  background:
    radial-gradient(circle at 24% 12%, color-mix(in srgb, var(--amber) 20%, transparent), transparent 28%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 72%, transparent), color-mix(in srgb, var(--bg) 88%, transparent));
  backdrop-filter: blur(3px);
}

.valuation-refresh-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  width: min(520px, 100%);
  border: 1px solid color-mix(in srgb, var(--amber) 52%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, #2c210d);
  box-shadow: 0 20px 55px color-mix(in srgb, #000 42%, transparent);
  padding: 1rem 1.1rem;
}

.valuation-refresh-panel strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.valuation-refresh-panel p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.valuation-refresh-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid color-mix(in srgb, var(--amber) 20%, var(--line));
  border-top-color: var(--amber);
  border-right-color: color-mix(in srgb, var(--primary) 60%, var(--amber));
  border-radius: 999px;
  animation: valuation-refresh-spin 0.8s linear infinite;
}

@keyframes valuation-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.advanced-fields:not([open]) > :not(summary),
.market-evidence:not([open]) > :not(summary),
.technical-details:not([open]) > :not(summary) {
  display: none !important;
}

.price-basis-head {
  margin-bottom: 0;
}

.price-basis-source {
  min-height: 24px;
  max-width: 100%;
  padding: 0.2rem 0.5rem;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary-strong);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ebay-link {
  position: relative;
  border-color: color-mix(in srgb, #0064d2 35%, var(--line));
  background: color-mix(in srgb, #0064d2 9%, var(--surface));
  color: var(--text);
  overflow: hidden;
}

.ebay-link::before {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, #e53238 0 25%, #0064d2 25% 50%, #f5af02 50% 75%, #86b817 75% 100%);
  content: "";
}

.ebay-link:hover {
  border-color: #f5af02;
  color: var(--primary-strong);
  box-shadow: 0 0 0 2px color-mix(in srgb, #f5af02 16%, transparent);
}

.price-basis-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  min-width: 0;
  padding: 0.05rem 0.15rem 0.12rem;
}

.price-basis-line {
  display: grid;
  gap: 0.28rem;
  align-content: center;
  min-height: 58px;
  padding: 0 1.1rem;
  border-left: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  color: var(--muted);
  font-size: 0.88rem;
}

.price-basis-line:first-child {
  border-left: 0;
  padding-left: 0.1rem;
}

.price-basis-line span,
.price-basis-line strong {
  min-width: 0;
}

.price-basis-line strong {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 850;
  white-space: nowrap;
}

.price-basis-line.recommended {
  color: var(--primary-strong);
  font-weight: 800;
}

.price-basis-line.recommended strong {
  color: var(--primary-strong);
  font-size: 1.75rem;
}

.price-basis-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.market-evidence-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
}

.market-evidence-tools .pricing-source-list {
  margin: 0;
}

.market-evidence-tools .button-link {
  min-height: 34px;
  padding: 0.42rem 0.65rem;
}

.price-basis-confidence {
  align-items: start;
}

.price-confidence-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 56px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
  font-size: 0.9rem;
  line-height: 1;
}

.price-confidence-badge.low {
  background: color-mix(in srgb, var(--amber) 18%, transparent);
  color: var(--amber);
}

.price-confidence-badge.medium {
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  color: var(--blue);
}

.price-confidence-badge.high {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary-strong);
}

.button-link {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  font-weight: 650;
}

.button-link:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.google-link {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  padding-inline: 0;
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.similar-block .link-actions {
  flex-wrap: wrap;
  align-self: start;
}

.similar-block .button-link {
  min-height: 36px;
  padding: 0.48rem 0.72rem;
  white-space: nowrap;
}

.similar-block .google-link {
  width: 38px;
  min-width: 38px;
  padding-inline: 0;
}

.subtle-button {
  cursor: pointer;
  font: inherit;
}

.question-list {
  display: grid;
  gap: 0.85rem;
}

.context-actions {
  justify-content: flex-end;
}

.sanity-query-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  padding: 0.36rem 0.48rem;
}

.sanity-query-box span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.sanity-query-box code {
  display: block;
  width: 100%;
  min-width: 0;
  user-select: text;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font: 0.78rem/1.35 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.answer-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--primary-strong);
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 750;
}

.question-row {
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.question-row.answered-collapsed {
  display: none;
}

.question-line {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}

.question-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

.question-hint {
  margin: -0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.choice {
  min-height: 38px;
  padding: 0.45rem 0.55rem;
}

.choice.active {
  border-color: var(--primary);
  background: var(--green-soft);
  color: var(--primary-strong);
  font-weight: 750;
}

.question-note {
  min-height: 38px;
}

.price-basis p {
  color: var(--muted);
  line-height: 1.45;
}

.compact-warnings {
  margin-top: 0;
}

.identity-evidence-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) auto;
  gap: 0.58rem 0.75rem;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue-soft) 34%, transparent), transparent 48%),
    color-mix(in srgb, var(--surface) 78%, var(--bg));
  padding: 0.68rem 0.72rem;
}

.identity-evidence-main {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.identity-evidence-kicker {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.identity-evidence-main strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.identity-evidence-main p {
  margin: 0;
  font-size: 0.78rem;
}

.retail-reference-chip {
  display: grid;
  gap: 0.08rem;
  justify-items: end;
  min-width: 8.5rem;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 8px;
  background: var(--surface-raised);
  padding: 0.42rem 0.55rem;
  color: var(--text);
  text-decoration: none;
}

.retail-reference-chip span,
.retail-reference-chip small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.retail-reference-chip strong {
  color: var(--primary-strong);
  font-size: 1rem;
}

.identity-term-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.identity-term-list span {
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 82%, transparent);
  padding: 0.22rem 0.48rem;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
}

.identity-evidence-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.22rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.identity-evidence-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.74rem;
}

.identity-evidence-list a {
  color: var(--blue);
  font-weight: 750;
}

.sold-review-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-items: center;
  border-left: 3px solid var(--green);
  background: color-mix(in srgb, var(--green-soft) 42%, transparent);
  padding: 0.5rem 0.65rem;
  color: var(--text);
  font-size: 0.82rem;
}

.sold-review-strip strong {
  color: var(--green);
}

.market-evidence-sections,
.excluded-evidence-groups {
  display: grid;
  gap: 0.72rem;
}

.evidence-section,
.excluded-evidence-details,
.excluded-evidence-group {
  display: grid;
  gap: 0.55rem;
}

.evidence-section.empty {
  border: 1px dashed color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 8px;
  padding: 0.62rem 0.72rem;
  background: color-mix(in srgb, var(--surface-raised) 42%, transparent);
}

.evidence-section-head,
.excluded-evidence-details summary {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.evidence-section-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
}

.evidence-section-head span,
.excluded-evidence-details summary strong {
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary-strong);
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 850;
}

.excluded-evidence-details {
  border: 1px solid color-mix(in srgb, var(--amber) 26%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber-soft) 28%, transparent);
  padding: 0.64rem 0.72rem;
}

.excluded-evidence-details summary {
  cursor: pointer;
  color: var(--primary-strong);
  font-weight: 820;
}

.excluded-evidence-details > p {
  margin: 0;
}

.excluded-evidence-list {
  display: grid;
  gap: 0.48rem;
}

.excluded-evidence-card {
  display: grid;
  grid-template-columns: minmax(46px, 54px) minmax(0, 1fr) auto auto;
  gap: 0.58rem;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  padding: 0.46rem;
}

.excluded-evidence-copy {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.excluded-evidence-copy h5 {
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.25;
}

.excluded-evidence-copy p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.25;
}

.excluded-evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  justify-content: end;
  align-items: center;
}

.excluded-evidence-actions .button-link {
  min-height: 30px;
  padding: 0.28rem 0.52rem;
}

.comparable-list {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, var(--bg));
  overflow-x: auto;
  overflow-y: hidden;
}

.comparable-row {
  display: grid;
  grid-template-columns:
    minmax(240px, 2.35fr)
    minmax(56px, 0.36fr)
    minmax(56px, 0.36fr)
    minmax(56px, 0.36fr)
    minmax(110px, 0.75fr)
    minmax(70px, 0.45fr);
  column-gap: 0.75rem;
  align-items: center;
  min-width: 760px;
  min-height: 60px;
  padding: 0.36rem 0.525rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.comparable-header {
  min-height: 38px;
  border-top: 0;
  background: color-mix(in srgb, var(--surface-raised) 70%, var(--bg));
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.comparable-card {
  background: transparent;
}

.comparable-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.58rem;
  align-items: center;
  min-width: 0;
}

.comparable-thumb {
  width: 48px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--thumb-bg);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.comparable-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comparable-copy {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.comparable-card h4 {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.18;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.comparable-card p {
  margin: 0;
}

.comparable-source {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.72rem;
  line-height: 1.2;
}

.comparable-evidence-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.18rem;
  border-radius: 999px;
  padding: 0.08rem 0.38rem;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
}

.comparable-evidence-badge.active {
  background: color-mix(in srgb, var(--blue) 11%, transparent);
  color: var(--blue);
}

.comparable-evidence-badge.sold {
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green);
}

.comparable-evidence-badge.manual {
  background: color-mix(in srgb, var(--amber) 20%, transparent);
  color: var(--amber-strong);
}

.comparable-tier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.18rem;
  border-radius: 999px;
  padding: 0.08rem 0.38rem;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
  background: color-mix(in srgb, var(--line) 55%, transparent);
  color: var(--muted);
}

.comparable-tier-badge.exact {
  background: color-mix(in srgb, var(--green) 18%, transparent);
  color: var(--green);
}

.comparable-tier-badge.close {
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  color: var(--blue);
}

.comparable-tier-badge.broad {
  background: color-mix(in srgb, var(--amber) 17%, transparent);
  color: var(--amber-strong);
}

.comparable-tier-badge.rejected {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
}

.comparable-money {
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.comparable-match {
  display: grid;
  gap: 0.26rem;
  --match-value: 0%;
  --match-color: var(--primary);
}

.comparable-match strong {
  color: var(--match-color);
  font-size: 0.8rem;
  line-height: 1;
}

.comparable-match-track {
  display: block;
  width: min(100%, 92px);
  height: 0.34rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 18%, transparent);
  overflow: hidden;
}

.comparable-match-track span {
  display: block;
  width: var(--match-value);
  height: 100%;
  border-radius: inherit;
  background: var(--match-color);
}

.comparable-actions {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
  align-items: center;
}

.comparable-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--primary-strong);
  font-weight: 750;
  white-space: nowrap;
}

.comparable-chevron {
  font-size: 1.25rem;
  line-height: 0.7;
}

.comparable-unavailable {
  font-size: 0.76rem;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.pricing-source-list {
  margin-top: -0.25rem;
}

.pricing-source-list li {
  display: inline-flex;
  gap: 0.35rem;
  align-items: baseline;
}

.pricing-source-list small {
  color: var(--muted);
  font-size: 0.68rem;
}

.warning-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.warning-list li {
  border-left: 4px solid var(--amber);
  background: var(--amber-soft);
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
}

.warning-list .ebay-issue-link {
  width: fit-content;
  max-width: 100%;
  background: var(--surface);
}

.listing-review-card {
  gap: 0.68rem;
  margin-bottom: 0.8rem;
  width: 100%;
}

.final-review-shell {
  display: grid;
  grid-template-columns: minmax(0, min(943px, 100%));
  gap: 0.8rem;
  align-items: start;
  justify-content: center;
  width: 100%;
  max-width: 943px;
  margin: 0 auto;
}

.final-review-main {
  display: grid;
  gap: 0.68rem;
  min-width: 0;
}

.final-review-main .draft-warnings {
  margin-bottom: 0;
}

.listing-review-head {
  align-items: start;
}

.review-state {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.review-state.ready {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 75%, var(--surface));
  color: var(--blue);
}

.review-state.staged {
  border-color: color-mix(in srgb, var(--amber) 52%, var(--line));
  background: color-mix(in srgb, var(--amber-soft) 78%, var(--surface));
  color: var(--amber);
}

.review-state.live {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 78%, var(--surface));
  color: var(--primary-strong);
}

.review-state.blocked {
  border-color: color-mix(in srgb, var(--red) 55%, var(--line));
  background: color-mix(in srgb, var(--red-soft) 75%, var(--surface));
  color: var(--red);
}

.final-review-form {
  gap: 0.58rem;
}

.review-core-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(12rem, 0.8fr);
  gap: 0.55rem;
  align-items: start;
}

.review-core-grid > * {
  min-width: 0;
}

.review-title-field,
.review-core-grid .description-field,
.review-core-grid .copy-field {
  grid-column: 1 / -1;
}

.review-pricing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(6rem, 0.34fr) minmax(12rem, 0.8fr);
  grid-template-areas:
    "price-label currency-label condition-label"
    "price currency condition";
  gap: 0.32rem 0.55rem;
  align-items: end;
  min-width: 0;
}

.review-pricing-row > * {
  min-width: 0;
}

.review-pricing-row #price {
  grid-area: price;
}

.review-pricing-row #currency {
  grid-area: currency;
}

.review-pricing-row #condition {
  grid-area: condition;
}

.review-pricing-label {
  display: inline-flex;
  gap: 0.32rem;
  align-items: center;
  max-width: 100%;
  min-height: 1.05rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.price-label {
  grid-area: price-label;
}

.currency-label {
  grid-area: currency-label;
}

.condition-label {
  grid-area: condition-label;
}

.price-evidence-tip {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  border-color: color-mix(in srgb, var(--amber) 48%, var(--line));
  background: color-mix(in srgb, var(--amber-soft) 78%, var(--surface));
  color: var(--amber);
  font-size: 0.66rem;
}

.price-evidence-tip:hover,
.price-evidence-tip:focus-visible {
  border-color: var(--amber);
  color: var(--amber);
}

.review-ready-line {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0.42rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--green-soft) 58%, var(--surface));
}

.review-ready-line span,
.review-check small {
  font-size: 0.72rem;
  font-weight: 760;
}

.review-secondary-details {
  padding: 0.55rem;
}

.review-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
}

.review-check {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.48rem;
  align-items: center;
  min-height: 3.2rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.review-check > span {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 7px;
  font-size: 0.68rem;
  font-weight: 900;
}

.review-check.ok > span {
  background: var(--green-soft);
  color: var(--primary-strong);
}

.review-check.missing > span {
  background: var(--amber-soft);
  color: var(--amber);
}

.review-check div {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.review-check strong,
.review-check small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ebay-flow-card {
  display: grid;
  align-content: start;
  gap: 0.82rem;
  padding: 0.72rem;
  border: 1px solid color-mix(in srgb, #0064d2 25%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #0064d2 5%, transparent), transparent 54%),
    color-mix(in srgb, var(--surface-raised) 84%, var(--bg));
}

.ebay-stage-attention {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.ebay-stage-attention small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.ebay-attention-list {
  display: grid;
  gap: 0.45rem;
}

.ebay-attention-item {
  display: grid;
  grid-template-columns: minmax(4.6rem, 0.36fr) minmax(0, 1fr);
  gap: 0.45rem;
  align-items: start;
  min-width: 0;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.ebay-attention-item strong,
.ebay-attention-item span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
  line-height: 1.28;
}

.ebay-attention-item span {
  color: var(--text);
  font-weight: 680;
}

.ebay-attention-item .ebay-issue-link {
  width: fit-content;
  max-width: 100%;
  margin-top: 0.05rem;
}

.ebay-status-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.ebay-flow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  align-items: flex-start;
  min-width: 0;
}

.ebay-flow-head > div,
.ebay-flow-step > div {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.ebay-flow-head strong {
  font-size: 1.02rem;
  line-height: 1.15;
}

.ebay-flow-head .eyebrow {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ebay-flow-head span,
.ebay-flow-step span,
.ebay-status-note {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.ebay-flow-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.62rem;
}

.ebay-flow-step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.58rem;
  align-items: start;
  min-height: 0;
  padding: 0.68rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.ebay-flow-step.primary-step {
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 42%, var(--surface));
}

.ebay-flow-step.complete-step {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 48%, var(--surface));
}

.ebay-flow-step.complete-step .ebay-step-number {
  background: var(--primary);
  color: var(--surface);
}

.ebay-flow-step.complete-step button:disabled {
  color: var(--primary-strong);
}

.ebay-flow-step.attention-step {
  border-color: color-mix(in srgb, var(--amber) 52%, var(--line));
  background: color-mix(in srgb, var(--amber-soft) 50%, var(--surface));
}

.ebay-flow-step.attention-step .ebay-step-number {
  background: var(--amber);
  color: var(--surface);
}

.ebay-flow-step.attention-step button:disabled {
  color: var(--amber);
  opacity: 1;
}

.ebay-flow-step.locked-step {
  background: color-mix(in srgb, var(--surface-raised) 56%, var(--surface));
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
}

.ebay-flow-step.locked-step .ebay-step-number {
  background: color-mix(in srgb, var(--muted) 10%, var(--surface));
  color: var(--muted);
}

.ebay-flow-step.publish-step {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--red) 58%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--red-soft) 74%, var(--surface)) 0%, var(--surface) 78%),
    var(--surface);
  box-shadow:
    0 7px 17px color-mix(in srgb, var(--red) 18%, transparent),
    0 0 0 2px color-mix(in srgb, var(--red) 10%, transparent);
}

.ebay-flow-step.publish-step strong {
  font-size: 1.06rem;
}

.ebay-flow-step.publish-step .ebay-step-number {
  background: var(--red);
  color: var(--surface);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent),
    0 8px 18px color-mix(in srgb, var(--red) 26%, transparent);
}

.ebay-flow-step.publish-step .danger {
  border-color: color-mix(in srgb, var(--red) 82%, var(--line));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--red) 18%, var(--surface)),
    color-mix(in srgb, var(--red-soft) 72%, var(--surface))
  );
  color: var(--red);
  font-weight: 800;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--red) 24%, transparent),
    0 8px 16px color-mix(in srgb, var(--red) 12%, transparent);
}

.ebay-flow-step.publish-step:not(.locked-step) .danger {
  border-color: var(--red);
  background: var(--red);
  color: var(--surface);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--red) 24%, transparent);
}

.ebay-flow-step.publish-step.locked-step {
  border-color: color-mix(in srgb, var(--line) 88%, var(--muted));
  background: color-mix(in srgb, var(--surface-raised) 62%, var(--surface));
  color: color-mix(in srgb, var(--text) 76%, var(--muted));
  box-shadow: none;
}

.ebay-flow-step.publish-step.locked-step .ebay-step-number {
  background: color-mix(in srgb, var(--muted) 12%, var(--surface));
  color: var(--muted);
  box-shadow: none;
}

.ebay-flow-step.publish-step .danger:disabled {
  border-color: color-mix(in srgb, var(--line) 86%, var(--muted));
  background: color-mix(in srgb, var(--surface-raised) 72%, var(--surface));
  color: color-mix(in srgb, var(--muted) 86%, var(--text));
  opacity: 0.76;
  box-shadow: none;
}

.ebay-step-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, #0064d2 12%, var(--surface));
  color: #0064d2;
  font-size: 0.76rem;
  font-weight: 900;
}

.ebay-flow-step button {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  min-height: 44px;
}

.ebay-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--blue-soft) 16%, transparent), transparent),
    color-mix(in srgb, var(--surface) 54%, var(--bg));
}

.ebay-status-row {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
  min-height: 2.42rem;
  padding: 0.48rem 0.66rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 66%, transparent);
  background: transparent;
}

.ebay-status-row:first-child {
  border-top: 0;
}

.ebay-status-row span {
  min-width: 0;
  color: color-mix(in srgb, var(--muted) 86%, var(--text));
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
}

.ebay-status-row strong {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  max-width: 100%;
  min-width: 0;
  min-height: 1.45rem;
  overflow: hidden;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ebay-status-row.status-sku strong {
  font-size: 0.78rem;
}

.review-fees {
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  padding-top: 0.65rem;
}

.ebay-flow-card .ebay-api-offer-note {
  margin-top: 0;
}

.ebay-force-sale {
  display: grid;
  gap: 0.62rem;
  min-width: 0;
  padding: 0.68rem;
  border: 1px solid color-mix(in srgb, var(--red) 36%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--red-soft) 36%, transparent), transparent 72%),
    color-mix(in srgb, var(--surface) 74%, var(--bg));
}

.ebay-force-sale-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.ebay-force-sale-copy .eyebrow {
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ebay-force-sale-copy strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.16;
}

.ebay-force-sale-copy span,
.ebay-force-sale-meta {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.32;
}

.ebay-force-sale-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
  align-items: end;
  min-width: 0;
}

.ebay-force-sale-controls label {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.ebay-force-sale-controls label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
}

.ebay-force-sale-controls input {
  width: 100%;
  min-width: 0;
}

.ebay-force-sale-controls button {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

.ebay-force-sale-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem 0.55rem;
  color: color-mix(in srgb, var(--muted) 88%, var(--text));
  font-weight: 700;
}

.ebay-force-sale-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ebay-status-actions {
  justify-content: flex-end;
}

.detail-ebay-sidebar .ebay-status-actions,
.detail-ebay-sidebar .ebay-status-actions button,
.detail-ebay-sidebar .ebay-find-links,
.detail-ebay-sidebar .ebay-find-links a {
  width: 100%;
}

.detail-ebay-sidebar .ebay-find-links,
.detail-ebay-sidebar .review-fees-head,
.detail-ebay-sidebar .fee-row {
  align-items: stretch;
  flex-direction: column;
}

.detail-ebay-sidebar .ebay-attach-card {
  margin: 0;
  padding: 0.58rem;
}

.review-fees-head,
.fee-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

.review-fees-head {
  padding-top: 0.15rem;
}

.fee-list {
  display: grid;
  gap: 0.35rem;
}

.fee-row {
  min-height: 2.1rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 76%, var(--bg));
}

.fee-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.fee-row.total {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 60%, var(--surface));
}

@media (max-width: 980px) {
  .review-core-grid,
  .review-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-core-grid .full,
  .review-pricing-row,
  .review-title-field,
  .review-core-grid .description-field,
  .review-core-grid .copy-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .listing-review-head,
  .review-ready-line,
  .ebay-attention-item,
  .ebay-force-sale-controls,
  .ebay-flow-step,
  .review-fees-head,
  .fee-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .review-state {
    justify-content: center;
    width: 100%;
  }

  .ebay-flow-head {
    grid-template-columns: 1fr;
  }

  .ebay-flow-step button {
    width: 100%;
    min-width: 0;
  }

  .review-core-grid,
  .review-pricing-row,
  .review-checklist,
  .ebay-flow-steps,
  .ebay-status-grid {
    grid-template-columns: 1fr;
  }

  .ebay-status-row {
    min-height: 2.35rem;
  }

  .review-pricing-row {
    grid-template-columns: 5.1rem minmax(0, 1fr);
    grid-template-areas:
      "price-label price"
      "currency-label currency"
      "condition-label condition";
    align-items: center;
  }

  .review-pricing-label {
    min-height: 34px;
  }
}

.draft-warnings {
  border: 1px solid color-mix(in srgb, var(--amber) 62%, var(--line));
  border-radius: 8px;
  margin-bottom: 0.7rem;
  background: var(--surface-raised);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 18%, transparent);
  overflow: hidden;
}

.draft-warnings summary {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0.48rem 0.65rem;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.draft-warnings summary:hover {
  background: color-mix(in srgb, var(--amber-soft) 48%, transparent);
}

.draft-warnings summary::marker {
  color: var(--amber);
}

.draft-warnings summary strong {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.78rem;
}

.draft-warnings .warning-list {
  border-top: 1px solid var(--line);
  padding: 0.5rem;
}

.draft-warnings .warning-list li {
  padding: 0.38rem 0.5rem;
  font-size: 0.86rem;
  line-height: 1.28;
}

.config-grid,
.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.listing-template-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.listing-template-form textarea {
  min-height: 6rem;
  resize: vertical;
}

.listing-template-form .inline-actions {
  justify-content: flex-end;
}

.template-default-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 2.35rem;
  font-weight: 750;
}

.template-default-row input {
  width: 1rem;
  height: 1rem;
}

.template-default-note {
  margin-top: -0.45rem;
}

.app-modal-sheet.template-manager-sheet {
  max-width: min(760px, calc(100vw - 1.5rem));
}

.app-modal-sheet.settings-sheet {
  width: min(100%, 560px);
}

.settings-sheet #settingsHost {
  display: grid;
  gap: 0.75rem;
}

.settings-sheet #settingsHost > .section-head {
  display: none;
}

.template-manager-form {
  margin-top: 0;
  padding-top: 0;
}

.template-manager-list {
  margin-top: 0.72rem;
}

.template-manager-row strong {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.template-default-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.16rem 0.42rem;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary-strong);
  font-size: 0.72rem;
  font-weight: 850;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.72rem;
  margin-top: 0.65rem;
  margin-bottom: 0.85rem;
}

.detail-meta-group {
  display: grid;
  gap: 0;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.detail-meta-group h3 {
  margin: 0;
  padding: 0.46rem 0 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.detail-meta .meta-row {
  padding: 0.34rem 0;
  border-bottom: 1px solid var(--line);
}

.detail-meta-group .meta-row:last-child {
  border-bottom: 0;
}

.managed-select-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}

.managed-select-field label {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.managed-select-button {
  min-height: 38px;
  padding-inline: 0.76rem;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .managed-select-field {
    grid-template-columns: 1fr;
  }

  .managed-select-button {
    width: 100%;
  }
}

.listing-actions {
  margin-top: 1rem;
}

.mass-generation-panel {
  display: grid;
  grid-template-columns: minmax(24rem, 1fr) minmax(16rem, auto) auto;
  grid-template-areas: "scope selection button";
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.6rem;
}

.purchase-batch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.6rem;
}

.purchase-batch-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  min-height: 38px;
  align-items: center;
  padding: 0 0.58rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 74%, var(--bg));
}

.purchase-batch-summary .muted {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.purchase-batch-summary strong {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}

.batch-line,
.compact-batch {
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-modal[hidden] {
  display: none;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.44);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.app-modal-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
  width: min(100%, 720px);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(10, 16, 14, 0.22);
}

.app-modal-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.app-modal-head h3 {
  margin-top: 0.12rem;
  font-size: 1.05rem;
}

:root[data-theme="dark"] .app-modal-backdrop {
  background: rgba(2, 3, 6, 0.58);
}

.add-item-choice-dialog {
  z-index: 84;
}

.add-item-choice-sheet {
  width: min(100%, 500px);
}

.add-item-choice-options {
  display: grid;
  gap: 0.58rem;
}

.add-item-choice-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.68rem;
  align-items: center;
  width: 100%;
  min-height: 82px;
  padding: 0.72rem;
  text-align: left;
}

.add-item-choice-option:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.choice-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
  color: var(--primary-strong);
}

.choice-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.choice-copy strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.choice-copy span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.batch-manager-head-actions {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.batch-manager-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.78rem;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 78%, var(--surface));
}

.batch-manager-form[hidden] {
  display: none;
}

.batch-cost-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(5.25rem, 0.42fr);
  gap: 0.65rem;
  min-width: 0;
}

.batch-manager-list-head {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

.batch-manager-list-head p {
  margin: 0;
  line-height: 1.35;
}

.batch-manager-form-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.batch-manager-form-head h4 {
  margin: 0.08rem 0 0;
  font-size: 1rem;
}

.batch-manager-intro {
  margin: 0;
  padding: 0.62rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 7%, var(--surface-raised));
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.batch-manager-list {
  display: grid;
  gap: 0.5rem;
}

.batch-manager-empty {
  display: grid;
  gap: 0.22rem;
  padding: 0.78rem;
  border: 1px dashed color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 42%, transparent);
}

.batch-manager-empty span {
  color: var(--muted);
  font-size: 0.84rem;
}

.batch-manager-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.62rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 74%, var(--bg));
}

.batch-manager-row.editing {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 10%, transparent);
}

.batch-manager-row.archived {
  opacity: 0.66;
}

.batch-manager-row-photo {
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 48%, var(--bg));
}

.batch-manager-row-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-manager-row-photo.empty span {
  width: 1.15rem;
  height: 1.15rem;
  border: 1px dashed color-mix(in srgb, var(--muted) 54%, transparent);
  border-radius: 6px;
}

.batch-manager-row-main {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.batch-manager-row-main strong,
.batch-manager-row-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-manager-row-main span {
  color: var(--muted);
  font-size: 0.82rem;
}

.batch-manager-row-main .batch-manager-row-source {
  color: color-mix(in srgb, var(--text) 84%, var(--muted));
  font-weight: 760;
}

.batch-manager-row-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.batch-manager-row-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.batch-manager-row-actions a:hover {
  border-color: var(--primary);
}

#massGenerateDrafts {
  grid-area: button;
  min-height: 38px;
  padding: 0.5rem 0.95rem;
  white-space: nowrap;
}

.mass-generation-scope {
  grid-area: scope;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr);
  gap: 0.5rem;
  min-width: 0;
  align-items: center;
}

.mass-generation-box-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  min-height: 38px;
  min-width: 0;
  padding: 0 0.48rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 74%, var(--bg));
}

.mass-generation-box-field span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mass-generation-box-field input {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  font-size: 0.92rem;
}

.mass-generation-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  min-height: 38px;
  align-items: center;
  padding: 0 0.58rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 74%, var(--bg));
}

.mass-generation-summary .muted {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mass-generation-summary strong {
  font-size: 0.86rem;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-actions-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.dashboard-actions-menu {
  display: grid;
  gap: 0.46rem;
  min-width: 0;
}

.dashboard-actions-trigger {
  display: inline-flex;
  gap: 0.42rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.dashboard-actions-chevron {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.16s ease;
}

.dashboard-actions-trigger.is-open .dashboard-actions-chevron {
  transform: rotate(180deg);
}

.dashboard-actions-popover {
  display: grid;
  width: 100%;
  padding: 0.36rem;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-raised));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
}

.dashboard-actions-popover[hidden] {
  display: none;
}

.dashboard-actions-popover button {
  display: grid;
  gap: 0.16rem;
  justify-items: start;
  min-height: 48px;
  padding: 0.54rem 0.6rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.dashboard-actions-popover button:hover,
.dashboard-actions-popover button:focus-visible {
  background: color-mix(in srgb, var(--primary) 9%, var(--surface-raised));
}

.dashboard-actions-popover button:disabled {
  color: var(--muted);
  opacity: 0.64;
}

.dashboard-actions-popover .danger-menu-action {
  color: var(--dashboard-danger);
}

.dashboard-actions-popover .danger-menu-action:hover,
.dashboard-actions-popover .danger-menu-action:focus-visible {
  background: color-mix(in srgb, var(--dashboard-danger) 9%, var(--surface-raised));
}

.dashboard-actions-popover .danger-menu-action:disabled {
  color: var(--muted);
}

.dashboard-actions-popover button span {
  font-size: 0.9rem;
  font-weight: 820;
}

.dashboard-actions-popover button small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.dashboard-selection-controls {
  grid-area: selection;
  display: flex;
  gap: 0.28rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  min-height: 38px;
  padding: 0.18rem 0.2rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 74%, var(--bg));
}

#dashboardSelectionStatus {
  align-self: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0 0.35rem 0 0.22rem;
}

.secondary-action {
  min-height: 30px;
  padding: 0.28rem 0.55rem;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 720;
  white-space: nowrap;
}

.secondary-action:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
}

.secondary-action.is-active {
  border-color: color-mix(in srgb, var(--primary) 42%, transparent);
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
  color: var(--primary-strong);
}

.config-row,
.meta-row {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.45rem;
  min-width: 0;
}

.config-row strong,
.meta-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.config-row:last-child,
.meta-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

pre {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.8rem;
  font-size: 0.78rem;
}

#toast {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--toast-bg);
  color: var(--bg);
  padding: 0.8rem 0.9rem;
  box-shadow: var(--shadow);
}

#toast.show {
  display: flex;
}

#toast > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast-action {
  flex: 0 0 auto;
  min-height: 34px;
  border-color: currentColor;
  color: inherit;
}

.toast-action:hover {
  background: transparent;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.mass-generation-confirm {
  z-index: 80;
}

.mass-generation-confirm-sheet {
  width: min(100%, 430px);
}

.mass-generation-confirm-body {
  display: grid;
  gap: 0.62rem;
}

.mass-generation-confirm-body p {
  line-height: 1.4;
}

.mass-generation-confirm-scope {
  display: flex;
  gap: 0.34rem;
  flex-wrap: wrap;
}

.mass-generation-confirm-scope[hidden] {
  display: none;
}

.mass-generation-confirm-scope span {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0.28rem 0.48rem;
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 760;
}

.mass-generation-confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.mass-generation-confirm-actions button {
  width: 100%;
}

@media (max-width: 719px) {
  .add-item-workspace {
    gap: 0.58rem;
  }

  .add-item-photos,
  .add-item-details {
    gap: 0.68rem;
    padding: 0.72rem;
  }

  .new-photo-drop-zone {
    display: none;
  }

  .new-photo-source-row,
  .new-inventory-grid {
    grid-template-columns: 1fr;
  }

  .pending-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .add-item-save-bar {
    display: grid;
    gap: 0.62rem;
    margin: 0.04rem -0.72rem -0.72rem;
    padding: 0.66rem 0.72rem 0.72rem;
  }

  .add-item-save-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .add-item-save-actions button {
    min-width: 0;
    width: 100%;
  }

  .save-flow-copy span {
    display: block;
  }

  body {
    font-size: 15px;
  }

  button {
    min-height: 36px;
    padding: 0.46rem 0.58rem;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) 38px 38px 58px;
    align-items: center;
    column-gap: 0.42rem;
    row-gap: 0.5rem;
    padding: 0.62rem;
  }

  .topbar > div {
    min-width: 0;
  }

  #modeLine {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  h1 {
    font-size: 1.15rem;
  }

  h2 {
    font-size: 1.06rem;
  }

  h3 {
    font-size: 0.98rem;
  }

  main {
    padding: 0.52rem;
  }

  .toolbar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 42px;
    margin-bottom: 0.62rem;
  }

  .dashboard-filter-toggle {
    display: inline-flex;
    grid-column: 2;
    align-items: center;
    justify-self: end;
    gap: 0.38rem;
    min-height: 38px;
    padding: 0.44rem 0.68rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
  }

  .dashboard-filter-popover {
    position: absolute;
    top: calc(100% + 0.42rem);
    right: 0;
    z-index: 35;
    display: none;
    width: min(100%, 390px);
    max-height: min(72dvh, 620px);
    overflow: auto;
    gap: 0.62rem;
    padding: 0.66rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 94%, var(--bg));
    box-shadow: var(--shadow);
  }

  .toolbar.filters-open .dashboard-filter-popover {
    display: grid;
  }

  .dashboard-status-strip {
    margin-bottom: 0.55rem;
    padding: 0.18rem 0.18rem 0.34rem;
    border-radius: 8px;
  }

  .item-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.52rem;
  }

  .tabs {
    display: contents;
  }

  .tab,
  .filter {
    min-width: 0;
    min-height: 38px;
    padding: 0.45rem 0.45rem;
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .status-filter {
    min-height: 31px;
    padding: 0.32rem 0.46rem;
    font-size: 0.82rem;
  }

  .dashboard-tools {
    display: grid;
    gap: 0.48rem;
  }

  .box-filter-heading {
    gap: 0.45rem;
  }

  .box-filter-list {
    overflow: visible;
    padding-bottom: 0;
    scrollbar-width: auto;
  }

  .box-filter-list::-webkit-scrollbar {
    display: none;
  }

  .box-filter {
    flex: 0 0 auto;
  }

  .filter-tools {
    grid-template-columns: 2fr 1fr 36px;
    gap: 0.48rem;
  }

  .filter-tools .search {
    max-width: none;
  }

  .order-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px auto;
    gap: 0.48rem;
    align-items: end;
  }

  .sort-field {
    width: auto;
  }

  .mass-generation-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "selection button";
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.55rem;
    padding: 0.48rem;
  }

  .mass-generation-scope {
    display: none;
  }

  .purchase-batch-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
    padding: 0.48rem;
  }

  .purchase-batch-summary {
    min-height: 34px;
  }

  .app-modal {
    place-items: center;
    padding: 0.64rem;
  }

  .app-modal-sheet {
    max-height: calc(100dvh - 1.28rem);
    padding: 0.82rem 0.82rem calc(0.82rem + env(safe-area-inset-bottom));
  }

  .add-item-choice-sheet {
    width: min(100%, 500px);
  }

  .add-item-choice-option {
    min-height: 76px;
    padding: 0.64rem;
  }

  .batch-manager-sheet {
    width: min(100%, 720px);
  }

  .settings-sheet {
    width: min(100%, 560px);
  }

  .app-modal-head,
  .batch-manager-form-head {
    align-items: stretch;
  }

  .batch-manager-head-actions {
    flex: 0 0 auto;
  }

  .batch-manager-form,
  .batch-manager-row {
    grid-template-columns: 1fr;
  }

  .batch-cost-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(4.8rem, 0.46fr);
  }

  .batch-reference-photo-control {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .batch-reference-photo-preview {
    width: min(100%, 12rem);
  }

  .batch-manager-form {
    padding: 0.68rem;
  }

  .batch-manager-row-actions {
    justify-content: stretch;
  }

  .batch-manager-row-actions button,
  .batch-manager-row-actions a {
    flex: 1 1 0;
  }

  #massGenerateDrafts {
    align-self: stretch;
    min-height: 36px;
    padding: 0.42rem 0.58rem;
    font-size: 0.86rem;
  }

  .mass-generation-summary {
    min-height: 34px;
  }

  .dashboard-selection-controls {
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-height: 36px;
    overflow-x: auto;
    padding: 0.18rem;
    scrollbar-width: none;
  }

  .dashboard-selection-controls::-webkit-scrollbar {
    display: none;
  }

  #dashboardSelectionStatus {
    flex: 0 0 auto;
    padding-inline: 0.24rem;
  }

  .dashboard-selection-controls button {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0.34rem 0.46rem;
    font-size: 0.78rem;
  }

  .mass-generation-confirm-sheet {
    width: min(100%, 430px);
  }

  .view-toggle {
    justify-self: end;
    height: 36px;
    padding: 0.14rem;
  }

  .view-toggle button {
    height: 32px;
    min-height: 0;
    width: 32px;
    font-size: 0.78rem;
  }

  .layout-icon {
    width: 19px;
    height: 19px;
  }

  .sort-direction,
  .clear-filters {
    min-height: 36px;
    width: 36px;
    min-width: 36px;
    font-size: 0.82rem;
  }

  .clear-filters {
    width: 36px;
    min-width: 36px;
  }

  .theme-toggle {
    grid-column: 4;
    grid-row: 1;
    width: 58px;
    min-width: 58px;
    min-height: 38px;
    padding-inline: 0.42rem;
  }

  .theme-toggle::after {
    font-size: 0.68rem;
  }

  .theme-icon {
    width: 15px;
    height: 15px;
  }

  .tab[data-view="dashboard"] {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    place-items: center;
    width: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: 999px;
  }

  .tab[data-view="dashboard"] span {
    display: none;
  }

  .tab[data-view="dashboard"] .nav-icon {
    position: static;
  }

  #addItemMenuButton {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    min-height: 42px;
    border-radius: 10px;
  }

  .tab[data-view="settings"] {
    grid-column: 3;
    grid-row: 1;
  }

  .batch-top-bar {
    top: max(0.5rem, env(safe-area-inset-top));
    left: max(0.84rem, env(safe-area-inset-left));
    right: max(0.5rem, env(safe-area-inset-right));
    gap: 0.42rem;
  }

  .batch-camera-lens-control {
    top: auto;
    left: 50%;
    right: auto;
    bottom: calc(max(0.74rem, env(safe-area-inset-bottom)) + 9.2rem);
    max-width: calc(100vw - 1rem);
    transform: translateX(-50%);
  }

  .batch-camera-zoom-rail {
    min-height: 35px;
    padding: 0.16rem;
  }

  .batch-camera-device-rail {
    max-width: calc(100vw - 1rem);
    min-height: 28px;
    padding: 0.12rem;
  }

  .batch-camera-zoom-button {
    min-width: 31px;
    height: 29px;
    min-height: 29px;
    padding-inline: 0.37rem;
    font-size: 0.74rem;
  }

  .batch-camera-device-button {
    min-width: 29px;
    height: 23px;
    min-height: 23px;
    padding-inline: 0.32rem;
    font-size: 0.64rem;
  }

  .batch-status-pill {
    max-width: calc(100vw - 4.75rem);
    min-height: 42px;
    gap: 0.45rem;
    padding: 0.38rem 0.42rem 0.38rem 0.82rem;
  }

  .batch-status-kicker {
    font-size: 0.62rem;
  }

  .batch-status-pill strong {
    font-size: 0.88rem;
  }

  .batch-hud-batch {
    font-size: 0.7rem;
  }

  .batch-status-action {
    min-height: 28px;
    width: 30px;
    min-width: 30px;
    padding: 0;
  }

  .batch-status-action span {
    display: none;
  }

  .batch-exit {
    min-height: 42px;
    padding-inline: 0.7rem;
  }

  .batch-capture-drawer {
    top: calc(max(0.5rem, env(safe-area-inset-top)) + 3.2rem);
    left: max(0.5rem, env(safe-area-inset-left));
    right: max(0.5rem, env(safe-area-inset-right));
    width: auto;
    max-height: min(62dvh, 510px);
    padding: 0.58rem;
  }

  .batch-capture-drawer.setup-mode,
  .batch-capture-drawer.warning-mode {
    top: 50%;
    left: 50%;
    right: auto;
    width: min(calc(100vw - 1rem), 620px);
    max-height: min(calc(100dvh - 1rem), 760px);
    gap: 1rem;
    padding: 1rem;
    transform: translate(-50%, -50%);
  }

  .batch-drawer-head strong {
    font-size: 0.88rem;
  }

  .batch-inventory-card {
    grid-template-columns: minmax(0, 4fr) minmax(3.5rem, 1fr);
    gap: 0.4rem;
    padding: 0;
  }

  .batch-approval-card {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0.68rem 0.74rem;
  }

  .batch-container-field,
  .batch-purchase-field {
    min-width: 0;
  }

  .batch-create-container,
  .batch-create-purchase {
    min-height: 34px;
  }

  .batch-inventory-card > label,
  .batch-picker-field {
    gap: 0.14rem;
  }

  .batch-inventory-card span {
    font-size: 0.8rem;
  }

  .batch-inventory-card input,
  .batch-inventory-card select {
    min-height: 42px;
    padding: 0.42rem 0.5rem;
  }

  .batch-approval-card input {
    min-height: 19px;
    padding: 0;
  }

  .batch-capture-drawer.setup-mode .batch-inventory-card select,
  .batch-capture-drawer.warning-mode .batch-inventory-card select,
  .batch-capture-drawer.setup-mode .batch-container-current,
  .batch-capture-drawer.warning-mode .batch-container-current,
  .batch-capture-drawer.setup-mode .batch-create-container,
  .batch-capture-drawer.warning-mode .batch-create-container,
  .batch-capture-drawer.setup-mode .batch-create-purchase,
  .batch-capture-drawer.warning-mode .batch-create-purchase {
    min-height: 48px;
  }

  .batch-bottom-dock {
    inset: 0;
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    --batch-float-bottom: max(0.74rem, env(safe-area-inset-bottom));
  }

  .batch-status-row {
    bottom: calc(var(--batch-float-bottom) + 5.05rem);
    gap: 0.45rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
    width: max-content;
    max-width: calc(100vw - 1rem);
  }

  .batch-retry {
    min-height: 26px;
    padding-inline: 0.42rem;
    font-size: 0.74rem;
  }

  .batch-thumb-strip {
    bottom: calc(var(--batch-float-bottom) + 11.6rem);
    max-width: calc(100vw - 1rem);
    min-height: 52px;
    gap: 0.38rem;
    padding: 0.22rem;
    border-radius: 12px;
  }

  .batch-thumb-strip:empty::before {
    min-height: 0;
    font-size: 0.8rem;
  }

  .batch-thumb {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
  }

  .batch-thumb span {
    min-width: 18px;
    height: 18px;
    font-size: 0.66rem;
  }

  .batch-thumb button {
    width: 24px;
    min-width: 24px;
    height: 24px;
    font-size: 0.76rem;
  }

  .batch-status {
    bottom: calc(var(--batch-float-bottom) + 15.05rem);
    max-width: calc(100vw - 1rem);
    font-size: 0.82rem;
  }

  .batch-status:not(.error-text) {
    display: none;
  }

  .batch-controls {
    bottom: var(--batch-float-bottom);
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    gap: 0.4rem;
    width: min(calc(100vw - 1rem), 360px);
  }

  .batch-shutter {
    width: 64px;
    height: 64px;
    min-height: 64px;
    border-width: 3px;
  }

  .batch-shutter::before {
    width: 46px;
    height: 46px;
  }

  .batch-next,
  .batch-secondary {
    min-height: 42px;
    padding-inline: 0.36rem;
    font-size: 0.9rem;
  }

  .batch-intake-review {
    padding: 0.44rem 0.44rem calc(0.44rem + env(safe-area-inset-bottom));
  }

  .batch-intake-sheet {
    max-height: calc(100dvh - 0.88rem);
    padding: 0.62rem 0.62rem 0;
    border-radius: 12px;
    gap: 0.54rem;
  }

  .batch-intake-head {
    align-items: start;
  }

  .batch-intake-head-actions {
    display: flex;
    gap: 0.32rem;
    align-items: center;
    justify-content: flex-end;
  }

  .batch-intake-head h2 {
    font-size: 0.95rem;
  }

  .batch-intake-kicker {
    font-size: 0.76rem;
  }

  .batch-intake-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .batch-intake-fields input,
  .batch-intake-fields select {
    min-height: 34px;
  }

  .batch-refinement-notes textarea {
    min-height: 4rem;
  }

  .batch-size-chip-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .batch-intake-actions {
    grid-template-columns: 1fr;
    gap: 0.34rem;
    margin: 0 -0.62rem;
    padding: 0.46rem 0.62rem 0.62rem;
  }

  .batch-intake-actions button {
    min-height: 38px;
    font-size: 0.82rem;
  }

  .panel {
    padding: 0.58rem;
    box-shadow: none;
  }

  .item-card {
    padding: 0;
    box-shadow: none;
  }

  .item-card-body {
    gap: 0.58rem;
    padding: 0.58rem;
  }

  .dashboard-thumb {
    aspect-ratio: 1.9 / 1;
  }

  .item-card-media .badge {
    top: 0.38rem;
    right: 0.38rem;
    min-height: 24px;
    padding-inline: 0.48rem;
    font-size: 0.72rem;
  }

  .card-copy {
    gap: 0.18rem;
  }

  .card-copy h3 {
    min-height: 2.3em;
    font-size: 0.84rem;
    line-height: 1.15;
  }

  .card-copy .sku {
    overflow: hidden;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .item-price {
    margin-top: 0.18rem;
    font-size: 1.08rem;
  }

  .stock-line {
    font-size: 0.76rem;
  }

  .item-card-actions {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 0.42rem;
  }

  .item-list.compact {
    grid-template-columns: 1fr;
    gap: 0;
    box-shadow: none;
  }

  .compact-item-row {
    grid-template-columns: 24px 40px minmax(0, 1fr) 78px 32px;
    gap: 0.48rem;
    padding: 0.23rem 0.5rem;
  }

  .compact-select {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .compact-thumb {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .compact-item-main {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .compact-title {
    font-size: 0.86rem;
  }

  .compact-price-editor {
    grid-column: 4;
    grid-row: 1 / 3;
    width: 78px;
    height: 32px;
    padding: 0 0.38rem;
  }

  .compact-price-editor input {
    min-height: 0;
    padding: 0;
    font-size: 0.8rem;
  }

  .compact-price-editor span {
    display: none;
  }

  .compact-stock {
    display: none;
    grid-column: 4;
    grid-row: 2;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .compact-status {
    display: none;
  }

  .compact-delete-button {
    grid-column: 5;
    grid-row: 1 / 3;
    width: 32px;
    min-height: 32px;
  }

  .item-open-button,
  .item-delete-button {
    min-height: 38px;
    border-radius: 7px;
  }

  .item-delete-button svg {
    width: 19px;
    height: 19px;
  }

  .detail-layout {
    gap: 0.52rem;
  }

  .detail-sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
    align-items: stretch;
    padding: 0.72rem;
  }

  .detail-sidebar-header {
    grid-column: 1 / -1;
    grid-row: 1;
    align-content: start;
    gap: 0.62rem;
    min-width: 0;
  }

  .detail-title-row {
    align-items: start;
    gap: 0.42rem;
  }

  .detail-title-row h2 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .detail-title-row .sku {
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .detail-title-row .badge {
    min-height: 24px;
    padding: 0.18rem 0.5rem;
    font-size: 0.72rem;
  }

  .detail-action-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.34rem;
  }

  .detail-action-bar.two-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-action-bar.four-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-action-bar button {
    min-height: 42px;
    padding: 0.36rem 0.24rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .sidebar-photo-panel {
    display: contents;
  }

  .sidebar-photo-grid {
    display: contents;
  }

  .sidebar-uploaded-photo.lead {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .sidebar-uploaded-photo.lead .sidebar-photo-button,
  .sidebar-uploaded-photo.lead img,
  .sidebar-photo-lead {
    height: 100%;
    aspect-ratio: auto;
  }

  .sidebar-photo-panel.empty {
    display: grid;
    grid-column: 1;
    grid-row: 2;
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .sidebar-photo-panel.empty .sidebar-add-photo-tile {
    width: 100%;
    height: 100%;
  }

  .sidebar-photo-strip {
    grid-column: 1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.25rem, 4.75rem));
    gap: 0.38rem;
    align-content: start;
    justify-content: start;
  }

  .sidebar-photo-strip .sidebar-uploaded-photo,
  .sidebar-photo-strip .sidebar-add-photo-tile,
  .sidebar-photo-strip .sidebar-photo-more {
    aspect-ratio: 1 / 1;
  }

  .sidebar-photo-strip .sidebar-uploaded-photo img {
    height: 100%;
  }

  .sidebar-photo-strip .mobile-extra-photo {
    display: none;
  }

  .sidebar-photo-more {
    display: grid;
    place-items: center;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 74%, var(--thumb-bg));
    color: var(--text);
    padding: 0;
    font-size: 1.02rem;
    font-weight: 850;
  }

  .detail-meta {
    display: none;
  }

  .listing-head-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    width: 100%;
    gap: 0.38rem;
  }

  .listing-head-actions .badge {
    width: fit-content;
  }

  .section-head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.42rem;
    margin-bottom: 0.45rem;
  }

  .section-head h2 {
    font-size: 0.98rem;
  }

  .section-head h3 {
    font-size: 0.9rem;
  }

  .section-head.compact {
    margin-bottom: 0.4rem;
  }

  .section-head.compact p {
    display: none;
  }

  .section-head > div:first-child {
    min-width: 0;
  }

  .final-review-notes .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.45rem;
    margin-bottom: 0;
  }

  .final-review-notes #refreshListingContent {
    width: 100%;
    justify-self: stretch;
  }

  .final-review-notes .section-head.compact p {
    display: block;
    margin-top: 0;
  }

  .listing-template-field {
    margin-top: 0.24rem;
  }

  .generation-action-row {
    justify-items: stretch;
    margin-top: 0.55rem;
  }

  .final-review-notes textarea {
    min-height: 4.5rem;
  }

  .section-head .actions,
  .section-head .link-actions {
    width: 100%;
  }

  .section-head .actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.34rem;
  }

  .section-head .actions button {
    width: 100%;
  }

  .section-head.compact .link-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .similar-block .section-head.compact .link-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
  }

  .button-link {
    min-height: 34px;
    padding: 0.44rem 0.5rem;
    text-align: center;
    font-size: 0.82rem;
  }

  .form-grid {
    gap: 0.44rem;
  }

  label span,
  .form-label {
    font-size: 0.72rem;
  }

  input,
  textarea,
  select {
    border-radius: 7px;
    padding: 0.4rem 0.54rem;
    font-size: 0.86rem;
  }

  input,
  select {
    min-height: 34px;
  }

  .detail-form > label:not(.full),
  .detail-form > .compact-title,
  .review-core-grid > label:not(.full),
  .review-core-grid > .review-title-field {
    display: grid;
    grid-template-columns: 5.1rem minmax(0, 1fr);
    gap: 0.45rem;
    align-items: center;
  }

  .detail-form > label:not(.full) > span,
  .detail-form > .compact-title > span,
  .review-core-grid > label:not(.full) > span,
  .review-core-grid > .review-title-field > span {
    line-height: 1.05;
  }

  .copy-field {
    display: grid;
    gap: 0.28rem;
  }

  .copy-field textarea {
    height: auto;
    min-height: calc(2.8em + 1.08rem);
    max-height: 12rem;
  }

  .description-field textarea {
    height: auto;
    min-height: calc(2.8em + 1.08rem);
    max-height: 20rem;
  }

  .excluded-evidence-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .excluded-evidence-card > strong,
  .excluded-evidence-card > .excluded-evidence-actions,
  .excluded-evidence-card > .muted {
    grid-column: 2;
    justify-self: start;
  }

  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-actions {
    gap: 0.34rem;
  }

  .photo-action {
    min-height: 36px;
    padding: 0.42rem;
  }

  .photo-uploader {
    gap: 0.28rem;
    margin-top: 0.52rem;
  }

  #photoUploadStatus {
    display: none;
  }

  .flow-steps {
    gap: 0.22rem;
    margin-top: 0.62rem;
    margin-bottom: -1px;
  }

  .flow-step {
    min-height: 40px;
    padding: 0.48rem 0.38rem;
    border-radius: 8px 8px 0 0;
    font-size: 0.82rem;
  }

  .flow-step.active {
    min-height: 46px;
  }

  .step-content {
    padding: 0.58rem;
    border-radius: 0 0 8px 8px;
  }

  .detail-photo-preview {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    padding: 0;
  }

  .detail-preview-top {
    position: absolute;
    top: max(0.55rem, env(safe-area-inset-top));
    left: max(0.65rem, env(safe-area-inset-left));
    right: max(0.65rem, env(safe-area-inset-right));
    z-index: 2;
    pointer-events: none;
  }

  .detail-preview-top button {
    pointer-events: auto;
  }

  .detail-photo-preview img {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .detail-preview-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 52px;
    min-width: 52px;
    height: 72px;
    min-height: 72px;
    transform: translateY(-50%);
  }

  .detail-preview-nav.previous {
    left: max(0.75rem, env(safe-area-inset-left));
  }

  .detail-preview-nav.next {
    right: max(0.75rem, env(safe-area-inset-right));
  }

  .workflow-card {
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    padding: 0.55rem;
  }

  .workflow-card h3 {
    font-size: 0.9rem;
  }

  .draft-warnings {
    margin-bottom: 0.42rem;
  }

  .draft-warnings summary {
    min-height: 32px;
    padding: 0.34rem 0.48rem;
    font-size: 0.82rem;
  }

  .draft-warnings .warning-list {
    gap: 0.28rem;
    padding: 0.38rem;
  }

  .draft-warnings .warning-list li {
    padding: 0.3rem 0.42rem;
    font-size: 0.78rem;
    line-height: 1.22;
  }

  .context-block,
  .price-basis,
  .similar-block {
    gap: 0.34rem;
    margin-bottom: 0.45rem;
    padding: 0.45rem;
  }

  .final-review-notes {
    gap: 0.85rem;
    padding: clamp(0.95rem, 4vw, 1.25rem) clamp(1rem, 4.4vw, 1.4rem) clamp(1rem, 4.2vw, 1.3rem);
  }

  .final-review-notes .section-head {
    align-items: start;
    gap: clamp(0.65rem, 3vw, 0.95rem);
  }

  .final-review-notes .section-head > .listing-refine-heading {
    grid-template-columns: clamp(2.8rem, 10.4vw, 3.2rem) minmax(0, 1fr);
    gap: clamp(0.78rem, 3.4vw, 1.05rem);
  }

  .final-review-notes .listing-refine-icon {
    width: clamp(2.8rem, 10.4vw, 3.2rem);
    height: clamp(2.8rem, 10.4vw, 3.2rem);
  }

  .final-review-notes .listing-refine-icon svg {
    width: clamp(1.6rem, 6.4vw, 1.9rem);
    height: clamp(1.6rem, 6.4vw, 1.9rem);
  }

  .final-review-notes .listing-refine-copy {
    gap: 0.28rem;
  }

  .final-review-notes .section-head h3 {
    font-size: clamp(0.9rem, 3.1vw, 0.98rem);
  }

  .final-review-notes .section-head p {
    max-width: none;
    font-size: clamp(0.82rem, 2.9vw, 0.92rem);
  }

  .final-review-notes .listing-generator-toggle {
    margin-top: 0.24rem;
  }

  .context-block textarea#listingContextNotes {
    height: 3.8rem;
    min-height: 3.4rem;
  }

  .answer-summary {
    padding: 0.42rem 0.5rem;
    font-size: 0.8rem;
  }

  .question-list {
    gap: 0.45rem;
  }

  .question-row {
    gap: 0.34rem;
    padding-top: 0.48rem;
  }

  .question-line {
    font-size: 0.82rem;
  }

  .choice-row {
    gap: 0.28rem;
  }

  .choice {
    min-height: 32px;
    padding: 0.34rem 0.42rem;
  }

  .question-note {
    min-height: 32px;
  }

  .advanced-fields {
    padding: 0.5rem;
  }

  .advanced-fields summary {
    font-size: 0.84rem;
  }

  .price-basis {
    padding: 0.55rem 0.58rem;
  }

  .market-evidence summary strong {
    float: none;
    display: block;
    max-width: none;
    margin: 0.18rem 0 0 1.05rem;
    text-align: left;
  }

  .price-basis-summary {
    grid-template-columns: repeat(4, minmax(116px, 1fr));
    overflow-x: auto;
    padding: 0.02rem 0.05rem 0.08rem;
  }

  .price-basis-line {
    min-height: 50px;
    padding: 0 0.68rem;
    font-size: 0.76rem;
  }

  .price-basis-line strong {
    font-size: 1rem;
  }

  .price-basis-line.recommended strong {
    font-size: 1.25rem;
  }

  .price-confidence-badge {
    min-height: 26px;
    min-width: 48px;
    font-size: 0.68rem;
  }

  .price-basis p,
  .similar-block p {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .similar-block .section-head.compact {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 0.45rem;
  }

  .similar-block .section-head.compact p {
    display: none;
  }

  .sanity-query-box code {
    padding: 0;
    font-size: 0.72rem;
  }

  .meta-grid,
  .config-grid {
    gap: 0.28rem;
  }

  .meta-row,
  .config-row {
    gap: 0.35rem;
    padding-bottom: 0.26rem;
  }

  .meta-row strong,
  .config-row strong {
    font-size: 0.8rem;
  }

  .detail-meta {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-top: 0.68rem;
    margin-bottom: 0.84rem;
  }

  .detail-meta-group {
    border-top: 1px solid var(--line);
  }

  .detail-meta-group h3 {
    padding: 0.4rem 0 0.08rem;
    font-size: 0.68rem;
  }

  .detail-meta .meta-row {
    display: flex;
    gap: 0.55rem;
    align-items: baseline;
    justify-content: space-between;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 0.32rem 0;
  }

  .detail-meta .meta-row strong {
    text-align: right;
  }

  .listing-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.64rem;
  }

  .listing-actions button {
    width: 100%;
  }

  .choice-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #toast {
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.7rem;
  }
}

@media (min-width: 720px) {
  .topbar {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding-inline: 1.25rem;
  }

  main {
    padding: 1.25rem;
  }

  body[data-view="detail"] main {
    overflow: visible;
  }

  .toolbar {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .item-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.9rem;
  }

  .item-list.compact {
    grid-template-columns: 1fr;
  }

  .dashboard-thumb {
    aspect-ratio: 4 / 3;
  }

  .item-card-body {
    gap: 0.68rem;
    padding: 0.74rem;
  }

  .card-copy h3 {
    font-size: 0.98rem;
  }

  .item-price {
    font-size: 1.28rem;
  }

  .item-card-actions {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 0.56rem;
  }

  .item-open-button,
  .item-delete-button {
    min-height: 40px;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
    align-items: stretch;
    min-height: calc(100dvh - 6.4rem);
  }

  .detail-sidebar {
    position: fixed;
    top: 6.7rem;
    left: max(clamp(1rem, 2vw, 2rem), calc((100vw - 1504px) / 2 + clamp(1rem, 2vw, 2rem)));
    width: clamp(300px, 27vw, 390px);
    align-self: start;
    max-height: calc(100dvh - 7.15rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 4;
  }

  .listing-workspace {
    grid-column: 2;
    justify-self: center;
    width: 100%;
    max-width: 920px;
    min-height: calc(100dvh - 6.4rem);
  }

  .detail-layout:has(.listing-review-card) {
    --detail-review-side-gutter: max(clamp(1rem, 2vw, 2rem), calc((100vw - 1504px) / 2 + clamp(1rem, 2vw, 2rem)));
    --detail-review-panel-width: clamp(280px, 22vw, 320px);
    --detail-review-panel-width-wide: clamp(338.8px, 26.62vw, 387.2px);
    --detail-review-panel-extra: calc(var(--detail-review-panel-width-wide) - var(--detail-review-panel-width));
    --detail-review-panel-inset: max(1rem, calc((100vw - 943px) / 2 - 352px));
    --detail-review-panel-outer-inset: max(0.5rem, calc(var(--detail-review-panel-inset) - var(--detail-review-panel-extra)));
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(280px, 320px);
  }

  .detail-layout:has(.listing-review-card) .detail-sidebar {
    left: var(--detail-review-panel-outer-inset);
    width: var(--detail-review-panel-width-wide);
  }

  .detail-layout:has(.listing-review-card) .listing-workspace {
    max-width: 943px;
  }

  .detail-ebay-rail {
    position: fixed;
    top: 6.7rem;
    right: var(--detail-review-panel-outer-inset);
    grid-column: 3;
    width: var(--detail-review-panel-width-wide);
    max-height: calc(100dvh - 7.7rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 4;
  }

  .listing-workspace .flow-steps {
    margin-top: 0;
  }

  .listing-workspace .step-content {
    min-height: 0;
  }

  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .listing-workspace .photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .config-grid,
  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 980px) {
  #settingsTab {
    display: none;
  }

  .dashboard-tools {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.05rem;
  }

  .filter-tools {
    grid-template-columns: minmax(14rem, 2fr) minmax(8rem, 0.8fr) 44px;
    gap: 0.62rem;
  }

  .order-tools {
    flex-wrap: nowrap;
  }
}

/* Reimagined dashboard front page */
:root {
  --dashboard-shell: color-mix(in srgb, var(--surface) 88%, var(--bg));
  --dashboard-glass: color-mix(in srgb, var(--surface-raised) 82%, var(--bg));
  --dashboard-accent: #7c5cff;
  --dashboard-green: #21a06f;
  --dashboard-danger: #ef4444;
}

:root[data-theme="dark"] {
  --bg: #090b10;
  --surface: #12141b;
  --surface-raised: #171922;
  --line: #2c303b;
  --text: #f7f4ff;
  --muted: #aaa6b8;
  --primary: #8f6cff;
  --primary-strong: #d7ccff;
  --blue: #79c8ff;
  --amber: #f4bb4b;
  --red: #ff6868;
  --green-soft: #1b2a25;
  --blue-soft: #172333;
  --amber-soft: #322611;
  --red-soft: #341c20;
  --thumb-bg: #1c2029;
  --topbar-bg: rgba(9, 11, 16, 0.92);
  --dashboard-shell: rgba(18, 20, 27, 0.72);
  --dashboard-glass: rgba(22, 24, 32, 0.76);
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

body {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, var(--surface-raised)) 0%, var(--bg) 42rem),
    var(--bg);
}

.topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem clamp(1rem, 2vw, 2rem);
  background: var(--topbar-bg);
  border-bottom-color: color-mix(in srgb, var(--line) 76%, transparent);
}

.brand-block {
  display: grid;
  gap: 0.18rem;
}

.brand-button h1 {
  font-size: 1.24rem;
  font-weight: 850;
}

#modeLine {
  font-size: 0.86rem;
}

main {
  max-width: 1800px;
  padding: 0.95rem clamp(0.75rem, 1.25vw, 1.5rem) 2rem;
}

body[data-view="analytics"] main {
  max-width: none;
}

#dashboardView {
  display: grid;
  min-height: calc(100dvh - 6.2rem);
  align-content: start;
}

.tabs {
  gap: 0.8rem;
  justify-content: flex-end;
}

.tab,
.theme-toggle {
  min-height: 45px;
  border-radius: 8px;
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
}

:root[data-theme="dark"] .tab,
:root[data-theme="dark"] .theme-toggle {
  background: rgba(14, 15, 22, 0.72);
}

.nav-tab {
  padding-inline: 2.35rem 1rem;
  font-weight: 780;
}

.nav-tab .nav-icon {
  left: 0.9rem;
}

.new-item-tab {
  border-color: color-mix(in srgb, var(--primary) 70%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 82%, #fff 8%), color-mix(in srgb, var(--primary) 74%, #35208f));
  color: #fff;
  box-shadow:
    0 0 0 1px color-mix(in srgb, #fff 8%, transparent),
    0 3px 12px color-mix(in srgb, var(--primary) 20%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent);
}

.new-item-tab:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff 10%), color-mix(in srgb, var(--primary) 78%, #35208f));
  color: #fff;
}

.batch-tab {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--text);
}

.batch-tab:hover,
.tab.active {
  border-color: color-mix(in srgb, var(--primary) 68%, var(--line));
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: var(--primary-strong);
}

.new-item-tab.active,
.new-item-tab.active:hover {
  border-color: color-mix(in srgb, var(--primary) 76%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 86%, #fff 10%), color-mix(in srgb, var(--primary) 72%, #2f1b86));
  color: #fff;
  box-shadow:
    0 0 0 1px color-mix(in srgb, #fff 9%, transparent),
    0 3px 12px color-mix(in srgb, var(--primary) 18%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 24%, transparent);
}

.icon-tab,
.theme-toggle {
  border-radius: 999px;
}

.theme-toggle {
  width: 92px;
  border-color: color-mix(in srgb, var(--amber) 46%, var(--line));
  color: var(--amber);
}

.theme-toggle[aria-pressed="true"] {
  background: color-mix(in srgb, var(--amber-soft) 64%, var(--surface));
}

.mobile-controls-tab {
  display: none;
}

.dashboard-status-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  gap: 0.34rem;
  margin: 0 0 0.72rem;
  padding: 0.34rem;
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: var(--dashboard-shell);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent), var(--shadow);
  overflow-x: auto;
}

.status-filter {
  --status-accent: var(--primary);
  --status-soft: color-mix(in srgb, var(--primary) 13%, var(--surface));
  justify-content: flex-start;
  gap: 0.5rem;
  min-height: 30px;
  padding: 0.22rem 0.48rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 760;
}

.status-filter.status-draft {
  --status-accent: #9d6bff;
  --status-soft: color-mix(in srgb, #9d6bff 16%, var(--surface));
}

.status-filter.status-ready_for_review {
  --status-accent: #3ab7ff;
  --status-soft: color-mix(in srgb, #3ab7ff 14%, var(--surface));
}

.status-filter.status-approved {
  --status-accent: #22c6c8;
  --status-soft: color-mix(in srgb, #22c6c8 14%, var(--surface));
}

.status-filter.status-ebay_offer_created {
  --status-accent: #f2b643;
  --status-soft: color-mix(in srgb, #f2b643 15%, var(--surface));
}

.status-filter.status-published {
  --status-accent: #33d17a;
  --status-soft: color-mix(in srgb, #33d17a 15%, var(--surface));
}

.status-filter.status-needs_attention {
  --status-accent: #ff5d5d;
  --status-soft: color-mix(in srgb, #ff5d5d 15%, var(--surface));
}

.status-filter:hover,
.status-filter.active {
  border-color: color-mix(in srgb, var(--status-accent) 48%, var(--line));
  background: var(--status-soft);
  color: var(--text);
}

.status-icon {
  display: grid;
  place-items: center;
  width: 23px;
  min-width: 23px;
  height: 23px;
  border: 1px solid color-mix(in srgb, var(--status-accent) 42%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--status-accent) 10%, transparent);
  color: var(--status-accent);
}

.status-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-action-icon svg,
.quick-action-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-label {
  min-width: max-content;
}

.status-count {
  margin-left: auto;
  min-width: 1.12rem;
  height: 1.12rem;
  background: transparent;
  color: var(--text);
  font-size: 0.74rem;
}

.dashboard-filter-row {
  margin-bottom: 0.92rem;
}

.dashboard-shortcuts-toggle,
.dashboard-shortcuts-popover {
  display: none;
}

.dashboard-tools {
  grid-template-columns: minmax(16rem, 1.45fr) minmax(15rem, 0.8fr) minmax(13rem, 0.7fr);
  gap: 0.78rem;
  align-items: end;
}

.filter-tools {
  grid-template-columns: minmax(14rem, 1.8fr) minmax(10rem, 1fr);
  gap: 0.72rem;
}

.order-tools {
  display: grid;
  grid-template-columns: minmax(8.5rem, 1fr) 46px auto;
  gap: 0.58rem;
}

.dashboard-sidebar-view-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px auto;
  gap: 0.42rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard-sidebar-view-controls .sort-field {
  width: 100%;
}

.dashboard-sidebar-view-controls .sort-field span {
  top: 0.34rem;
  left: 0.62rem;
  font-size: 0.65rem;
}

.dashboard-sidebar-view-controls .sort-field select {
  width: 100%;
  min-height: 40px;
  padding: 0.94rem 0.62rem 0.26rem;
  border-radius: 8px;
}

.dashboard-sidebar-view-controls .sort-direction {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 8px;
}

.dashboard-sidebar-view-controls .view-toggle {
  height: 40px;
  padding: 0.14rem;
  border-radius: 8px;
}

.dashboard-sidebar-view-controls .view-toggle button {
  width: 34px;
  height: 32px;
  min-height: 0;
  border-radius: 7px;
}

.search,
.sort-field,
.box-filter-group {
  gap: 0.28rem;
  position: relative;
}

.search span,
.sort-field span,
.box-filter-heading > span:first-child {
  position: absolute;
  top: 0.42rem;
  left: 0.72rem;
  z-index: 1;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1;
  pointer-events: none;
}

.search input,
.sort-field select {
  min-height: 47px;
  padding: 1.1rem 0.72rem 0.34rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 7%, transparent);
}

.sort-direction,
.clear-filters {
  min-height: 47px;
  border-radius: 8px;
}

.view-toggle {
  height: 47px;
  padding: 0.18rem;
  border-radius: 8px;
  background: var(--dashboard-glass);
}

.view-toggle button {
  width: 38px;
  height: 39px;
  border-radius: 7px;
}

.box-filter-group {
  display: grid;
  grid-template-columns: minmax(5.4rem, auto) minmax(0, 1fr);
  align-items: center;
  min-height: 47px;
  padding: 0.32rem 0.42rem 0.32rem 0.72rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 7%, transparent);
}

.box-filter-heading {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
  padding-top: 0.68rem;
}

.box-filter-heading > span:first-child {
  left: 0.72rem;
}

#boxFilterSummary {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.box-filter-list {
  overflow: visible;
  justify-content: stretch;
  padding-bottom: 0;
  scrollbar-width: auto;
}

.box-filter {
  flex: 0 0 auto;
  min-height: 31px;
  border-color: color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.dashboard-results-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto;
  grid-template-areas: "summary actions";
  gap: 0.7rem;
  align-items: center;
  height: 56px;
  margin-bottom: 0.66rem;
  padding: 0.42rem 0.5rem;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--line) 66%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--dashboard-shell) 82%, transparent);
}

.dashboard-results-row.has-selection {
  grid-template-columns: minmax(12rem, 1fr) auto;
  grid-template-areas: "summary selection";
}

.dashboard-result-summary {
  display: flex;
  gap: 0.58rem;
  align-items: center;
  min-width: 0;
}

.dashboard-manage-summary {
  grid-area: summary;
  display: flex;
  flex: 1 1 auto;
  gap: 0.52rem;
  align-items: center;
  height: 40px;
  min-width: 0;
}

.dashboard-manage-title {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-manage-summary #dashboardResultCount {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-selection-report {
  grid-area: selection;
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.62rem;
  align-items: center;
  height: 40px;
  width: auto;
  min-width: 0;
  max-width: none;
  justify-self: end;
  overflow: visible;
}

.dashboard-selection-report[hidden] {
  display: none;
}

.dashboard-selection-check {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 29px;
  min-width: 29px;
  height: 29px;
  min-height: 29px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--dashboard-green) 78%, var(--line));
  border-radius: 8px;
  background: var(--dashboard-green);
  color: #fff;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 26%, transparent);
}

.dashboard-selection-check:hover,
.dashboard-selection-check:focus-visible {
  background: #16885d;
  border-color: #16885d;
  color: #fff;
}

.dashboard-selection-check:disabled {
  color: color-mix(in srgb, #fff 78%, transparent);
  opacity: 0.58;
}

.selection-check-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.selection-check-mixed,
.dashboard-selection-check.is-partial .selection-check-mark {
  display: none;
}

.dashboard-selection-check.is-partial .selection-check-mixed {
  display: block;
}

.dashboard-selection-status {
  justify-self: start;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 820;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-selection-clear {
  justify-self: end;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  min-height: 38px;
  padding: 0.45rem 0.78rem;
  border-radius: 8px;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 780;
}

.dashboard-selection-clear:disabled {
  opacity: 0.5;
}

.dashboard-selection-bulk-menu {
  position: relative;
  display: block;
  justify-self: end;
  flex: 0 0 auto;
  width: auto;
  height: 40px;
  gap: 0;
}

.dashboard-bulk-actions {
  min-height: 38px;
  padding-inline: 0.9rem;
  border-radius: 8px;
  background: var(--dashboard-green);
  border-color: var(--dashboard-green);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 820;
}

.dashboard-bulk-actions:hover,
.dashboard-bulk-actions:focus-visible {
  background: #16885d;
  border-color: #16885d;
  color: #fff;
}

.dashboard-bulk-actions:disabled {
  background: color-mix(in srgb, var(--dashboard-green) 52%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--dashboard-green) 42%, var(--line));
  color: color-mix(in srgb, #fff 86%, var(--text));
}

.dashboard-selection-bulk-menu .dashboard-actions-popover {
  position: absolute;
  top: calc(100% + 0.42rem);
  right: 0;
  z-index: 28;
  width: min(17rem, calc(100vw - 2rem));
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-raised));
  box-shadow: var(--shadow);
}

.dashboard-results-row.has-selection .dashboard-manage-summary {
  flex: 1 1 auto;
}

.dashboard-results-row.has-selection .dashboard-manage-actions {
  display: none;
}

.dashboard-manage-actions {
  grid-area: actions;
  align-self: center;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.55rem;
  min-width: 0;
  height: 40px;
}

.dashboard-manage-actions .mass-generation-scope {
  min-width: 11rem;
}

.dashboard-manage-actions .mass-generation-summary {
  display: flex;
  align-items: center;
  height: 40px;
  min-height: 40px;
  max-width: 13rem;
  overflow: hidden;
  padding-block: 0;
  white-space: nowrap;
}

.dashboard-manage-actions .mass-generation-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-manage-actions .dashboard-actions-menu {
  position: relative;
  display: block;
  width: auto;
  height: 40px;
  gap: 0;
}

.dashboard-manage-actions .dashboard-actions-trigger {
  width: auto;
  height: 40px;
  min-height: 40px;
  padding-block: 0;
  padding-inline: 0.9rem;
  border-radius: 8px;
  background: var(--dashboard-green);
  border-color: var(--dashboard-green);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 820;
}

.dashboard-manage-actions #massGenerateDrafts {
  grid-area: auto;
}

.dashboard-manage-actions .dashboard-actions-trigger:hover,
.dashboard-manage-actions .dashboard-actions-trigger:focus-visible {
  background: #16885d;
  border-color: #16885d;
  color: #fff;
}

.dashboard-manage-actions .dashboard-actions-trigger:disabled {
  background: color-mix(in srgb, var(--dashboard-green) 52%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--dashboard-green) 42%, var(--line));
  color: color-mix(in srgb, #fff 86%, var(--text));
}

.dashboard-manage-actions .dashboard-actions-popover {
  position: absolute;
  top: calc(100% + 0.42rem);
  right: 0;
  z-index: 28;
  width: min(17rem, calc(100vw - 2rem));
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-raised));
  box-shadow: var(--shadow);
}

#dashboardResultCount {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 780;
  white-space: nowrap;
}

.dashboard-clear-filters {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 0.3rem 0;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font-weight: 760;
}

.dashboard-clear-filters:hover {
  background: transparent;
  color: var(--primary);
}

.mass-generation-panel {
  display: flex;
  grid-template-columns: none;
  grid-template-areas: none;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-selection-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: stretch;
  justify-content: stretch;
  justify-items: stretch;
  width: 100%;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#dashboardSelectionStatus {
  display: block;
  width: 100%;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 760;
  text-align: left;
  white-space: normal;
}

.secondary-action {
  min-height: 30px;
  border: 1px solid transparent;
}

.mass-generation-scope {
  min-width: min(25vw, 20rem);
}

.mass-generation-summary {
  min-height: 36px;
  padding-inline: 0.65rem;
  border-radius: 8px;
  background: var(--dashboard-glass);
}

#massGenerateDrafts {
  min-height: 38px;
  padding-inline: 0.9rem;
  border-radius: 8px;
  background: var(--dashboard-green);
  border-color: var(--dashboard-green);
  font-weight: 800;
}

#massGenerateDrafts:hover {
  background: #16885d;
  border-color: #16885d;
}

.item-list {
  gap: 0.82rem;
}

.item-list.cards {
  grid-template-columns: repeat(auto-fill, minmax(244px, 318px));
  justify-content: start;
}

.dashboard-main .item-list.cards.empty,
.item-list.cards.empty {
  grid-template-columns: 1fr;
}

.item-list.compact {
  border-radius: 8px;
  background: var(--dashboard-shell);
  box-shadow: var(--shadow);
}

.item-list.compact.empty {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.item-card {
  border-radius: 8px;
  background: var(--dashboard-shell);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.dashboard-empty-state {
  background: var(--dashboard-shell);
}

:root[data-theme="dark"] .item-card {
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: rgba(17, 19, 27, 0.78);
}

.item-card.selected {
  border-color: color-mix(in srgb, var(--primary) 68%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent), var(--shadow);
}

:root[data-theme="dark"] .item-card.selected {
  border-color: color-mix(in srgb, var(--primary-strong) 86%, var(--primary));
  background: color-mix(in srgb, var(--primary) 8%, rgba(17, 19, 27, 0.9));
  box-shadow:
    0 0 0 1px rgba(247, 244, 255, 0.18),
    0 0 0 3px color-mix(in srgb, var(--primary) 48%, transparent),
    var(--shadow);
}

.dashboard-thumb {
  aspect-ratio: 2.22 / 1;
  border-bottom-color: color-mix(in srgb, var(--line) 72%, transparent);
}

.dashboard-thumb img {
  object-fit: cover;
}

.item-card-select {
  top: 0.56rem;
  left: 0.56rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
}

:root[data-theme="dark"] .item-card-select {
  background: rgba(255, 255, 255, 0.18);
}

.item-card-media .badge {
  top: 0.56rem;
  right: 0.56rem;
  min-height: 28px;
  border-radius: 8px;
}

.item-card-body {
  gap: 0.72rem;
  padding: 0.82rem 0.9rem 0.9rem;
}

.card-copy {
  gap: 0.24rem;
}

.card-copy h3 {
  min-height: 0;
  font-size: 1rem;
  line-height: 1.2;
  -webkit-line-clamp: 2;
}

.sku {
  color: var(--muted);
  font-size: 0.78rem;
}

.item-price {
  margin-top: 0.22rem;
  font-size: 0.98rem;
  line-height: 1.2;
}

.stock-line,
.batch-line {
  font-size: 0.82rem;
}

.item-card-actions {
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 0.55rem;
}

.item-open-button,
.item-delete-button {
  min-height: 42px;
  border-radius: 8px;
}

.item-open-button {
  background: var(--dashboard-green);
  border-color: var(--dashboard-green);
}

.item-delete-button {
  border-color: color-mix(in srgb, var(--dashboard-danger) 42%, var(--line));
  color: var(--dashboard-danger);
  background: color-mix(in srgb, var(--dashboard-danger) 7%, transparent);
}

.compact-item-row {
  background: transparent;
}

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.65rem;
  margin-top: 1.05rem;
  padding: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: var(--dashboard-shell);
  box-shadow: var(--shadow);
}

.dashboard-quick-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  gap: 0.72rem;
  align-items: center;
  min-height: 64px;
  padding: 0.62rem 0.72rem;
  border-color: color-mix(in srgb, var(--line) 58%, transparent);
  border-radius: 8px;
  background: var(--dashboard-glass);
  text-align: left;
}

.dashboard-quick-action:hover {
  border-color: color-mix(in srgb, var(--primary) 46%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--dashboard-glass));
}

.quick-action-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  color: var(--primary-strong);
}

.quick-action-copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.quick-action-copy strong,
.quick-action-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-action-copy strong {
  font-size: 0.9rem;
}

.quick-action-copy span {
  color: var(--muted);
  font-size: 0.8rem;
}

.quick-action-arrow {
  justify-self: end;
}

.badge.draft,
.badge.ai_generated {
  background: color-mix(in srgb, #f2b643 22%, var(--surface));
  color: #f0bb4f;
  border: 1px solid color-mix(in srgb, #f2b643 42%, transparent);
}

.badge.needs_attention {
  border: 1px solid color-mix(in srgb, var(--red) 42%, transparent);
}

@media (max-width: 979px) {
  .add-item-workspace {
    grid-template-columns: 1fr;
  }

  .dashboard-tools {
    grid-template-columns: 1fr;
  }

  .dashboard-results-row {
    grid-template-columns: 1fr;
  }

  .mass-generation-panel {
    justify-content: space-between;
  }

  .dashboard-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  .dashboard-empty-state {
    min-height: 10.5rem;
  }

  .dashboard-pagination {
    align-items: stretch;
  }

  .pager-meta {
    justify-content: space-between;
  }

  .pager-meta,
  .pager-summary,
  .pager-controls,
  .pager-pages {
    width: 100%;
  }

  .pager-controls {
    justify-content: space-between;
  }

  .pager-pages {
    justify-content: center;
    order: 3;
  }

  .pager-nav {
    flex: 1 1 0;
  }

  body {
    font-size: 15px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.68rem;
    padding: 0.72rem;
  }

  .tabs {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr) 42px 62px;
    gap: 0.42rem;
    width: 100%;
  }

  .tabs > * {
    grid-column: auto;
    grid-row: auto;
  }

  .tab,
  .theme-toggle {
    min-height: 40px;
  }

  .tab[data-view="dashboard"] {
    grid-column: auto;
    grid-row: auto;
    display: grid;
    place-items: center;
    width: auto;
    min-width: 0;
    padding: 0;
    border-radius: 999px;
  }

  .tab[data-view="dashboard"] span {
    display: none;
  }

  .tab[data-view="dashboard"] .nav-icon {
    position: static;
  }

  .tab[data-view="new"],
  .tab[data-view="batch"] {
    grid-column: auto;
    grid-row: auto;
    display: inline-flex;
    gap: 0.36rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-inline: 0.5rem;
    font-size: 0.84rem;
    line-height: 1;
    white-space: nowrap;
  }

  .tab[data-view="new"] .nav-icon,
  .tab[data-view="batch"] .nav-icon {
    position: static;
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
  }

  .tab[data-view="new"] span,
  .tab[data-view="batch"] span {
    min-width: 0;
    overflow: hidden;
    line-height: 1;
    text-overflow: ellipsis;
  }

  .tab[data-view="settings"] {
    grid-column: auto;
    grid-row: auto;
    width: auto;
    min-width: 0;
  }

  .theme-toggle {
    grid-column: auto;
    grid-row: auto;
    width: auto;
    min-width: 0;
    padding-inline: 0.45rem;
  }

  .theme-toggle::after {
    font-size: 0.68rem;
  }

  main {
    padding: 0.64rem;
  }

  #dashboardView {
    min-height: calc(100dvh - 7.6rem);
  }

  .dashboard-status-strip {
    grid-template-columns: repeat(6, minmax(116px, 1fr));
    gap: 0.34rem;
    margin: 0 0 0.56rem;
    padding: 0.36rem;
  }

  .status-filter {
    min-height: 34px;
    gap: 0.42rem;
    padding: 0.28rem 0.46rem;
    font-size: 0.78rem;
  }

  .status-icon {
    width: 24px;
    min-width: 24px;
    height: 24px;
  }

  .status-icon svg {
    width: 15px;
    height: 15px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    min-height: 42px;
    margin-bottom: 0.74rem;
  }

  .dashboard-filter-toggle {
    display: inline-flex;
    grid-column: 2;
    justify-self: end;
  }

  .dashboard-filter-popover {
    position: absolute;
    top: calc(100% + 0.42rem);
    right: 0;
    z-index: 35;
    display: none;
    width: min(100%, 390px);
    max-height: min(72dvh, 620px);
    overflow: auto;
    gap: 0.62rem;
    padding: 0.66rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 94%, var(--bg));
    box-shadow: var(--shadow);
  }

  .toolbar.filters-open .dashboard-filter-popover {
    display: grid;
  }

  .filter-tools,
  .order-tools {
    grid-template-columns: 1fr;
  }

  .search input,
  .sort-field select,
  .sort-direction {
    min-height: 42px;
  }

  .view-toggle {
    justify-self: start;
    height: 42px;
  }

  .view-toggle button {
    width: 38px;
    height: 34px;
  }

  .dashboard-results-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.58rem;
    padding: 0.5rem;
  }

  .dashboard-result-summary,
  .dashboard-manage-summary {
    justify-content: space-between;
  }

  .mass-generation-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.52rem;
  }

  .dashboard-selection-controls,
  .mass-generation-scope,
  #massGenerateDrafts {
    grid-area: auto;
  }

  .dashboard-selection-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.34rem;
    align-items: center;
    justify-content: stretch;
    width: 100%;
    overflow: visible;
    padding: 0.38rem;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 8px;
    background: var(--dashboard-glass);
  }

  .dashboard-selection-controls > * {
    min-width: 0;
  }

  #dashboardSelectionStatus {
    grid-column: auto;
    text-align: left;
    overflow: visible;
    padding: 0;
    font-size: 0.78rem;
    text-overflow: clip;
    white-space: normal;
  }

  .dashboard-selection-controls .secondary-action {
    min-height: 28px;
    padding: 0.26rem 0.38rem;
    font-size: 0.74rem;
  }

  #dashboardSelectAll,
  #dashboardSelectDrafts,
  #dashboardClearSelection {
    width: 100%;
  }

  .mass-generation-scope {
    min-width: 0;
  }

  #massGenerateDrafts {
    width: 100%;
  }

  .item-list {
    gap: 0.62rem;
  }

  .item-list.cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-card-body {
    gap: 0.58rem;
    padding: 0.62rem;
  }

  .card-copy h3 {
    font-size: 0.9rem;
  }

  .sku,
  .stock-line,
  .batch-line {
    font-size: 0.74rem;
  }

  .item-card-actions {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 0.38rem;
  }

  .item-open-button,
  .item-delete-button {
    min-height: 38px;
  }

  .dashboard-quick-actions {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 1.1rem;
    padding: 0.58rem;
  }

  .dashboard-quick-action {
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    min-height: 72px;
    padding: 0.7rem;
  }

  .quick-action-icon {
    width: 42px;
    height: 42px;
  }

  body[data-view="new"],
  body[data-view="settings"] {
    background: var(--surface);
  }

  body[data-view="new"] main,
  body[data-view="settings"] main {
    max-width: none;
    padding: 0;
  }

  body[data-view="new"] #newView:not([hidden]) {
    display: grid;
    min-height: calc(100dvh - 7.1rem);
    padding: 0.58rem;
    align-content: start;
    background: var(--bg);
  }

  body[data-view="new"] #newItemForm {
    width: 100%;
    min-height: calc(100dvh - 8.25rem);
    margin: 0;
    border-radius: 8px 8px 0 0;
    border-inline: 0;
    border-bottom: 0;
    box-shadow: none;
  }

  body[data-view="new"] #newItemForm {
    grid-template-columns: 1fr;
    align-content: start;
  }
}

:root[data-theme="dark"] body[data-view="new"] {
  background: var(--bg);
}

:root[data-theme="dark"] body[data-view="new"] #newView:not([hidden]) {
  background: var(--bg);
}

:root[data-theme="dark"] body[data-view="new"] #newItemForm {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--surface-raised) 88%, #0d0f16);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

:root[data-theme="dark"] body[data-view="new"] #newItemForm label,
:root[data-theme="dark"] body[data-view="new"] .photo-uploader {
  color: var(--text);
}

:root[data-theme="dark"] body[data-view="new"] #newItemForm input,
:root[data-theme="dark"] body[data-view="new"] #newItemForm textarea,
:root[data-theme="dark"] body[data-view="new"] #newItemForm select {
  border-color: color-mix(in srgb, var(--line) 84%, transparent);
  background: color-mix(in srgb, var(--surface) 72%, #05070c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

:root[data-theme="dark"] body[data-view="new"] #newItemForm input:focus,
:root[data-theme="dark"] body[data-view="new"] #newItemForm textarea:focus,
:root[data-theme="dark"] body[data-view="new"] #newItemForm select:focus {
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

:root[data-theme="dark"] body[data-view="new"] .photo-uploader {
  margin-top: 0.2rem;
  padding: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

:root[data-theme="dark"] body[data-view="new"] .photo-action {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--surface-raised) 76%, #080a10);
}

:root[data-theme="dark"] body[data-view="new"] .photo-action.primary {
  border-color: color-mix(in srgb, var(--primary) 72%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 78%, #fff 8%), color-mix(in srgb, var(--primary) 68%, #251b61));
  color: #fff;
}

:root[data-theme="dark"] body[data-view="new"] .quick-approval-toggle {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
  background: color-mix(in srgb, var(--surface-raised) 72%, #080a10);
}

:root[data-theme="dark"] body[data-view="new"] #newItemForm {
  border: 0;
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] body[data-view="new"] .add-item-photos,
:root[data-theme="dark"] body[data-view="new"] .add-item-details {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--surface-raised) 88%, #0d0f16);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

:root[data-theme="dark"] body[data-view="new"] .add-item-save-bar {
  border-top-color: color-mix(in srgb, var(--primary) 22%, var(--line));
  background: color-mix(in srgb, var(--surface) 68%, transparent);
}

:root[data-theme="dark"] body[data-view="new"] .new-photo-drop-zone {
  border-color: color-mix(in srgb, var(--primary) 44%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 13%, transparent), transparent),
    color-mix(in srgb, var(--surface) 72%, #05070c);
}

:root[data-theme="dark"] body[data-view="new"] .new-photo-drop-zone:hover,
:root[data-theme="dark"] body[data-view="new"] .new-photo-drop-zone:focus-visible,
:root[data-theme="dark"] body[data-view="new"] .new-photo-drop-zone.drag-over {
  border-color: color-mix(in srgb, var(--primary) 72%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 18%, transparent), transparent),
    color-mix(in srgb, var(--surface) 80%, #05070c);
}

/* Sidebar dashboard concept */
.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(246px, 286px) minmax(0, 1fr) minmax(246px, 286px);
  gap: 1rem;
  align-items: start;
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100dvh - 1rem);
  min-width: 0;
}

.dashboard-shortcuts-rail[hidden] {
  display: none;
}

.dashboard-shortcuts-rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  align-content: start;
  max-height: calc(100dvh - 1rem);
  min-width: 0;
  overflow: hidden auto;
}

.dashboard-filter-row {
  margin: 0;
}

.dashboard-filter-toggle {
  display: none;
}

.dashboard-filter-popover {
  display: grid;
  gap: 0;
  overflow: hidden auto;
  max-height: calc(100dvh - 1rem);
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--dashboard-shell) 92%, transparent);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .dashboard-filter-popover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    rgba(12, 14, 21, 0.9);
}

.dashboard-sidebar-section {
  display: grid;
  gap: 0.72rem;
  padding: 0.9rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.dashboard-sidebar-section:last-child {
  border-bottom: 0;
}

.dashboard-sort-section {
  padding: 0.78rem 0.9rem;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.dashboard-sidebar-title {
  display: inline-flex;
  gap: 0.48rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-title-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.dashboard-sidebar .dashboard-status-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.28rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.dashboard-sidebar .status-filter {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 0.64rem;
  justify-items: start;
  min-height: 42px;
  padding: 0.32rem 0.52rem;
  border-radius: 8px;
  text-align: left;
}

.dashboard-sidebar .status-icon {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
}

.dashboard-sidebar .status-icon svg {
  width: 17px;
  height: 17px;
}

.dashboard-sidebar .status-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-sidebar .status-count {
  justify-self: end;
  min-width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 80%, transparent);
  color: var(--text);
}

.dashboard-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.76rem;
  align-items: stretch;
}

.dashboard-tools .search,
.dashboard-tools .sort-field,
.dashboard-tools .box-filter-group {
  max-width: none;
  width: 100%;
}

.dashboard-tools .search input,
.dashboard-tools .sort-field select {
  width: 100%;
}

.dashboard-tools .order-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px auto;
  gap: 0.46rem;
  align-items: end;
}

.dashboard-tools .sort-direction {
  width: 42px;
  min-height: 47px;
  padding: 0;
}

.dashboard-tools .view-toggle {
  justify-self: end;
}

.dashboard-tools .item-search-filter {
  padding-bottom: 0.74rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.dashboard-tools .box-filter-group {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.56rem;
  min-height: 0;
  padding: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 7%, transparent);
}

.dashboard-tools .box-filter-heading {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 0;
}

.dashboard-tools .box-filter-title-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.dashboard-tools .box-filter-heading > .box-filter-title-copy,
.dashboard-tools .box-filter-title-copy > span:first-child {
  position: static;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  pointer-events: auto;
}

.dashboard-tools .box-filter-title-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 680;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-tools .box-filter-clear {
  min-height: 1.8rem;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.dashboard-tools .box-filter-clear:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  color: var(--primary-strong);
}

.dashboard-tools .box-filter-clear:disabled {
  opacity: 0.44;
}

.dashboard-tools .box-filter-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  overflow: visible;
  width: 100%;
}

.dashboard-tools .inventory-text-search {
  max-width: none;
  width: 100%;
}

.dashboard-tools .inventory-text-search input {
  width: 100%;
}

.dashboard-tools .box-filter-divider {
  width: 100%;
  height: 1px;
  background: color-mix(in srgb, var(--line) 74%, transparent);
}

.dashboard-tools .storage-filter-groups-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-tools .box-filter-list .box-filter,
.dashboard-tools .storage-filter-scope,
.dashboard-tools .storage-filter-groups,
.dashboard-tools .storage-filter-group,
.dashboard-tools .storage-filter-options {
  width: 100%;
}

.dashboard-tools .box-filter-list .box-filter {
  position: relative;
  overflow: hidden;
}

.dashboard-tools .box-filter-list .box-filter.active {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  background: color-mix(in srgb, var(--primary) 17%, var(--surface));
  color: var(--text);
}

.dashboard-tools .box-filter-list .box-filter.active::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
  content: "";
}

.dashboard-tools .storage-filter-scope {
  display: grid;
  gap: 0.34rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  min-width: 0;
}

.dashboard-tools .storage-filter-scope-button {
  min-height: 44px;
  padding: 0.46rem 0.56rem;
  background: color-mix(in srgb, var(--surface-raised) 58%, transparent);
}

.dashboard-tools .storage-filter-scope-button strong {
  min-width: 1.42rem;
  height: 1.42rem;
}

.dashboard-tools .storage-filter-options {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-tools .storage-filter-groups {
  gap: 0.22rem;
}

.dashboard-tools .storage-filter-group {
  overflow: visible;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  border-radius: 0;
  background: transparent;
}

.dashboard-tools .storage-filter-groups-label + .storage-filter-group {
  border-top: 0;
}

.dashboard-tools .storage-filter-group.active,
.dashboard-tools .storage-filter-group.contains-active:not(.active) {
  border-color: color-mix(in srgb, var(--line) 68%, transparent);
  background: transparent;
}

.dashboard-tools .storage-filter-group summary {
  padding: 0.5rem 0;
}

.dashboard-tools .storage-filter-group-body {
  padding: 0 0 0.48rem;
}

.dashboard-tools .storage-filter-group-select {
  min-width: 1.8rem;
  justify-content: center;
  padding: 0.18rem 0.28rem;
}

.dashboard-tools .box-filter-group {
  container-type: inline-size;
}

@container (min-width: 24rem) {
  .dashboard-tools .storage-filter-scope {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-tools .storage-filter-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (min-width: 38rem) {
  .dashboard-tools .storage-filter-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dashboard-sidebar .mass-generation-panel {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: none;
  gap: 0.72rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-sidebar .mass-generation-scope,
.dashboard-sidebar #massGenerateDrafts {
  grid-area: auto;
}

.dashboard-sidebar .dashboard-selection-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.56rem;
  align-items: stretch;
  justify-content: stretch;
  justify-items: stretch;
  justify-self: stretch;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  text-align: left;
}

.dashboard-sidebar .dashboard-selection-controls > * {
  grid-column: auto;
  min-width: 0;
}

.dashboard-sidebar #dashboardSelectionStatus {
  display: block;
  justify-self: stretch;
  align-self: auto;
  grid-column: auto;
  width: 100%;
  overflow: visible;
  padding: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 760;
  text-align: left;
  text-overflow: clip;
  white-space: normal;
}

.dashboard-sidebar .dashboard-selection-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.42rem;
  width: 100%;
}

.dashboard-sidebar .dashboard-selection-controls .secondary-action {
  display: inline-flex;
  align-items: center;
  grid-column: auto;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  min-height: 38px;
  padding: 0.42rem 0.58rem;
  border-color: color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--surface-raised) 58%, transparent);
  color: var(--text);
  font-size: 0.8rem;
  text-align: left;
}

.dashboard-sidebar #dashboardClearSelection {
  grid-column: auto;
}

.dashboard-sidebar .secondary-action-icon {
  width: 15px;
  min-width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-sidebar .secondary-action-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-sidebar .dashboard-selection-controls .secondary-action:disabled {
  border-color: color-mix(in srgb, var(--line) 44%, transparent);
  background: color-mix(in srgb, var(--surface-raised) 22%, transparent);
  color: var(--muted);
  opacity: 0.62;
}

.dashboard-sidebar #dashboardClearSelection:disabled {
  display: inline-flex;
  visibility: visible;
  pointer-events: none;
  opacity: 0.52;
}

.dashboard-sidebar .dashboard-selection-section {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "selection-title"
    "selection-status"
    "selection-controls" !important;
  align-items: stretch;
  justify-items: stretch;
  gap: 0.5rem;
  text-align: left;
}

.dashboard-sidebar .dashboard-selection-section > .dashboard-sidebar-title {
  display: flex;
  grid-area: selection-title;
  width: 100%;
}

.dashboard-sidebar .dashboard-selection-section .dashboard-selection-controls {
  box-sizing: border-box;
  grid-area: selection-controls;
  width: 100%;
  max-width: none;
  align-items: stretch;
  justify-items: stretch;
  justify-content: stretch;
}

.dashboard-sidebar .dashboard-selection-section #dashboardSelectionStatus {
  display: block;
  grid-area: selection-status;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  text-align: left;
}

.dashboard-sidebar .dashboard-selection-section .dashboard-selection-actions,
.dashboard-sidebar .dashboard-selection-section .dashboard-selection-actions .secondary-action {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}

.dashboard-sidebar .dashboard-selection-section .dashboard-selection-actions {
  justify-self: stretch;
}

.dashboard-sidebar .dashboard-selection-section > #dashboardSelectionStatus,
.dashboard-sidebar .dashboard-selection-section > .dashboard-selection-controls,
.dashboard-sidebar .dashboard-selection-section .dashboard-selection-actions {
  justify-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
}

.dashboard-sidebar .dashboard-selection-section > #dashboardSelectionStatus {
  text-align: left !important;
}

.dashboard-sidebar .dashboard-selection-section > .dashboard-selection-controls {
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: stretch !important;
}

.dashboard-sidebar .dashboard-selection-section .dashboard-selection-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

.dashboard-selection-section .dashboard-selection-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.42rem;
  width: 100%;
}

.dashboard-selection-section .dashboard-selection-controls .secondary-action {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 0.5rem;
  width: 100%;
  min-height: 38px;
  padding: 0.42rem 0.58rem;
  border-color: color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--surface-raised) 58%, transparent);
  color: var(--text);
  font-size: 0.8rem;
  text-align: left !important;
}

.dashboard-selection-section #dashboardClearSelection:disabled {
  display: inline-flex !important;
  visibility: visible;
  pointer-events: none;
  opacity: 0.52;
}

.dashboard-sidebar .mass-generation-scope {
  min-width: 0;
}

.dashboard-sidebar .mass-generation-summary {
  min-height: 0;
  padding: 0.7rem 0.76rem;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 54%, transparent);
}

.dashboard-sidebar .mass-generation-summary .muted {
  display: block;
  margin-bottom: 0.32rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-sidebar .mass-generation-summary strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: normal;
}

.dashboard-sidebar #massGenerateDrafts {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.dashboard-sidebar .dashboard-quick-actions {
  grid-template-columns: 1fr;
  gap: 0.48rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-sidebar .dashboard-quick-action {
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  min-height: 52px;
  padding: 0.5rem;
}

.dashboard-sidebar .quick-action-icon {
  width: 34px;
  height: 34px;
}

.dashboard-shortcuts-rail .dashboard-shortcuts-section {
  display: grid;
  align-self: start;
  gap: 0.72rem;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--dashboard-shell) 92%, transparent);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .dashboard-shortcuts-rail .dashboard-shortcuts-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    rgba(12, 14, 21, 0.9);
}

.dashboard-shortcuts-rail .dashboard-quick-actions {
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-shortcuts-rail .dashboard-quick-action {
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  min-height: 54px;
  padding: 0.52rem;
}

.dashboard-shortcuts-rail .quick-action-icon {
  width: 34px;
  height: 34px;
}

.dashboard-main {
  display: grid;
  gap: 0.72rem;
  min-width: 0;
}

.dashboard-main .dashboard-results-row {
  display: grid;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0;
}

.dashboard-main .dashboard-result-summary,
.dashboard-main .dashboard-manage-summary {
  flex: 1 1 auto;
  width: auto;
}

.dashboard-main .item-list.cards {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

@media (min-width: 980px) {
  .dashboard-sidebar-section {
    gap: 0.58rem;
    padding: 0.78rem 0.84rem;
  }

  .dashboard-sidebar-title {
    font-size: 0.72rem;
  }

  .dashboard-sidebar .dashboard-status-strip {
    gap: 0.22rem;
  }

  .dashboard-sidebar .status-filter {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 0.56rem;
    min-height: 38px;
    padding: 0.26rem 0.46rem;
  }

  .dashboard-sidebar .status-icon {
    width: 28px;
    min-width: 28px;
    height: 28px;
    border-radius: 7px;
  }

  .dashboard-sidebar .status-icon svg {
    width: 16px;
    height: 16px;
  }

  .dashboard-sidebar .status-count {
    min-width: 1.55rem;
    height: 1.55rem;
  }

  .dashboard-tools {
    gap: 0.58rem;
  }

  .dashboard-tools .box-filter-group {
    padding: 0.62rem;
  }

  .dashboard-tools .box-filter-heading {
    gap: 0.18rem;
    padding: 0;
  }

  .dashboard-sidebar .box-filter-title-copy > span:first-child {
    position: static;
    font-size: 0.78rem;
    line-height: 1;
  }

  .dashboard-sidebar .dashboard-selection-section {
    gap: 0.42rem;
  }

  .dashboard-sidebar .dashboard-selection-controls {
    gap: 0.42rem;
  }

  .dashboard-sidebar .dashboard-selection-actions {
    gap: 0.32rem;
  }

  .dashboard-sidebar .dashboard-selection-controls .secondary-action {
    min-height: 32px;
    padding-inline: 0.26rem;
    font-size: 0.75rem;
  }

  .dashboard-sidebar .mass-generation-panel {
    gap: 0.54rem;
  }

  .dashboard-sidebar .mass-generation-summary {
    padding: 0.58rem 0.66rem;
  }

  .dashboard-sidebar .mass-generation-summary strong {
    font-size: 0.9rem;
    line-height: 1.28;
  }

  .dashboard-sidebar #massGenerateDrafts {
    min-height: 40px;
  }
}

@media (min-width: 1280px) {
  .dashboard-main .item-list.cards {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
}

@media (min-width: 980px) and (max-width: 1180px) {
  .dashboard-layout {
    grid-template-columns: minmax(226px, 252px) minmax(0, 1fr) minmax(226px, 252px);
    gap: 0.78rem;
  }

  .dashboard-shortcuts-rail .dashboard-quick-action {
    grid-template-columns: 30px minmax(0, 1fr) 16px;
    gap: 0.5rem;
    padding: 0.46rem;
  }

  .dashboard-shortcuts-rail .quick-action-icon {
    width: 30px;
    height: 30px;
  }

  .dashboard-shortcuts-rail .quick-action-copy span {
    display: none;
  }
}

@media (max-width: 979px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .dashboard-sidebar {
    position: relative;
    top: auto;
    max-height: none;
    z-index: 12;
  }

  .dashboard-shortcuts-rail {
    display: none;
  }

  .dashboard-filter-row {
    position: relative;
    display: grid;
    min-height: 0;
    margin-bottom: 0;
  }

  .dashboard-filter-toggle {
    display: inline-flex;
    gap: 0.42rem;
    align-items: center;
    justify-self: start;
    min-height: 38px;
    border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
    background: color-mix(in srgb, var(--dashboard-glass) 86%, transparent);
    font-weight: 760;
  }

  .dashboard-filter-popover {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    max-height: min(78dvh, 680px);
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 98%, #fff 2%), var(--surface));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  :root[data-theme="dark"] .dashboard-filter-popover {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
      #0c0e15;
  }

  .toolbar.filters-open .dashboard-filter-popover {
    display: grid;
  }

  .dashboard-main .dashboard-results-row {
    padding: 0.5rem;
  }
}

@media (min-width: 720px) and (max-width: 979px) {
  .dashboard-filter-row {
    position: static;
    margin-bottom: 0;
  }

  .dashboard-filter-toggle {
    display: none;
  }

  .dashboard-filter-popover {
    position: static;
    display: grid;
    width: auto;
    max-height: none;
    overflow: hidden auto;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--dashboard-shell) 92%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  :root[data-theme="dark"] .dashboard-filter-popover {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
      rgba(12, 14, 21, 0.9);
  }
}

@media (max-width: 719px) {
  .topbar {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "nav";
    gap: 0.72rem;
    align-items: start;
    padding: 0.86rem 0.92rem 0.72rem;
  }

  .brand-block {
    grid-area: brand;
    min-width: 0;
    padding-right: 3.25rem;
  }

  .brand-button h1 {
    font-size: 1.16rem;
    line-height: 1.08;
  }

  #modeLine {
    max-width: 100%;
    margin-top: 0.18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tabs {
    grid-area: nav;
    display: grid;
    grid-template-columns: minmax(5.8rem, 0.75fr) minmax(8rem, 1fr) 42px;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
  }

  #mobileDashboardControls {
    display: none;
  }

  .theme-toggle {
    position: absolute;
    top: 0.86rem;
    right: 0.92rem;
    display: grid;
    place-items: center;
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 999px;
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    color: var(--muted);
    box-shadow: none;
  }

  .theme-toggle::after {
    display: none;
  }

  .theme-toggle[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--amber) 28%, var(--line));
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    color: var(--amber);
  }

  .theme-toggle .theme-icon {
    width: 16px;
    height: 16px;
  }

  .mobile-controls-tab {
    display: grid;
    place-items: center;
    width: auto;
    min-width: 0;
    padding: 0;
    border-radius: 999px;
  }

  .mobile-controls-tab .nav-icon,
  .tab[data-view="dashboard"] .nav-icon,
  .tab[data-view="settings"] .nav-icon {
    position: static;
    width: 16px;
    height: 16px;
  }

  .tab[data-view="dashboard"] {
    grid-column: 1;
    grid-row: 1;
    display: inline-flex;
    gap: 0.42rem;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-height: 42px;
    padding-inline: 0.65rem;
    border-radius: 8px;
  }

  .tab[data-view="dashboard"] span {
    display: inline;
    min-width: 0;
    overflow: hidden;
    font-size: 0.86rem;
    line-height: 1;
    text-overflow: ellipsis;
  }

  #addItemMenuButton {
    grid-column: 2;
    grid-row: 1;
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding-inline: 0.7rem;
    border-radius: 8px;
  }

  #addItemMenuButton .nav-icon {
    position: static;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
  }

  #addItemMenuButton span {
    font-size: 0.86rem;
    line-height: 1;
  }

  .tab[data-view="settings"] {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    min-width: 0;
    min-height: 42px;
  }

  .dashboard-layout {
    gap: 0;
  }

  .dashboard-sidebar {
    display: none;
  }

  .dashboard-main {
    gap: 0.5rem;
  }

  .dashboard-main .dashboard-results-row {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "summary summary"
      "actions filters";
    align-items: center;
    gap: 0.5rem;
    min-height: 0;
    padding: 0.5rem 0.64rem 0.64rem;
  }

  .dashboard-main .dashboard-results-row.has-selection {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas:
      "summary summary summary"
      "selection selection filters";
  }

  .dashboard-main .dashboard-result-summary,
  .dashboard-main .dashboard-manage-summary {
    grid-area: summary;
    justify-content: space-between;
    text-align: left;
  }

  .dashboard-main .dashboard-selection-report {
    grid-area: selection;
  }

  .dashboard-main .dashboard-manage-actions {
    grid-area: actions;
    justify-self: stretch;
    width: 100%;
  }

  .dashboard-main .dashboard-manage-actions .dashboard-actions-menu,
  .dashboard-main .dashboard-manage-actions .dashboard-actions-trigger {
    width: 100%;
  }

  .dashboard-filter-row {
    position: static;
    display: grid;
    grid-area: filters;
    grid-template-columns: auto;
    gap: 0.46rem;
    justify-items: end;
    align-self: start;
    justify-self: end;
    min-height: 0;
    margin: 0;
  }

  .dashboard-filter-toggle,
  .dashboard-shortcuts-toggle {
    display: inline-flex;
    grid-column: 1;
    gap: 0.42rem;
    align-items: center;
    justify-self: end;
    margin-left: -0.02rem;
    min-height: 38px;
    padding: 0.44rem 0.68rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 760;
  }

  .dashboard-shortcuts-toggle {
    display: none;
    grid-column: 2;
    border-color: color-mix(in srgb, var(--amber) 38%, var(--line));
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--amber) 14%, transparent), transparent),
      color-mix(in srgb, var(--surface) 84%, transparent);
    color: color-mix(in srgb, var(--text) 88%, var(--amber));
  }

  .dashboard-filter-toggle span {
    font-size: 0;
  }

  .dashboard-filter-toggle span::after {
    content: "Filters";
    font-size: 0.84rem;
  }

  .shortcuts-toggle-icon,
  .filter-toggle-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .dashboard-shortcuts-toggle span {
    font-size: 0.84rem;
  }

  .dashboard-filter-popover,
  .dashboard-shortcuts-popover {
    position: fixed;
    inset: 0;
    z-index: 70;
    place-items: center;
    width: auto;
    max-height: none;
    min-height: 100dvh;
    overflow: auto;
    padding: calc(0.72rem + env(safe-area-inset-top)) 0.72rem calc(0.72rem + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: rgba(8, 10, 14, 0.44);
    box-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .dashboard-filter-popover {
    place-items: start center;
    padding: calc(0.72rem + env(safe-area-inset-top)) 0.72rem calc(0.72rem + env(safe-area-inset-bottom));
  }

  :root[data-theme="dark"] .dashboard-filter-popover,
  :root[data-theme="dark"] .dashboard-shortcuts-popover {
    background: rgba(2, 3, 6, 0.58);
  }

  .dashboard-filter-sheet,
  .dashboard-shortcuts-sheet {
    display: grid;
    gap: 0;
    width: min(100%, 430px);
    max-height: calc(100dvh - 1.08rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow: auto;
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    border-radius: 12px;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 98%, #fff 2%), var(--surface));
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.32);
  }

  :root[data-theme="dark"] .dashboard-filter-sheet,
  :root[data-theme="dark"] .dashboard-shortcuts-sheet {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
      #0c0e15;
  }

  .toolbar.shortcuts-open .dashboard-shortcuts-popover {
    display: grid;
  }

  .dashboard-filter-sheet .dashboard-status-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .dashboard-filter-sheet .status-filter {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 0.58rem;
    min-height: 42px;
    padding: 0.32rem 0.52rem;
    border-radius: 8px;
  }

  .dashboard-filter-sheet .dashboard-status-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-filter-sheet .status-icon {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .dashboard-filter-sheet .status-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dashboard-filter-close,
  .dashboard-shortcuts-close {
    display: grid;
    place-items: center;
    align-self: start;
    justify-self: end;
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    margin: 0.52rem 0.52rem 0 0;
    padding: 0;
    border-radius: 999px;
    border-color: color-mix(in srgb, var(--line) 74%, transparent);
    background: transparent;
    color: var(--muted);
  }

  .dashboard-filter-close svg,
  .dashboard-shortcuts-close svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .dashboard-shortcuts-head {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.64rem 0.52rem 0 0.78rem;
  }

  .dashboard-shortcuts-head h2 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 820;
    line-height: 1.1;
  }

  .dashboard-sidebar-section {
    padding: 0.78rem;
  }

  .dashboard-filter-sheet .dashboard-shortcuts-section {
    display: none;
  }

  .mobile-dashboard-quick-actions {
    gap: 0.52rem;
    padding: 0.78rem;
  }

  .mobile-dashboard-quick-actions .dashboard-quick-action {
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    min-height: 56px;
    padding: 0.52rem;
  }

  .mobile-dashboard-quick-actions .quick-action-icon {
    width: 36px;
    height: 36px;
  }

  .dashboard-filter-sheet .dashboard-listings-section {
    padding-top: 0.54rem;
  }

  .dashboard-filter-sheet .box-filter-group {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.48rem;
    min-height: 0;
    padding: 0.68rem;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 76%, transparent);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 7%, transparent);
  }

  .dashboard-filter-sheet .search input {
    min-height: 43px;
    padding: 1.02rem 0.68rem 0.34rem;
  }

  .dashboard-filter-sheet .search span,
  .dashboard-filter-sheet .box-filter-heading > span:first-child {
    top: 0.52rem;
    left: 0.68rem;
    font-size: 0.68rem;
    font-weight: 700;
  }

  .dashboard-filter-sheet .box-filter-heading {
    gap: 0.2rem;
    padding-top: 0;
  }

  .dashboard-filter-sheet .box-filter-heading > span:first-child {
    position: static;
  }

  .dashboard-filter-sheet .box-filter-title-copy > span:first-child {
    font-size: 0.8rem;
  }

  .dashboard-filter-sheet #boxFilterSummary {
    font-size: 0.86rem;
    line-height: 1;
  }

  .dashboard-filter-sheet .box-filter-list {
    gap: 0.38rem;
    justify-content: flex-start;
  }

  .dashboard-sidebar .status-filter {
    min-height: 38px;
  }

  .dashboard-sidebar-view-controls {
    justify-self: stretch;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 40px auto;
  }

  .dashboard-sidebar-view-controls .view-toggle {
    justify-self: end;
  }

  .dashboard-main .item-list.cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .tabs {
    grid-template-columns: minmax(6rem, 0.72fr) minmax(8.5rem, 1fr) 40px;
  }

  body[data-view="dashboard"] .dashboard-main .dashboard-results-row.has-selection {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "summary"
      "selection"
      "filters";
  }

  body[data-view="detail"] .detail-action-bar button {
    white-space: normal;
  }
}

.dashboard-selection-section .dashboard-selection-controls {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: stretch !important;
  width: 100% !important;
}

.dashboard-selection-section .dashboard-selection-actions {
  display: grid !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.42rem !important;
  justify-self: stretch !important;
  width: 100% !important;
}

.dashboard-selection-section .dashboard-selection-controls .secondary-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.5rem !important;
  width: 100% !important;
  min-height: 38px;
  padding: 0.42rem 0.58rem !important;
  text-align: left !important;
}

.dashboard-selection-section .secondary-action-icon {
  width: 15px;
  min-width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-selection-section .secondary-action-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-selection-section #dashboardClearSelection:disabled {
  display: inline-flex !important;
  visibility: visible !important;
  pointer-events: none;
  opacity: 0.52;
}

.dashboard-selection-report #dashboardSelectionStatus {
  flex: 0 1 auto;
  width: auto;
  overflow: hidden;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 820;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 719px) {
  .dashboard-results-row {
    height: auto;
    min-height: 56px;
  }

  .dashboard-selection-report {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    height: auto;
  }

  .dashboard-selection-clear,
  .dashboard-selection-bulk-menu {
    grid-column: span 1;
    width: 100%;
  }

  .dashboard-bulk-actions {
    width: 100%;
  }

  .dashboard-selection-bulk-menu .dashboard-actions-popover {
    right: auto;
    left: 0;
    width: min(17rem, calc(100vw - 2rem));
  }
}

@media (max-width: 719px) {
  .compact-item-row.selection-disabled {
    grid-template-columns: 40px minmax(0, 1fr) 78px 32px;
  }

  .compact-item-row.selection-disabled .compact-thumb {
    grid-column: 1;
  }

  .compact-item-row.selection-disabled .compact-item-main {
    grid-column: 2;
  }

  .compact-item-row.selection-disabled .compact-price-editor {
    grid-column: 3;
  }

  .compact-item-row.selection-disabled .compact-delete-button {
    grid-column: 4;
  }
}

.analytics-layout {
  display: grid;
  gap: 1rem;
  justify-items: center;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  --analytics-positive: #1f7a57;
  --analytics-positive-soft: #e5f3ec;
}

:root[data-theme="dark"] .analytics-layout {
  --analytics-positive: #74dfa7;
  --analytics-positive-soft: #183126;
}

.analytics-head {
  display: grid;
  gap: 1rem;
  align-items: end;
}

.analytics-title {
  min-width: 0;
}

.analytics-title h2 {
  margin-bottom: 0.1rem;
}

.analytics-controls {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  align-items: end;
}

.analytics-controls label,
.analytics-metric,
.analytics-chart-panel,
.analytics-table-panel,
.sale-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.analytics-controls label {
  display: grid;
  gap: 0.35rem;
  padding: 0.68rem;
  box-shadow: none;
}

.analytics-controls span,
.analytics-metric span,
.sale-cost-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.analytics-controls input,
.analytics-controls select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  background: var(--surface-raised);
  color: var(--text);
}

#analyticsRefresh {
  align-self: stretch;
  min-height: 100%;
}

.analytics-debug-control {
  align-content: center;
}

.analytics-toggle-line {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.35rem;
}

.analytics-toggle-line input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--primary);
}

.analytics-chart-head {
  gap: 0.75rem;
}

.analytics-table-head {
  gap: 0.75rem;
}

.analytics-chart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

.analytics-mode-toggle {
  display: inline-flex;
  gap: 0.18rem;
  align-items: center;
  padding: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.analytics-mode-toggle button {
  min-height: 28px;
  padding: 0.28rem 0.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: none;
}

.analytics-mode-toggle button.active {
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
  color: var(--primary-strong);
}

.analytics-chart-action {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 8px;
}

.analytics-chart-action svg {
  width: 16px;
  height: 16px;
}

.analytics-csv-export {
  display: inline-flex;
  gap: 0.42rem;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.analytics-csv-export svg {
  width: 16px;
  height: 16px;
}

.analytics-card-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.analytics-summary-cards {
  position: sticky;
  top: 5.75rem;
  z-index: 4;
  padding: 0.25rem 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}

.analytics-inventory-panel {
  display: grid;
  gap: 0.75rem;
}

.analytics-insight-panel {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.analytics-insight-head {
  align-items: start;
  gap: 0.75rem;
}

.analytics-insight-field {
  display: grid;
  gap: 0.35rem;
}

.analytics-insight-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.analytics-insight-field textarea {
  width: 100%;
  min-height: 4.6rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: var(--surface-raised);
  color: var(--text);
}

.analytics-insight-result {
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface-raised));
}

.analytics-insight-result[hidden] {
  display: none;
}

.analytics-insight-summary {
  font-weight: 700;
  line-height: 1.45;
}

.analytics-insight-error {
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--red) 55%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--red-soft) 62%, var(--surface-raised));
  color: var(--red);
  font-weight: 700;
  line-height: 1.45;
}

.analytics-insight-list {
  display: grid;
  gap: 0.35rem;
}

.analytics-insight-list ul {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding-left: 1.15rem;
}

.analytics-metric {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  align-content: start;
  border-top-width: 3px;
}

.analytics-metric strong {
  font-size: 1.35rem;
  line-height: 1.05;
}

.analytics-metric small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.analytics-metric-invested {
  border-top-color: var(--blue);
}

.analytics-metric-profit,
.analytics-metric-roi {
  min-height: 7rem;
}

.analytics-metric-positive {
  border-top-color: var(--analytics-positive);
  background: linear-gradient(180deg, color-mix(in srgb, var(--analytics-positive-soft) 58%, var(--surface)) 0%, var(--surface) 72%);
}

.analytics-metric-positive strong {
  color: var(--analytics-positive);
}

.analytics-metric-watch {
  border-top-color: var(--amber);
  background: linear-gradient(180deg, color-mix(in srgb, var(--amber-soft) 62%, var(--surface)) 0%, var(--surface) 72%);
}

.analytics-metric-watch strong {
  color: var(--amber);
}

.analytics-metric-negative {
  border-top-color: var(--red);
  background: linear-gradient(180deg, color-mix(in srgb, var(--red-soft) 62%, var(--surface)) 0%, var(--surface) 72%);
}

.analytics-metric-negative strong {
  color: var(--red);
}

.analytics-chart-grid {
  display: grid;
  gap: 1rem;
  justify-items: center;
  width: 100%;
}

.analytics-chart-panel-wide {
  grid-column: 1 / -1;
}

.analytics-chart-panel,
.analytics-table-panel {
  min-width: 0;
  width: 100%;
  padding: 1rem;
}

.analytics-chart-frame {
  min-width: 0;
  height: 320px;
}

.analytics-chart-panel-wide .analytics-chart-frame {
  width: 100%;
  min-height: 320px;
  max-height: min(760px, 72vh);
  aspect-ratio: 16 / 9;
  height: auto;
}

.analytics-chart-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.analytics-table-scroll {
  margin-inline: -1rem;
  padding-inline: 1rem;
  overflow-x: auto;
}

.analytics-table {
  width: max(100%, 2101px);
  min-width: 2101px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.analytics-width-group {
  width: 6%;
}

.analytics-width-supplier {
  width: 13.8%;
}

.analytics-width-purchased {
  width: 5.8%;
}

.analytics-width-items {
  width: 3.6%;
}

.analytics-width-sold {
  width: 10.8%;
}

.analytics-width-stock {
  width: 8.8%;
}

.analytics-width-batch-cost {
  width: 5.3%;
}

.analytics-width-cost-item {
  width: 5%;
}

.analytics-width-stock-cost {
  width: 5.5%;
}

.analytics-width-takings {
  width: 5%;
}

.analytics-width-avg-sold {
  width: 5.6%;
}

.analytics-width-score {
  width: 5.72%;
}

.analytics-width-listing-time {
  width: 6%;
}

.analytics-width-profit {
  width: 6.4%;
}

.analytics-width-roi {
  width: 6.2%;
}

.analytics-width-stock-value {
  width: 7.4%;
}

.analytics-width-stock-potential {
  width: 6.4%;
}

.analytics-width-age {
  width: 3.7%;
}

.analytics-table th,
.analytics-table td {
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}

.analytics-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.analytics-group-row th {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 0;
  color: color-mix(in srgb, var(--text) 68%, var(--muted));
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.analytics-column-row th {
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
}

.analytics-table .analytics-group-start {
  border-left: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.analytics-table th.analytics-col-batch,
.analytics-table td.analytics-col-batch {
  background: color-mix(in srgb, var(--surface-raised) 72%, var(--surface));
}

.analytics-table th.analytics-col-inventory,
.analytics-table td.analytics-col-inventory {
  background: color-mix(in srgb, var(--green-soft) 46%, var(--surface));
}

.analytics-table th.analytics-col-investment,
.analytics-table td.analytics-col-investment {
  background: color-mix(in srgb, var(--amber-soft) 40%, var(--surface));
}

.analytics-table th.analytics-col-performance,
.analytics-table td.analytics-col-performance {
  background: color-mix(in srgb, var(--blue-soft) 46%, var(--surface));
}

.analytics-table th.analytics-col-opportunity,
.analytics-table td.analytics-col-opportunity {
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.analytics-table th.analytics-col-velocity,
.analytics-table td.analytics-col-velocity {
  background: color-mix(in srgb, var(--surface-raised) 86%, var(--bg));
}

.analytics-table tbody tr:hover td {
  box-shadow: inset 0 999px 0 color-mix(in srgb, var(--primary) 4%, transparent);
}

.analytics-sort-button {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: inherit;
  box-shadow: none;
}

.analytics-sort-button:hover,
.analytics-sort-button.active {
  color: var(--primary-strong);
}

.analytics-sort-indicator {
  display: inline-grid;
  place-items: center;
  width: 1ch;
  color: var(--primary-strong);
  font-size: 0.72rem;
}

.analytics-table tr.unbatched td {
  box-shadow: inset 0 999px 0 color-mix(in srgb, var(--amber-soft) 32%, transparent);
}

.analytics-table td.analytics-cell-risk {
  position: relative;
}

.analytics-table td.analytics-cell-risk::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 3px;
  background: var(--red);
  pointer-events: none;
}

.analytics-table tr.analytics-row-stock-priority td.analytics-col-opportunity,
.analytics-table tr.analytics-row-stock-priority td.analytics-col-inventory {
  box-shadow: inset 0 999px 0 color-mix(in srgb, var(--amber) 5%, transparent);
}

.analytics-table tr.analytics-row-stock-priority td.analytics-cell-risk {
  box-shadow: inset 0 999px 0 color-mix(in srgb, var(--amber) 5%, transparent);
}

.analytics-table tbody tr.analytics-row-stock-priority:hover td.analytics-cell-risk {
  box-shadow: inset 0 999px 0 color-mix(in srgb, var(--primary) 4%, transparent);
}

.analytics-batch-identity {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  white-space: normal;
}

.analytics-batch-identity strong {
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.analytics-batch-identity > span {
  color: var(--muted);
  font-size: 0.8rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.analytics-supplier-cell {
  white-space: normal;
}

.analytics-supplier-cell > span,
.analytics-supplier-cell > a {
  overflow-wrap: anywhere;
}

.analytics-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 240px;
}

.analytics-signal-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.28rem;
  max-width: 100%;
  padding: 0.13rem 0.38rem;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, var(--primary) 8%);
  color: var(--primary-strong);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.analytics-signal-positive {
  border-color: color-mix(in srgb, var(--analytics-positive) 38%, var(--line));
  background: color-mix(in srgb, var(--analytics-positive-soft) 70%, var(--surface));
  color: var(--analytics-positive);
}

.analytics-signal-negative {
  border-color: color-mix(in srgb, var(--red) 42%, var(--line));
  background: color-mix(in srgb, var(--red-soft) 68%, var(--surface));
  color: var(--red);
}

.analytics-signal-watch,
.analytics-signal-stock {
  border-color: color-mix(in srgb, var(--amber) 38%, var(--line));
  background: color-mix(in srgb, var(--amber-soft) 72%, var(--surface));
  color: var(--amber);
}

.analytics-value-stack {
  display: grid;
  gap: 0.24rem;
}

.analytics-value-stack strong {
  font-weight: 760;
}

.analytics-value-emphasis strong {
  font-size: 1rem;
  font-weight: 900;
}

.analytics-value-positive strong {
  color: var(--analytics-positive);
}

.analytics-value-watch strong {
  color: var(--amber);
}

.analytics-value-negative strong {
  color: var(--red);
}

.analytics-progress-cell {
  display: grid;
  gap: 0.35rem;
  min-width: 130px;
}

.analytics-progress-copy {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  justify-content: space-between;
}

.analytics-progress-copy strong {
  font-weight: 850;
}

.analytics-progress-copy span,
.analytics-stock-cell span,
.analytics-stock-cell small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.analytics-progress-track {
  height: 0.48rem;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 14%, transparent);
}

.analytics-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--analytics-positive);
}

.analytics-progress-watch .analytics-progress-track span {
  background: var(--amber);
}

.analytics-progress-negative .analytics-progress-track span {
  background: var(--red);
}

.analytics-stock-cell {
  display: grid;
  gap: 0.25rem;
  min-width: 112px;
}

.analytics-stock-summary {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  justify-content: space-between;
}

.analytics-stock-cell strong {
  font-weight: 850;
}

.analytics-stock-watch .analytics-stock-summary strong,
.analytics-stock-watch .analytics-stock-summary span {
  color: var(--amber);
}

.analytics-stock-negative .analytics-stock-summary strong,
.analytics-stock-negative .analytics-stock-summary span,
.analytics-stock-missing {
  color: var(--red);
}

.analytics-supplier-link {
  color: var(--primary-strong);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.manual-cost-field.batch-cost-active {
  opacity: 0.78;
}

.sale-panel {
  padding: 1rem;
  overflow: hidden;
}

.sale-head {
  align-items: start;
  margin-bottom: 1rem;
}

.sale-head strong {
  white-space: nowrap;
}

.sale-form {
  padding: 0;
}

.sale-cost-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.sale-actions {
  padding: 0;
}

body[data-view="listing-queue"] main {
  max-width: none;
}

body[data-view="listing-queue"] #listingQueueView {
  background: transparent;
}

.listing-queue-layout {
  --lq-bg: var(--bg);
  --lq-panel: rgba(255, 255, 255, 0.92);
  --lq-panel-strong: #ffffff;
  --lq-line: rgba(23, 32, 28, 0.14);
  --lq-line-strong: rgba(31, 111, 91, 0.36);
  --lq-text: var(--text);
  --lq-muted: var(--muted);
  --lq-soft: #2e3a34;
  --lq-purple: var(--primary);
  --lq-green: #237b46;
  --lq-blue: #2f64a4;
  --lq-amber: #996418;
  --lq-red: #b23d45;
  --lq-shell-border: rgba(23, 32, 28, 0.12);
  --lq-shell-bg: var(--bg);
  --lq-mark-border: rgba(31, 111, 91, 0.3);
  --lq-mark-bg:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.32), transparent 22%),
    linear-gradient(135deg, #287b66, #1f6f5b 72%);
  --lq-mark-shadow: 0 10px 22px rgba(31, 111, 91, 0.2);
  --lq-chip-bg: rgba(255, 255, 255, 0.72);
  --lq-chip-border: rgba(23, 32, 28, 0.12);
  --lq-purple-chip-color: var(--primary-strong);
  --lq-purple-chip-bg: rgba(31, 111, 91, 0.09);
  --lq-purple-chip-border: rgba(31, 111, 91, 0.19);
  --lq-amber-chip-color: #845513;
  --lq-amber-chip-bg: rgba(153, 100, 24, 0.11);
  --lq-amber-chip-border: rgba(153, 100, 24, 0.2);
  --lq-badge-color: var(--primary-strong);
  --lq-badge-bg: rgba(31, 111, 91, 0.1);
  --lq-badge-border: rgba(31, 111, 91, 0.22);
  --lq-button-bg: rgba(255, 255, 255, 0.86);
  --lq-button-hover-bg: rgba(238, 246, 242, 0.96);
  --lq-button-border: rgba(23, 32, 28, 0.14);
  --lq-button-hover-border: rgba(31, 111, 91, 0.34);
  --lq-primary-bg: linear-gradient(135deg, #287b66, #1f6f5b);
  --lq-primary-shadow: 0 10px 22px rgba(31, 111, 91, 0.2);
  --lq-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(251, 252, 251, 0.7)), var(--lq-panel);
  --lq-section-bg: rgba(251, 252, 251, 0.82);
  --lq-section-intro-bg: linear-gradient(180deg, rgba(31, 111, 91, 0.055), rgba(31, 111, 91, 0.015));
  --lq-settings-section-border: 1px solid var(--lq-line);
  --lq-section-intro-border: 1px solid var(--lq-schedule-line);
  --lq-panel-shadow: 0 1px 2px rgba(20, 32, 28, 0.04), 0 8px 22px rgba(20, 32, 28, 0.055);
  --lq-toggle-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(251, 252, 251, 0.72)), rgba(255, 255, 255, 0.82);
  --lq-toggle-active-bg: linear-gradient(180deg, rgba(31, 111, 91, 0.11), rgba(31, 111, 91, 0.04)), rgba(255, 255, 255, 0.84);
  --lq-control-bg: rgba(255, 255, 255, 0.88);
  --lq-focus-ring: rgba(31, 111, 91, 0.16);
  --lq-switch-bg: rgba(99, 112, 104, 0.28);
  --lq-switch-knob: #ffffff;
  --lq-switch-active-bg: linear-gradient(135deg, #287b66, #1f6f5b);
  --lq-day-bg: rgba(238, 246, 242, 0.82);
  --lq-table-head-bg: rgba(241, 245, 243, 0.92);
  --lq-table-row-hover-bg: rgba(246, 250, 248, 0.92);
  --lq-status-bg: rgba(31, 111, 91, 0.1);
  --lq-status-border: rgba(31, 111, 91, 0.2);
  --lq-status-draft-color: #52635a;
  --lq-status-draft-bg: rgba(99, 112, 104, 0.1);
  --lq-status-draft-border: rgba(99, 112, 104, 0.2);
  --lq-status-pending-color: #2f64a4;
  --lq-status-pending-bg: rgba(47, 100, 164, 0.1);
  --lq-status-pending-border: rgba(47, 100, 164, 0.2);
  --lq-status-preparing-color: #8a5b14;
  --lq-status-preparing-bg: rgba(153, 100, 24, 0.12);
  --lq-status-preparing-border: rgba(153, 100, 24, 0.23);
  --lq-status-published-color: #237b46;
  --lq-status-published-bg: rgba(35, 123, 70, 0.1);
  --lq-status-published-border: rgba(35, 123, 70, 0.2);
  --lq-status-failed-color: #b23d45;
  --lq-status-failed-bg: rgba(178, 61, 69, 0.09);
  --lq-status-failed-border: rgba(178, 61, 69, 0.25);
  --lq-status-skipped-color: #5d687a;
  --lq-status-skipped-bg: rgba(93, 104, 122, 0.1);
  --lq-status-skipped-border: rgba(93, 104, 122, 0.24);
  --lq-thumb-bg: linear-gradient(135deg, #ffffff, #eef2f7);
  --lq-thumb-border: rgba(195, 203, 218, 0.88);
  --lq-thumb-text: #6b7280;
  --lq-remove-color: #9f343d;
  --lq-remove-border: rgba(178, 61, 69, 0.36);
  --lq-remove-bg: rgba(178, 61, 69, 0.06);
  --lq-empty-bg: rgba(255, 255, 255, 0.46);
  --lq-empty-icon: rgba(101, 113, 135, 0.68);
  --lq-purple-icon-color: var(--primary-strong);
  --lq-purple-icon-bg: rgba(31, 111, 91, 0.12);
  --lq-purple-icon-border: rgba(31, 111, 91, 0.2);
  --lq-green-icon-color: #1d7040;
  --lq-green-icon-bg: rgba(35, 123, 70, 0.12);
  --lq-green-icon-border: rgba(35, 123, 70, 0.2);
  --lq-blue-icon-color: #2b5d96;
  --lq-blue-icon-bg: rgba(47, 100, 164, 0.12);
  --lq-blue-icon-border: rgba(47, 100, 164, 0.2);
  --lq-amber-icon-color: #8a5b14;
  --lq-amber-icon-bg: rgba(153, 100, 24, 0.13);
  --lq-amber-icon-border: rgba(153, 100, 24, 0.22);
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 0;
  color: var(--lq-text);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .listing-queue-layout {
  --lq-bg: var(--bg);
  --lq-panel: var(--surface);
  --lq-panel-strong: var(--surface-raised);
  --lq-line: var(--line);
  --lq-line-strong: color-mix(in srgb, var(--primary) 48%, var(--line));
  --lq-text: var(--text);
  --lq-muted: var(--muted);
  --lq-soft: #d4d0df;
  --lq-purple: var(--primary);
  --lq-green: #74dfa7;
  --lq-blue: var(--blue);
  --lq-amber: var(--amber);
  --lq-red: var(--red);
  --lq-shell-border: transparent;
  --lq-shell-bg: var(--bg);
  --lq-mark-border: color-mix(in srgb, var(--primary) 58%, var(--line));
  --lq-mark-bg:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.2), transparent 22%),
    linear-gradient(180deg, color-mix(in srgb, var(--primary) 84%, #fff 8%), color-mix(in srgb, var(--primary) 74%, #35208f));
  --lq-mark-shadow: 0 3px 12px color-mix(in srgb, var(--primary) 20%, transparent);
  --lq-chip-bg: color-mix(in srgb, var(--surface-raised) 86%, transparent);
  --lq-chip-border: color-mix(in srgb, var(--line) 80%, transparent);
  --lq-purple-chip-color: var(--primary-strong);
  --lq-purple-chip-bg: color-mix(in srgb, var(--primary) 16%, var(--surface));
  --lq-purple-chip-border: color-mix(in srgb, var(--primary) 34%, var(--line));
  --lq-amber-chip-color: var(--amber);
  --lq-amber-chip-bg: color-mix(in srgb, var(--amber-soft) 62%, var(--surface));
  --lq-amber-chip-border: color-mix(in srgb, var(--amber) 38%, var(--line));
  --lq-badge-color: var(--primary-strong);
  --lq-badge-bg: color-mix(in srgb, var(--primary) 16%, var(--surface));
  --lq-badge-border: color-mix(in srgb, var(--primary) 34%, var(--line));
  --lq-button-bg: var(--surface);
  --lq-button-hover-bg: color-mix(in srgb, var(--primary) 10%, var(--surface-raised));
  --lq-button-border: var(--line);
  --lq-button-hover-border: color-mix(in srgb, var(--primary) 42%, var(--line));
  --lq-primary-bg: linear-gradient(180deg, color-mix(in srgb, var(--primary) 86%, #fff 10%), color-mix(in srgb, var(--primary) 74%, #35208f));
  --lq-primary-shadow: 0 3px 12px color-mix(in srgb, var(--primary) 18%, transparent);
  --lq-card-bg: var(--surface);
  --lq-section-bg: var(--surface-raised);
  --lq-section-intro-bg: transparent;
  --lq-settings-section-border: 0;
  --lq-section-intro-border: 0;
  --lq-panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  --lq-toggle-bg: var(--surface-raised);
  --lq-toggle-active-bg: color-mix(in srgb, var(--primary) 12%, var(--surface-raised));
  --lq-control-bg: var(--surface-raised);
  --lq-focus-ring: color-mix(in srgb, var(--primary) 18%, transparent);
  --lq-switch-bg: color-mix(in srgb, var(--muted) 24%, var(--surface));
  --lq-switch-knob: var(--text);
  --lq-switch-active-bg: linear-gradient(180deg, color-mix(in srgb, var(--primary) 86%, #fff 8%), color-mix(in srgb, var(--primary) 74%, #35208f));
  --lq-day-bg: var(--surface-raised);
  --lq-table-head-bg: color-mix(in srgb, var(--surface-raised) 82%, var(--bg));
  --lq-table-row-hover-bg: color-mix(in srgb, var(--primary) 6%, var(--surface-raised));
  --lq-status-bg: color-mix(in srgb, var(--primary) 16%, var(--surface));
  --lq-status-border: color-mix(in srgb, var(--primary) 34%, var(--line));
  --lq-status-pending-color: var(--blue);
  --lq-status-pending-bg: color-mix(in srgb, var(--blue-soft) 72%, var(--surface));
  --lq-status-pending-border: color-mix(in srgb, var(--blue) 38%, var(--line));
  --lq-status-preparing-color: var(--amber);
  --lq-status-preparing-bg: color-mix(in srgb, var(--amber-soft) 72%, var(--surface));
  --lq-status-preparing-border: color-mix(in srgb, var(--amber) 38%, var(--line));
  --lq-status-published-color: var(--lq-green);
  --lq-status-published-bg: color-mix(in srgb, #183126 70%, var(--surface));
  --lq-status-published-border: color-mix(in srgb, var(--lq-green) 38%, var(--line));
  --lq-status-failed-color: var(--red);
  --lq-status-failed-bg: color-mix(in srgb, var(--red-soft) 62%, var(--surface));
  --lq-status-failed-border: color-mix(in srgb, var(--red) 55%, var(--line));
  --lq-status-skipped-color: var(--muted);
  --lq-status-skipped-bg: color-mix(in srgb, var(--muted) 14%, var(--surface));
  --lq-status-skipped-border: color-mix(in srgb, var(--muted) 32%, var(--line));
  --lq-thumb-bg: var(--surface-raised);
  --lq-thumb-border: color-mix(in srgb, var(--line) 86%, transparent);
  --lq-thumb-text: var(--muted);
  --lq-remove-color: var(--red);
  --lq-remove-border: color-mix(in srgb, var(--red) 55%, var(--line));
  --lq-remove-bg: color-mix(in srgb, var(--red-soft) 62%, var(--surface));
  --lq-empty-bg: var(--surface);
  --lq-empty-icon: var(--muted);
  --lq-purple-icon-color: var(--primary-strong);
  --lq-purple-icon-bg: color-mix(in srgb, var(--primary) 16%, var(--surface));
  --lq-purple-icon-border: color-mix(in srgb, var(--primary) 34%, var(--line));
  --lq-green-icon-color: var(--lq-green);
  --lq-green-icon-bg: color-mix(in srgb, #183126 70%, var(--surface));
  --lq-green-icon-border: color-mix(in srgb, var(--lq-green) 38%, var(--line));
  --lq-blue-icon-color: var(--blue);
  --lq-blue-icon-bg: color-mix(in srgb, var(--blue-soft) 72%, var(--surface));
  --lq-blue-icon-border: color-mix(in srgb, var(--blue) 38%, var(--line));
  --lq-amber-icon-color: var(--amber);
  --lq-amber-icon-bg: color-mix(in srgb, var(--amber-soft) 72%, var(--surface));
  --lq-amber-icon-border: color-mix(in srgb, var(--amber) 38%, var(--line));
}

.listing-queue-layout h2,
.listing-queue-layout h3,
.listing-queue-layout h4,
.listing-queue-layout p {
  margin: 0;
}

.listing-queue-layout h2 {
  font-size: clamp(1.24rem, 1.65vw, 1.58rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.listing-queue-layout h3 {
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.listing-queue-layout h4 {
  color: var(--lq-soft);
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.listing-queue-layout p,
.listing-queue-layout small {
  color: var(--lq-muted);
}

.listing-queue-icon {
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.listing-queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

.listing-queue-title-lockup {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.listing-queue-title-lockup > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.listing-queue-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fff;
  border: 1px solid var(--lq-mark-border);
  border-radius: 999px;
  background: var(--lq-mark-bg);
  box-shadow: var(--lq-mark-shadow);
}

.listing-queue-mark .listing-queue-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}

.listing-queue-meta,
.listing-queue-actions,
.listing-queue-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.listing-queue-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  padding: 3px 7px;
  color: var(--lq-soft);
  border: 1px solid var(--lq-chip-border);
  border-radius: 999px;
  background: var(--lq-chip-bg);
  font-size: 0.7rem;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.listing-queue-chip.tone-purple {
  color: var(--lq-purple-chip-color);
  border-color: var(--lq-purple-chip-border);
  background: var(--lq-purple-chip-bg);
}

.listing-queue-chip.tone-amber {
  color: var(--lq-amber-chip-color);
  border-color: var(--lq-amber-chip-border);
  background: var(--lq-amber-chip-bg);
}

.listing-queue-actions {
  justify-content: flex-end;
  margin-left: auto;
}

.listing-queue-actions button,
.listing-queue-row-actions button,
.listing-queue-settings-save,
.listing-queue-settings .actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0.48rem 0.72rem;
  color: var(--lq-text);
  border: 1px solid var(--lq-button-border);
  border-radius: 8px;
  background: var(--lq-button-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-weight: 790;
  white-space: nowrap;
}

.listing-queue-actions button:hover:not(:disabled),
.listing-queue-row-actions button:hover:not(:disabled),
.listing-queue-settings-save:hover:not(:disabled),
.listing-queue-settings .actions button:hover:not(:disabled) {
  border-color: var(--lq-button-hover-border);
  background: var(--lq-button-hover-bg);
}

.listing-queue-actions button.primary,
.listing-queue-settings-save,
.listing-queue-settings .actions button.primary {
  color: #fff;
  border-color: var(--lq-line-strong);
  background: var(--lq-primary-bg);
  box-shadow: var(--lq-primary-shadow);
}

.listing-queue-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.listing-queue-metric {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 90px;
  padding: 16px;
  border: 1px solid var(--lq-line);
  border-top-width: 3px;
  border-radius: 10px;
  background: var(--lq-card-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.listing-queue-metric-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
}

.listing-queue-metric-icon .listing-queue-icon {
  width: 24px;
  height: 24px;
}

.listing-queue-metric.tone-purple .listing-queue-metric-icon {
  color: var(--lq-purple-icon-color);
  border: 1px solid var(--lq-purple-icon-border);
  background: var(--lq-purple-icon-bg);
}

.listing-queue-metric.tone-purple {
  border-top-color: var(--lq-purple);
}

.listing-queue-metric.tone-green .listing-queue-metric-icon {
  color: var(--lq-green-icon-color);
  border: 1px solid var(--lq-green-icon-border);
  background: var(--lq-green-icon-bg);
}

.listing-queue-metric.tone-green {
  border-top-color: var(--lq-green);
}

.listing-queue-metric.tone-blue .listing-queue-metric-icon {
  color: var(--lq-blue-icon-color);
  border: 1px solid var(--lq-blue-icon-border);
  background: var(--lq-blue-icon-bg);
}

.listing-queue-metric.tone-blue {
  border-top-color: var(--lq-blue);
}

.listing-queue-metric.tone-amber .listing-queue-metric-icon {
  color: var(--lq-amber-icon-color);
  border: 1px solid var(--lq-amber-icon-border);
  background: var(--lq-amber-icon-bg);
}

.listing-queue-metric.tone-amber {
  border-top-color: var(--lq-amber);
}

.listing-queue-metric div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.listing-queue-metric span:not(.listing-queue-metric-icon) {
  color: var(--lq-muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.listing-queue-metric strong {
  color: var(--lq-text);
  font-size: 1.4rem;
  line-height: 1;
}

.listing-queue-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  width: 100%;
}

.listing-queue-status-stack,
.listing-queue-columns {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.listing-queue-panel,
.listing-queue-empty {
  border: 1px solid var(--lq-line);
  border-radius: 10px;
  background: var(--lq-panel);
  box-shadow: var(--lq-panel-shadow);
}

.listing-queue-panel {
  min-width: 0;
  padding: 14px;
}

.listing-queue-schedule-panel {
  display: grid;
  gap: 22px;
  justify-items: stretch;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.listing-queue-schedule-panel > .listing-queue-panel-head {
  align-items: center;
}

.listing-queue-schedule-panel .listing-queue-panel-head h3 {
  font-size: 1.62rem;
  line-height: 1.08;
}

.listing-queue-schedule-panel .listing-queue-panel-head p {
  font-size: 0.98rem;
  line-height: 1.35;
}

.listing-queue-settings-save {
  min-height: 54px;
  padding-inline: 1.18rem;
  font-size: 0.95rem;
}

.listing-queue-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.listing-queue-panel-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.listing-queue-panel-head > .listing-queue-panel-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  justify-self: end;
  width: auto;
  min-width: 0;
}

.listing-queue-panel-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-height: 32px;
  padding: 0.42rem 0.62rem;
  color: var(--lq-text);
  border: 1px solid var(--lq-button-border);
  border-radius: 8px;
  background: var(--lq-button-bg);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.listing-queue-panel-action .listing-queue-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.3;
}

.listing-queue-panel-action-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding-inline: 6px;
  color: var(--lq-badge-color);
  border: 1px solid var(--lq-badge-border);
  border-radius: 999px;
  background: var(--lq-badge-bg);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.listing-queue-panel-action:hover:not(:disabled) {
  color: var(--lq-text);
  border-color: var(--lq-button-hover-border);
  background: var(--lq-button-hover-bg);
}

.listing-queue-count-badge {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding-inline: 7px;
  color: var(--lq-badge-color);
  border: 1px solid var(--lq-badge-border);
  border-radius: 8px;
  background: var(--lq-badge-bg);
  font-size: 0.74rem;
  font-weight: 850;
}

.listing-queue-settings {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
  align-items: stretch;
  justify-items: stretch;
  justify-self: stretch;
  min-width: 0;
  width: 100%;
  max-width: none;
}

.listing-queue-settings > .listing-queue-flow-group.full {
  grid-column: 1 / span 7;
  grid-row: 1;
}

.listing-queue-settings > .listing-queue-days-group.full {
  grid-column: 8 / -1;
  grid-row: 1;
}

.listing-queue-settings > .listing-queue-windows-group.full {
  grid-column: 1 / span 7;
  grid-row: 2;
}

.listing-queue-settings > .listing-queue-caps-group.full {
  grid-column: 8 / -1;
  grid-row: 2;
}

.listing-queue-settings-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 18px;
  min-width: 0;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--lq-line);
  border-radius: 8px;
  background: var(--lq-section-bg);
}

.listing-queue-settings-group:first-child,
.listing-queue-settings-group:nth-last-child(2) {
  border-bottom: 1px solid var(--lq-line);
  border-radius: 8px;
}

.listing-queue-flow-group {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 174px);
  column-gap: 22px;
  align-items: end;
}

.listing-queue-caps-group {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.listing-queue-flow-group .listing-queue-group-head,
.listing-queue-caps-group .listing-queue-group-head {
  grid-column: 1 / -1;
  align-self: start;
}

.listing-queue-flow-group .listing-queue-toggle-grid {
  grid-column: 1;
}

.listing-queue-flow-group > .listing-queue-field {
  grid-column: 2;
}

.listing-queue-caps-group .listing-queue-field-grid {
  grid-column: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.listing-queue-caps-group .listing-queue-blocked-days {
  grid-column: 1;
}

.listing-queue-group-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-width: 0;
}

.listing-queue-group-head p {
  grid-column: 2;
  font-size: 0.72rem;
  line-height: 1.15;
}

.listing-queue-group-icon {
  display: inline-grid;
  place-items: center;
  color: var(--lq-purple-chip-color);
}

.listing-queue-group-icon .listing-queue-icon {
  width: 23px;
  height: 23px;
}

.listing-queue-toggle-grid,
.listing-queue-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.listing-queue-flow-group .listing-queue-toggle-grid {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.listing-queue-windows-group .listing-queue-field-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.listing-queue-window-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.listing-queue-window-card {
  display: grid;
  gap: 8px;
  align-self: start;
  min-width: 0;
}

.listing-queue-window-card-head strong {
  display: block;
  color: var(--lq-text);
  font-size: 1rem;
  font-weight: 860;
  line-height: 1.15;
}

.listing-queue-window-slots {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.listing-queue-slot-row {
  display: grid;
  grid-template-columns: 34px minmax(64px, 0.58fr) minmax(90px, 1fr) 14px minmax(90px, 1fr) 38px;
  grid-template-areas: "grip label start dash end remove";
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--lq-line);
  border-radius: 8px;
  background: var(--lq-control-bg);
}

.listing-queue-slot-row.dragging {
  opacity: 0.62;
}

.listing-queue-slot-row.drop-target {
  border-color: var(--lq-line-strong);
  box-shadow: 0 0 0 3px var(--lq-focus-ring);
}

.listing-queue-slot-grip,
.listing-queue-slot-remove {
  display: inline-grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
}

.listing-queue-slot-grip {
  grid-area: grip;
  color: var(--lq-muted);
  border-color: transparent;
  background: transparent;
  cursor: grab;
}

.listing-queue-slot-grip:active {
  cursor: grabbing;
}

.listing-queue-slot-grip .listing-queue-icon {
  width: 18px;
  height: 26px;
  stroke-width: 2.4;
}

.listing-queue-slot-label {
  grid-area: label;
  min-width: 0;
  color: var(--lq-text);
  font-size: 0.88rem;
  font-weight: 840;
  line-height: 1.1;
}

.listing-queue-slot-time {
  position: relative;
  display: grid;
  gap: 0;
  min-width: 0;
}

.listing-queue-slot-time:first-of-type {
  grid-area: start;
}

.listing-queue-slot-time:last-of-type {
  grid-area: end;
}

.listing-queue-slot-time span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.listing-queue-slot-time input {
  width: 100%;
  min-height: 44px;
  padding-inline: 12px;
  color: var(--lq-text);
  border: 1px solid var(--lq-line);
  border-radius: 8px;
  background: var(--lq-panel);
}

.listing-queue-slot-time input:focus {
  border-color: var(--lq-line-strong);
  box-shadow: 0 0 0 3px var(--lq-focus-ring);
}

.listing-queue-slot-separator {
  grid-area: dash;
  color: var(--lq-muted);
  font-weight: 820;
  text-align: center;
}

.listing-queue-slot-remove {
  grid-area: remove;
  color: var(--lq-remove-color);
  border-color: var(--lq-remove-border);
  background: var(--lq-remove-bg);
}

.listing-queue-add-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  padding: 0.5rem;
  color: var(--lq-purple-chip-color);
  border: 1px dashed var(--lq-line-strong);
  border-radius: 8px;
  background: transparent;
  font-weight: 820;
}

.listing-queue-add-slot:hover:not(:disabled) {
  background: var(--lq-button-hover-bg);
}

.listing-queue-toggle-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 56px;
  padding: 0;
  color: var(--lq-text);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.listing-queue-toggle-card:has(.listing-queue-toggle-input:checked) {
  border-color: transparent;
  background: transparent;
}

.listing-queue-toggle-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.listing-queue-switch {
  position: relative;
  width: 46px;
  height: 26px;
  border: 1px solid var(--lq-line);
  border-radius: 999px;
  background: var(--lq-switch-bg);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.listing-queue-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--lq-switch-knob);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}

.listing-queue-toggle-input:checked + .listing-queue-switch {
  border-color: var(--lq-line-strong);
  background: var(--lq-switch-active-bg);
}

.listing-queue-toggle-input:checked + .listing-queue-switch::after {
  transform: translateX(20px);
}

.listing-queue-toggle-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.listing-queue-toggle-copy strong {
  color: var(--lq-text);
  font-size: 0.88rem;
  line-height: 1.15;
}

.listing-queue-toggle-copy small {
  color: var(--lq-muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.28;
}

.listing-queue-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.listing-queue-field span {
  color: var(--lq-soft);
  font-size: 0.84rem;
  font-weight: 820;
  line-height: 1.1;
}

.listing-queue-field input,
.listing-queue-field select {
  width: 100%;
  min-height: 46px;
  padding-inline: 14px;
  color: var(--lq-text);
  border: 1px solid var(--lq-line);
  border-radius: 8px;
  background: var(--lq-control-bg);
}

.listing-queue-field input:focus,
.listing-queue-field select:focus,
.listing-queue-toggle-card:focus-within {
  border-color: var(--lq-line-strong);
  box-shadow: 0 0 0 3px var(--lq-focus-ring);
}

.listing-queue-day-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}

.listing-queue-day-picker label {
  display: inline-flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
  padding: 10px 8px;
  color: var(--lq-text);
  border: 1px solid var(--lq-line);
  border-radius: 8px;
  background: var(--lq-day-bg);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.listing-queue-day-picker input {
  display: grid;
  place-content: center;
  width: 21px;
  height: 21px;
  margin: 0;
  color: var(--lq-switch-knob);
  border: 1px solid var(--lq-line);
  border-radius: 999px;
  appearance: none;
  background: var(--lq-control-bg);
}

.listing-queue-day-picker input::before {
  content: "";
  width: 8px;
  height: 4px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
}

.listing-queue-day-picker input:checked {
  border-color: var(--lq-line-strong);
  background: var(--lq-switch-active-bg);
}

.listing-queue-day-picker input:checked::before {
  transform: rotate(-45deg) scale(1);
}

.listing-queue-blocked-days {
  margin-top: 0;
}

.listing-queue-settings .actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
  grid-column: 1 / -1;
}

.listing-queue-settings .actions button {
  min-width: 150px;
}

.listing-queue-table-wrap {
  margin-top: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--lq-line);
  border-radius: 8px;
  background: var(--lq-panel-strong);
}

.listing-queue-table {
  width: 100%;
  min-width: min(640px, 100%);
  border-collapse: collapse;
  table-layout: fixed;
}

.listing-queue-table thead {
  display: none;
}

.listing-queue-table th,
.listing-queue-table td {
  padding: 3px 8px;
  border-bottom: 1px solid var(--lq-line);
  text-align: left;
  vertical-align: middle;
}

.listing-queue-table td:first-child {
  padding-left: 5px;
}

.listing-queue-table th {
  color: var(--lq-muted);
  background: var(--lq-table-head-bg);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.listing-queue-table th:nth-child(1) {
  width: auto;
}

.listing-queue-table th:nth-child(2) {
  width: 96px;
}

.listing-queue-table th:nth-child(3) {
  width: 142px;
}

.listing-queue-table th:nth-child(4) {
  width: auto;
}

.listing-queue-table td:nth-child(4) {
  min-width: 0;
}

.listing-queue-table th:nth-child(5) {
  width: 224px;
  text-align: right;
}

.listing-queue-table td:nth-child(2) {
  width: 96px;
}

.listing-queue-table td:nth-child(3) {
  width: 142px;
}

.listing-queue-table td:nth-child(5) {
  width: 224px;
}

.listing-queue-table-draft th:nth-child(2),
.listing-queue-table-draft td:nth-child(2) {
  width: 88px;
}

.listing-queue-table-draft th:nth-child(3),
.listing-queue-table-draft td:nth-child(3) {
  width: 132px;
}

.listing-queue-table-draft th:nth-child(5),
.listing-queue-table-draft td:nth-child(5) {
  width: 248px;
}

.listing-queue-table td:last-child {
  text-align: right;
}

.listing-queue-table tr:last-child td {
  border-bottom: 0;
}

.listing-queue-table-row:hover td {
  background: var(--lq-table-row-hover-bg);
}

.listing-queue-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--lq-muted);
  font-size: 0.74rem;
  line-height: 1;
}

.listing-queue-pagination-range {
  flex: 0 0 auto;
  font-weight: 760;
}

.listing-queue-pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.listing-queue-page-button {
  min-height: 28px;
  padding: 0 9px;
  color: var(--lq-text);
  border: 1px solid var(--lq-button-border);
  border-radius: 7px;
  background: var(--lq-button-bg);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1;
}

.listing-queue-page-button:hover:not(:disabled) {
  border-color: var(--lq-button-hover-border);
  background: var(--lq-button-hover-bg);
}

.listing-queue-page-button:disabled {
  color: var(--lq-muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.listing-queue-page-status {
  min-width: 38px;
  color: var(--lq-soft);
  font-weight: 820;
  text-align: center;
}

.listing-queue-table-row.queue-tone-draft td:first-child {
  box-shadow: inset 3px 0 0 var(--lq-status-draft-color);
}

.listing-queue-table-row.queue-tone-pending td:first-child {
  box-shadow: inset 3px 0 0 var(--lq-status-pending-color);
}

.listing-queue-table-row.queue-tone-preparing td:first-child {
  box-shadow: inset 3px 0 0 var(--lq-status-preparing-color);
}

.listing-queue-table-row.queue-tone-published td:first-child {
  box-shadow: inset 3px 0 0 var(--lq-status-published-color);
}

.listing-queue-table-row.queue-tone-failed td:first-child {
  box-shadow: inset 3px 0 0 var(--lq-status-failed-color);
}

.listing-queue-table-row.queue-tone-skipped td:first-child {
  box-shadow: inset 3px 0 0 var(--lq-status-skipped-color);
}

.listing-queue-item-cell {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 0;
  min-width: 0;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  text-align: left;
}

.listing-queue-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  color: var(--lq-thumb-text);
  border: 1px solid var(--lq-thumb-border);
  border-radius: 7px;
  background: var(--lq-thumb-bg);
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

.listing-queue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-queue-row-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.listing-queue-row-copy strong,
.listing-queue-row-copy span,
.listing-queue-date-text,
.listing-queue-countdown,
.listing-queue-release-time {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-queue-row-copy strong {
  color: var(--lq-text);
  font-size: 0.92rem;
  line-height: 1.15;
}

.listing-queue-row-copy span {
  color: var(--lq-muted);
  font-size: 0.8rem;
}

.listing-queue-status-pill {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 7px;
  color: var(--lq-purple-chip-color);
  border: 1px solid var(--lq-status-border);
  border-radius: 999px;
  background: var(--lq-status-bg);
  font-size: 0.66rem;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.listing-queue-status-pill.tone-draft {
  color: var(--lq-status-draft-color);
  border-color: var(--lq-status-draft-border);
  background: var(--lq-status-draft-bg);
}

.listing-queue-status-pill.tone-pending {
  color: var(--lq-status-pending-color);
  border-color: var(--lq-status-pending-border);
  background: var(--lq-status-pending-bg);
}

.listing-queue-status-pill.tone-preparing {
  color: var(--lq-status-preparing-color);
  border-color: var(--lq-status-preparing-border);
  background: var(--lq-status-preparing-bg);
}

.listing-queue-status-pill.tone-published {
  color: var(--lq-status-published-color);
  border-color: var(--lq-status-published-border);
  background: var(--lq-status-published-bg);
}

.listing-queue-status-pill.tone-failed {
  color: var(--lq-status-failed-color);
  border-color: var(--lq-status-failed-border);
  background: var(--lq-status-failed-bg);
}

.listing-queue-status-pill.tone-skipped {
  color: var(--lq-status-skipped-color);
  border-color: var(--lq-status-skipped-border);
  background: var(--lq-status-skipped-bg);
}

.listing-queue-date-text,
.listing-queue-detail-text,
.listing-queue-detail-list {
  max-width: 100%;
  color: var(--lq-muted);
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.listing-queue-detail-text {
  display: block;
}

.listing-queue-detail-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.listing-queue-detail-prefix {
  color: inherit;
  font-size: 0.72rem;
  line-height: 1.15;
}

.listing-queue-detail-list ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.listing-queue-detail-list li {
  position: relative;
  min-width: 0;
  padding-left: 12px;
  overflow-wrap: anywhere;
}

.listing-queue-detail-list li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 1px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.listing-queue-release-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.listing-queue-countdown {
  color: var(--lq-text);
  font-size: 0.82rem;
  font-weight: 820;
  line-height: 1.1;
}

.listing-queue-countdown.muted,
.listing-queue-release-time {
  color: var(--lq-muted);
}

.listing-queue-release-time {
  font-size: 0.72rem;
  line-height: 1.15;
}

.listing-queue-detail-text.error-text {
  color: var(--lq-red);
}

.listing-queue-row-actions button {
  min-height: 34px;
  padding: 0.34rem 0.64rem;
  font-size: 0.78rem;
}

.listing-queue-row-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.listing-queue-icon-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
  color: var(--lq-purple-chip-color);
  border-color: var(--lq-purple-chip-border);
  background: var(--lq-control-bg);
}

:root[data-theme="dark"] .listing-queue-icon-button {
  color: #9eb4ff;
  border-color: rgba(126, 154, 255, 0.34);
  background: rgba(9, 18, 32, 0.82);
}

.listing-queue-icon-button .listing-queue-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.listing-queue-icon-button.danger {
  color: var(--lq-red);
  border-color: var(--lq-remove-border);
  background: var(--lq-remove-bg);
}

.listing-queue-row-actions button.primary {
  color: #fff;
  border-color: var(--lq-line-strong);
  background: var(--lq-primary-bg);
  box-shadow: var(--lq-primary-shadow);
}

.listing-queue-text-action {
  min-width: 54px;
}

.listing-queue-row-actions button[data-queue-action="remove"] {
  color: var(--lq-remove-color);
  border-color: var(--lq-remove-border);
  background: var(--lq-remove-bg);
}

.listing-queue-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 70px;
  margin-top: 10px;
  padding: 14px;
  color: var(--lq-muted);
  border-style: dashed;
  background: var(--lq-empty-bg);
  text-align: center;
}

.listing-queue-empty .listing-queue-icon {
  width: 23px;
  height: 23px;
  color: var(--lq-empty-icon);
}

.listing-queue-empty strong {
  color: var(--lq-text);
  font-size: 0.82rem;
  line-height: 1.1;
}

.listing-queue-empty small {
  max-width: 260px;
  font-size: 0.76rem;
}

@media (max-width: 1099px) {
  .listing-queue-settings {
    grid-template-columns: 1fr;
  }

  .listing-queue-settings > .listing-queue-flow-group.full,
  .listing-queue-settings > .listing-queue-days-group.full,
  .listing-queue-settings > .listing-queue-windows-group.full,
  .listing-queue-settings > .listing-queue-caps-group.full {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .listing-queue-flow-group,
  .listing-queue-caps-group {
    grid-template-columns: 1fr;
  }

  .listing-queue-flow-group .listing-queue-toggle-grid,
  .listing-queue-flow-group > .listing-queue-field,
  .listing-queue-caps-group .listing-queue-field-grid,
  .listing-queue-caps-group .listing-queue-blocked-days {
    grid-column: 1;
  }

  .listing-queue-window-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .analytics-head {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
  }

  .analytics-title {
    flex: 1 1 260px;
    padding-bottom: 0.2rem;
  }

  .analytics-controls {
    flex: 0 1 920px;
    grid-template-columns:
      minmax(132px, 1fr)
      minmax(170px, 1.18fr)
      minmax(170px, 1.18fr)
      minmax(112px, 0.82fr)
      minmax(112px, 0.82fr)
      minmax(112px, 0.82fr);
  }

  .analytics-chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .analytics-layout > .analytics-head,
  .analytics-layout > .analytics-summary-cards,
  .analytics-layout > .analytics-inventory-panel,
  .analytics-layout > .analytics-insight-panel,
  .analytics-chart-panel,
  .analytics-chart-panel-wide {
    width: 64%;
  }

  .analytics-layout > .analytics-table-panel {
    width: min(94.05vw, calc(100vw - 1.5rem));
  }

  .listing-queue-head,
  .listing-queue-metrics,
  .listing-queue-workspace {
    width: 64%;
  }
}

@media (min-width: 900px) and (max-width: 1179px) {
  .analytics-controls {
    flex-basis: 100%;
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .listing-queue-workspace,
  .listing-queue-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 899px) {
  body[data-view="listing-queue"] main {
    padding: 0.6rem;
  }

  .listing-queue-layout {
    gap: 11px;
    padding: 0;
    border-radius: 13px;
  }

  .listing-queue-head {
    display: grid;
    gap: 12px;
  }

  .listing-queue-title-lockup {
    gap: 10px;
  }

  .listing-queue-mark {
    width: 44px;
    height: 44px;
  }

  .listing-queue-mark .listing-queue-icon {
    width: 22px;
    height: 22px;
  }

  .listing-queue-meta {
    gap: 6px;
  }

  .listing-queue-chip {
    max-width: 100%;
    white-space: normal;
  }

  .listing-queue-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    margin-left: 0;
  }

  .listing-queue-actions button {
    width: 100%;
    min-width: 0;
    padding-inline: 9px;
  }

  .listing-queue-workspace,
  .listing-queue-columns {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .listing-queue-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .listing-queue-metric {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 0;
    padding: 12px;
  }

  .listing-queue-metric-icon {
    width: 36px;
    height: 36px;
  }

  .listing-queue-metric strong {
    font-size: 1.14rem;
  }

  .listing-queue-panel {
    padding: 12px;
  }

  .listing-queue-schedule-panel {
    padding: 0;
  }

  .listing-queue-settings {
    grid-template-columns: 1fr;
  }

  .listing-queue-settings > .listing-queue-flow-group.full,
  .listing-queue-settings > .listing-queue-days-group.full,
  .listing-queue-settings > .listing-queue-windows-group.full,
  .listing-queue-settings > .listing-queue-caps-group.full {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .listing-queue-flow-group,
  .listing-queue-days-group,
  .listing-queue-windows-group,
  .listing-queue-caps-group {
    grid-template-columns: 1fr;
  }

  .listing-queue-flow-group .listing-queue-toggle-grid,
  .listing-queue-days-group .listing-queue-day-picker,
  .listing-queue-windows-group .listing-queue-field-grid,
  .listing-queue-caps-group .listing-queue-field-grid,
  .listing-queue-flow-group > .listing-queue-field,
  .listing-queue-caps-group .listing-queue-blocked-days {
    grid-column: 1;
  }

  .listing-queue-toggle-grid,
  .listing-queue-field-grid {
    grid-template-columns: 1fr;
  }

  .listing-queue-window-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .listing-queue-slot-row {
    grid-template-columns: 34px minmax(64px, 0.62fr) minmax(86px, 1fr) 14px minmax(86px, 1fr) 40px;
    gap: 7px;
    padding: 8px;
  }

  .listing-queue-slot-grip,
  .listing-queue-slot-remove {
    width: 32px;
    min-width: 32px;
  }

  .listing-queue-day-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .listing-queue-table-wrap {
    overflow-x: visible;
  }

  .listing-queue-table {
    min-width: 0;
  }

  .listing-queue-table thead {
    display: none;
  }

  .listing-queue-table,
  .listing-queue-table tbody,
  .listing-queue-table tr,
  .listing-queue-table td {
    display: block;
    width: 100%;
  }

  .listing-queue-table td:nth-child(n) {
    width: 100%;
  }

  .listing-queue-table tbody {
    display: grid;
  }

  .listing-queue-table-row {
    padding: 3px 5px;
    border-bottom: 1px solid var(--lq-line);
  }

  .listing-queue-table-row:last-child {
    border-bottom: 0;
  }

  .listing-queue-table th,
  .listing-queue-table td {
    padding: 3px 0;
    border-bottom: 0;
  }

  .listing-queue-table td:not(:first-child) {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .listing-queue-table td:not(:first-child)::before {
    content: attr(data-label);
    color: var(--lq-muted);
    font-size: 0.66rem;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .listing-queue-table td:last-child {
    text-align: left;
  }

  .listing-queue-table-row:hover td {
    background: transparent;
  }

  .listing-queue-item-cell {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
  }

  .listing-queue-thumb {
    width: 42px;
    height: 42px;
  }

  .listing-queue-row-actions {
    justify-content: flex-start;
  }

  .listing-queue-row-actions button {
    flex: 0 1 auto;
  }

  .listing-queue-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .listing-queue-pagination-controls {
    width: 100%;
    justify-content: space-between;
  }

  .listing-queue-actions [data-queue-action="sync"],
  .listing-queue-actions [data-queue-action="pause-toggle"],
  .listing-queue-actions [data-queue-action="publish-next"] {
    flex-basis: 100%;
  }

  body[data-view="analytics"] main {
    padding-inline: 0.75rem;
    overflow-x: hidden;
  }

  .analytics-layout {
    gap: 0.85rem;
    justify-items: stretch;
  }

  .analytics-head,
  .analytics-layout > .analytics-summary-cards,
  .analytics-layout > .analytics-inventory-panel,
  .analytics-layout > .analytics-insight-panel,
  .analytics-chart-panel,
  .analytics-chart-panel-wide,
  .analytics-layout > .analytics-table-panel {
    width: 100%;
  }

  .analytics-head {
    gap: 0.7rem;
  }

  .analytics-title h2 {
    font-size: 1.35rem;
  }

  .analytics-title p {
    line-height: 1.35;
  }

  .analytics-controls {
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-controls label {
    min-width: 0;
    padding: 0.6rem;
  }

  .analytics-controls span {
    font-size: 0.7rem;
  }

  .analytics-controls input,
  .analytics-controls select {
    min-width: 0;
    min-height: 38px;
    padding: 0.45rem 0.5rem;
    font-size: 0.86rem;
  }

  .analytics-debug-control,
  #analyticsRefresh {
    grid-column: span 2;
  }

  #analyticsRefresh {
    min-height: 42px;
  }

  .analytics-card-grid {
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-summary-cards {
    position: static;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .analytics-metric {
    min-width: 0;
    gap: 0.28rem;
    padding: 0.78rem;
  }

  .analytics-metric-profit,
  .analytics-metric-roi {
    min-height: 0;
  }

  .analytics-metric strong {
    font-size: 1.06rem;
    overflow-wrap: anywhere;
  }

  .analytics-metric small {
    font-size: 0.72rem;
  }

  .analytics-insight-panel,
  .analytics-chart-panel,
  .analytics-table-panel {
    padding: 0.75rem;
  }

  .analytics-insight-head,
  .analytics-chart-head,
  .analytics-table-head {
    align-items: stretch;
  }

  .analytics-insight-head .primary {
    width: 100%;
  }

  .analytics-chart-actions {
    justify-content: flex-start;
  }

  .analytics-mode-toggle {
    flex: 1 1 auto;
  }

  .analytics-mode-toggle button {
    flex: 1 1 0;
  }

  .analytics-chart-frame,
  .analytics-chart-panel-wide .analytics-chart-frame {
    min-height: 220px;
    max-height: none;
    height: 240px;
    aspect-ratio: auto;
  }

  .analytics-table-scroll {
    margin-inline: -0.75rem;
    padding-inline: 0.75rem;
  }
}

@media (max-width: 520px) {
  .listing-queue-panel-head {
    gap: 8px;
  }

  .listing-queue-panel-action {
    min-width: 54px;
    padding-inline: 0.42rem;
  }

  .listing-queue-panel-action-label {
    display: none;
  }

  .listing-queue-slot-row {
    grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr) 38px;
    grid-template-areas:
      "grip label label remove"
      "grip start end remove";
  }

  .listing-queue-slot-separator {
    display: none;
  }
}

@media (max-width: 360px) {
  .analytics-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.listing-queue-schedule-panel {
  --lq-schedule-bg: var(--lq-panel);
  --lq-schedule-band: var(--lq-panel);
  --lq-schedule-line: var(--lq-line);
  --lq-schedule-line-strong: var(--lq-line);
  --lq-schedule-text: var(--lq-text);
  --lq-schedule-muted: var(--lq-soft);
  --lq-schedule-soft: var(--lq-muted);
  --lq-schedule-input: var(--lq-control-bg);
  --lq-schedule-input-hover: var(--lq-button-hover-bg);
  --lq-schedule-purple: var(--lq-purple);
  --lq-schedule-purple-strong: var(--lq-purple-chip-color);
  width: 100%;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--lq-line);
  border-radius: 10px;
  background: var(--lq-schedule-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.listing-queue-compact-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  color: var(--lq-schedule-text);
  border: 0;
  background: transparent;
}

.listing-queue-compact-band {
  display: grid;
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 26px 30px;
  background: var(--lq-schedule-band);
  border-bottom: 1px solid var(--lq-schedule-line);
}

.listing-queue-compact-band:last-child {
  border-bottom: 0;
}

.listing-queue-top-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.listing-queue-top-band .listing-queue-compact-toggles {
  width: auto;
  justify-self: start;
}

.listing-queue-top-band > .listing-queue-vertical-rule {
  display: none;
}

.listing-queue-top-band .listing-queue-days-cluster {
  width: auto;
  justify-self: center;
}

.listing-queue-top-band .listing-queue-mode-field {
  width: 100%;
  justify-self: stretch;
}

.listing-queue-windows-band {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  padding-block: 27px 25px;
}

.listing-queue-window-half {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.listing-queue-caps-band {
  grid-template-columns: auto auto auto auto minmax(220px, 1fr);
  gap: 18px;
  justify-content: start;
}

.listing-queue-cap-cluster {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.listing-queue-cap-blocked-cluster {
  grid-auto-flow: row;
  gap: 5px;
  align-items: start;
}

.listing-queue-mode-field,
.listing-queue-compact-toggle,
.listing-queue-days-cluster,
.listing-queue-inline-field {
  min-width: 0;
}

.listing-queue-row-label {
  flex: 0 0 auto;
  color: var(--lq-schedule-muted);
  font-size: 0.84rem;
  font-weight: 840;
  line-height: 1;
  white-space: nowrap;
}

.listing-queue-mode-field {
  display: grid;
  grid-template-columns: auto minmax(104px, 1fr);
  gap: 10px;
  align-items: center;
}

.listing-queue-mode-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 26px 0 12px;
  color: var(--lq-schedule-text);
  border: 1px solid var(--lq-schedule-line-strong);
  border-radius: 8px;
  background-color: var(--lq-schedule-input);
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1;
}

.listing-queue-mode-field select:focus,
.listing-queue-inline-field input:focus,
.listing-queue-slot-time input:focus {
  border-color: var(--lq-line-strong);
  box-shadow: 0 0 0 3px var(--lq-focus-ring);
  outline: 0;
}

.listing-queue-compact-toggles {
  display: inline-grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0;
  align-items: center;
  width: max-content;
  overflow: hidden;
  border: 1px solid var(--lq-line);
  border-radius: 8px;
  background: var(--lq-panel);
}

.listing-queue-compact-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: max-content 34px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 9px 0 12px;
  color: var(--lq-schedule-muted);
  border-right: 1px solid var(--lq-line);
  font-size: 0.72rem;
  font-weight: 840;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.listing-queue-compact-toggle-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-queue-compact-toggle:last-child {
  border-right: 0;
}

.listing-queue-compact-toggle .listing-queue-toggle-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.listing-queue-compact-toggle:focus-within {
  border-radius: 999px;
  box-shadow: 0 0 0 3px var(--lq-focus-ring);
}

.listing-queue-mini-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  border: 1px solid var(--lq-line);
  border-radius: 999px;
  background: var(--lq-switch-bg);
}

.listing-queue-mini-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--lq-switch-knob);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.16s ease;
}

.listing-queue-toggle-input:checked + .listing-queue-compact-toggle-text + .listing-queue-mini-switch {
  border-color: var(--lq-line-strong);
  background: var(--lq-switch-active-bg);
}

.listing-queue-toggle-input:checked + .listing-queue-compact-toggle-text + .listing-queue-mini-switch::after {
  transform: translateX(16px);
}

.listing-queue-days-cluster {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.listing-queue-day-picker {
  display: grid;
  grid-template-columns: repeat(7, 21px);
  gap: 5px;
  align-items: center;
  justify-content: start;
}

.listing-queue-day-picker label {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  color: var(--lq-schedule-muted);
  border: 0;
  background: transparent;
  font-size: 0.74rem;
  font-weight: 860;
  line-height: 1;
}

.listing-queue-day-picker input {
  position: absolute;
  inset: 18px 0 0;
  width: 100%;
  height: 28px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.listing-queue-day-picker input::before {
  content: none;
}

.listing-queue-day-check {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1px solid var(--lq-line);
  border-radius: 999px;
  background: var(--lq-control-bg);
}

.listing-queue-day-check::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 8px;
  height: 4px;
  border: solid var(--lq-switch-knob);
  border-width: 0 0 2px 2px;
  opacity: 0;
  transform: rotate(-45deg) scale(0.65);
  transform-origin: center;
}

.listing-queue-day-picker input:checked + .listing-queue-day-check {
  border-color: var(--lq-line-strong);
  background: var(--lq-switch-active-bg);
}

.listing-queue-day-picker input:checked + .listing-queue-day-check::after {
  opacity: 1;
}

.listing-queue-day-picker label:focus-within .listing-queue-day-check {
  box-shadow: 0 0 0 3px var(--lq-focus-ring);
}

.listing-queue-window-card {
  min-width: 0;
}

.listing-queue-window-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  align-items: center;
  min-width: 0;
}

.listing-queue-slot-row {
  display: inline-grid;
  grid-template-columns: minmax(46px, auto) 8px minmax(46px, auto) 20px;
  grid-template-areas: "start dash end remove";
  align-items: center;
  gap: 1px;
  min-width: 0;
  min-height: 44px;
  padding: 0 7px 0 8px;
  border: 1px solid var(--lq-schedule-line-strong);
  border-radius: 8px;
  background: var(--lq-schedule-input);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.listing-queue-slot-row:hover {
  background: var(--lq-schedule-input-hover);
}

.listing-queue-slot-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.listing-queue-slot-time {
  position: relative;
  display: grid;
  min-width: 0;
}

.listing-queue-slot-time:first-of-type {
  grid-area: start;
}

.listing-queue-slot-time:last-of-type {
  grid-area: end;
}

.listing-queue-slot-time span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.listing-queue-slot-time input {
  width: 3.14rem;
  min-height: 30px;
  padding: 0;
  color: var(--lq-schedule-text);
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1;
  text-align: center;
}

.listing-queue-slot-time input::-webkit-calendar-picker-indicator {
  display: none;
}

.listing-queue-slot-separator {
  grid-area: dash;
  color: var(--lq-schedule-soft);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.listing-queue-slot-remove {
  display: inline-grid;
  place-items: center;
  width: 20px;
  min-width: 20px;
  height: 30px;
  min-height: 0;
  padding: 0;
  color: var(--lq-schedule-soft);
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.listing-queue-slot-remove {
  grid-area: remove;
}

.listing-queue-slot-remove .listing-queue-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.1;
}

.listing-queue-add-slot {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  min-height: 44px;
  padding: 0;
  color: var(--lq-purple-chip-color);
  border: 1px solid var(--lq-schedule-line-strong);
  border-radius: 8px;
  background: var(--lq-schedule-input);
}

.listing-queue-add-slot .listing-queue-icon {
  width: 16px;
  height: 16px;
}

.listing-queue-add-slot:hover:not(:disabled),
.listing-queue-slot-remove:hover:not(:disabled) {
  color: var(--lq-schedule-text);
  background: var(--lq-schedule-input-hover);
}

.listing-queue-dash-separator {
  color: var(--lq-schedule-soft);
  font-size: 0.92rem;
  font-weight: 820;
  text-align: center;
}

.listing-queue-vertical-rule {
  display: block;
  align-self: stretch;
  width: 1px;
  min-height: 34px;
  background: var(--lq-schedule-line);
}

.listing-queue-inline-field {
  display: inline-grid;
  grid-template-columns: auto auto minmax(56px, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--lq-schedule-muted);
  font-size: 0.8rem;
  font-weight: 840;
  line-height: 1;
  white-space: nowrap;
}

.listing-queue-inline-field .listing-queue-icon {
  width: 22px;
  height: 22px;
  color: var(--lq-purple-chip-color);
  stroke-width: 2.1;
}

.listing-queue-inline-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  color: var(--lq-schedule-text);
  border: 1px solid var(--lq-schedule-line-strong);
  border-radius: 8px;
  background: var(--lq-schedule-input);
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1;
}

.listing-queue-inline-field:not(.listing-queue-blocked-days):not(:has(.listing-queue-icon)) {
  grid-template-columns: auto minmax(56px, 1fr);
}

.listing-queue-inline-field.listing-queue-blocked-days {
  margin-top: 0;
}

.listing-queue-caps-band .listing-queue-inline-field {
  grid-template-columns: auto max-content;
  gap: 8px;
}

.listing-queue-caps-band .listing-queue-inline-field input {
  width: 86px;
  min-width: 0;
}

.listing-queue-caps-band .listing-queue-blocked-days input {
  width: 112px;
}

.listing-queue-inline-hint {
  color: var(--lq-schedule-soft);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width: 899px) {
  .listing-queue-top-band,
  .listing-queue-windows-band,
  .listing-queue-caps-band {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .listing-queue-cap-cluster {
    grid-auto-flow: column;
    grid-template-columns: repeat(2, max-content);
    grid-auto-columns: initial;
  }

  .listing-queue-cap-blocked-cluster {
    grid-auto-flow: row;
    grid-template-columns: max-content;
  }

  .listing-queue-mode-field,
  .listing-queue-days-cluster {
    grid-template-columns: auto minmax(0, max-content);
    justify-content: start;
  }

  .listing-queue-window-half {
    grid-template-columns: auto minmax(0, max-content);
    justify-content: start;
  }

  .listing-queue-top-band .listing-queue-mode-field,
  .listing-queue-top-band .listing-queue-days-cluster {
    width: auto;
    justify-self: start;
  }

  .listing-queue-compact-toggles,
  .listing-queue-day-picker,
  .listing-queue-window-slots {
    justify-content: start;
  }

  .listing-queue-vertical-rule,
  .listing-queue-dash-separator {
    display: none;
  }
}

@media (max-width: 620px) {
  .listing-queue-compact-band {
    padding: 18px;
  }

  .listing-queue-mode-field,
  .listing-queue-days-cluster,
  .listing-queue-window-half,
  .listing-queue-inline-field {
    grid-template-columns: 1fr;
  }

  .listing-queue-cap-cluster {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    align-items: stretch;
    width: 100%;
  }

  .listing-queue-caps-band .listing-queue-inline-field {
    grid-template-columns: 1fr;
  }

  .listing-queue-caps-band .listing-queue-inline-field input {
    width: 100%;
  }

  .listing-queue-compact-toggles {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .listing-queue-day-picker {
    grid-template-columns: repeat(4, 32px);
  }

  .listing-queue-window-slots {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .listing-queue-slot-row {
    grid-template-columns: minmax(46px, 1fr) 8px minmax(46px, 1fr) 20px;
  }
}

.listing-queue-section-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  padding: 0;
  margin: 0;
  color: var(--lq-schedule-text);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.listing-queue-schedule-panel {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.listing-queue-settings-section {
  display: grid;
  grid-template-columns: minmax(340px, 0.31fr) minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: var(--lq-settings-section-border);
  border-radius: 8px;
  background: var(--lq-schedule-bg);
  box-shadow: var(--lq-panel-shadow);
}

.listing-queue-settings-section + .listing-queue-settings-section {
  border-top: 0;
}

.listing-queue-section-intro {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding: 23px 24px;
  border-right: var(--lq-section-intro-border);
  background: var(--lq-section-intro-bg);
}

.listing-queue-section-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 34px;
  color: var(--lq-schedule-text);
}

.listing-queue-section-icon .listing-queue-icon {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}

.listing-queue-section-intro h3 {
  color: var(--lq-schedule-text);
  font-size: 0.98rem;
  font-weight: 860;
  line-height: 1.15;
}

.listing-queue-section-intro p {
  max-width: 260px;
  margin-top: 8px;
  color: var(--lq-schedule-soft);
  font-size: 0.8rem;
  line-height: 1.38;
}

.listing-queue-section-body {
  min-width: 0;
  padding: 22px 28px;
}

.listing-queue-publishing-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(170px, 0.9fr) minmax(260px, 1.45fr);
  gap: 0;
  align-items: start;
}

.listing-queue-publishing-grid > * {
  min-width: 0;
  padding-inline: 20px;
  border-left: 1px solid var(--lq-schedule-line);
}

.listing-queue-publishing-grid > :first-child {
  padding-left: 0;
  border-left: 0;
}

.listing-queue-publishing-grid > :last-child {
  padding-right: 0;
}

.listing-queue-switch-field,
.listing-queue-control-field {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.listing-queue-control-label,
.listing-queue-section-settings .listing-queue-row-label,
.listing-queue-section-settings .listing-queue-inline-field > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--lq-schedule-muted);
  font-size: 0.82rem;
  font-weight: 840;
  line-height: 1.1;
  white-space: nowrap;
}

.listing-queue-info-dot {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 17px;
  height: 17px;
  color: var(--lq-schedule-soft);
  border: 1px solid var(--lq-schedule-line-strong);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  font-style: normal;
  line-height: 1;
}

.listing-queue-switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  min-height: 38px;
  cursor: pointer;
}

.listing-queue-switch-control .listing-queue-toggle-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.listing-queue-switch-control .listing-queue-switch {
  width: 50px;
  height: 28px;
}

.listing-queue-switch-control .listing-queue-switch::after {
  width: 22px;
  height: 22px;
}

.listing-queue-switch-control .listing-queue-toggle-input:checked + .listing-queue-switch::after {
  transform: translateX(22px);
}

.listing-queue-toggle-value {
  color: var(--lq-schedule-text);
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1;
}

.listing-queue-toggle-value-off {
  display: none;
}

.listing-queue-toggle-input:not(:checked) ~ .listing-queue-toggle-value .listing-queue-toggle-value-on {
  display: none;
}

.listing-queue-toggle-input:not(:checked) ~ .listing-queue-toggle-value .listing-queue-toggle-value-off {
  display: inline;
}

.listing-queue-select-shell,
.listing-queue-text-shell {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--lq-schedule-line-strong);
  border-radius: 8px;
  background: var(--lq-schedule-input);
}

.listing-queue-select-shell {
  min-height: 44px;
  padding-inline: 14px 6px;
}

.listing-queue-text-shell {
  min-height: 44px;
  padding-inline: 14px;
}

.listing-queue-select-shell .listing-queue-icon,
.listing-queue-text-shell .listing-queue-icon {
  width: 22px;
  height: 22px;
  color: var(--lq-schedule-muted);
  stroke-width: 2;
}

.listing-queue-section-settings .listing-queue-mode-field {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.listing-queue-section-settings .listing-queue-mode-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 30px 0 0;
  color: var(--lq-schedule-text);
  border: 0;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1;
}

.listing-queue-section-settings .listing-queue-mode-field select:focus,
.listing-queue-text-shell:focus-within,
.listing-queue-select-shell:focus-within {
  outline: 0;
  border-color: var(--lq-line-strong);
  box-shadow: 0 0 0 3px var(--lq-focus-ring);
}

.listing-queue-section-settings .listing-queue-mode-field small {
  color: var(--lq-schedule-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.listing-queue-window-body,
.listing-queue-volume-body {
  display: grid;
  align-content: start;
  gap: 18px;
}

.listing-queue-section-settings .listing-queue-days-cluster {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.listing-queue-section-settings .listing-queue-day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.listing-queue-section-settings .listing-queue-day-picker label {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 58px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--lq-schedule-soft);
  border: 1px solid var(--lq-schedule-line-strong);
  border-radius: 8px;
  background: var(--lq-schedule-input);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.listing-queue-section-settings .listing-queue-day-picker label:has(input:checked) {
  color: #fff;
  border-color: var(--lq-line-strong);
  background: var(--lq-primary-bg);
  box-shadow: var(--lq-primary-shadow);
}

.listing-queue-section-settings .listing-queue-day-name {
  color: currentColor;
}

.listing-queue-section-settings .listing-queue-day-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.listing-queue-section-settings .listing-queue-day-check {
  order: -1;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: color-mix(in srgb, var(--lq-control-bg) 84%, transparent);
}

.listing-queue-section-settings .listing-queue-day-check::after {
  top: 48%;
  left: 50%;
  width: 9px;
  height: 5px;
  border-width: 0 0 2.25px 2.25px;
  transform: translate(-50%, -50%) rotate(-45deg) scale(1);
}

.listing-queue-section-settings .listing-queue-day-picker label:has(input:checked) .listing-queue-day-check {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.22);
}

.listing-queue-window-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  padding-top: 18px;
  border-top: 1px solid var(--lq-schedule-line);
}

.listing-queue-section-settings .listing-queue-window-half {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding-right: 22px;
}

.listing-queue-section-settings .listing-queue-window-half + .listing-queue-window-half {
  padding-right: 0;
  padding-left: 22px;
  border-left: 1px solid var(--lq-schedule-line);
}

.listing-queue-section-settings .listing-queue-window-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.listing-queue-section-settings .listing-queue-slot-row {
  min-height: 40px;
}

.listing-queue-section-settings .listing-queue-add-slot {
  display: inline-flex;
  gap: 8px;
  width: auto;
  min-width: 0;
  padding-inline: 12px;
  color: var(--lq-purple-chip-color);
  border-style: dashed;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 820;
}

.listing-queue-blocked-row {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(220px, 1fr);
  gap: 22px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid var(--lq-schedule-line);
}

.listing-queue-section-settings .listing-queue-blocked-days {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 0;
  white-space: normal;
}

.listing-queue-section-settings .listing-queue-blocked-days input {
  width: 100%;
  min-height: 42px;
  padding: 0;
  color: var(--lq-schedule-text);
  border: 0;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 760;
}

.listing-queue-section-settings .listing-queue-blocked-days input:focus {
  outline: 0;
  box-shadow: none;
}

.listing-queue-section-settings .listing-queue-inline-hint {
  align-self: end;
  color: var(--lq-schedule-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.listing-queue-volume-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 20px;
  min-width: 0;
}

.listing-queue-section-settings .listing-queue-volume-grid .listing-queue-inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  white-space: normal;
}

.listing-queue-section-settings .listing-queue-volume-grid .listing-queue-inline-field input {
  width: 100%;
  min-height: 44px;
  padding-inline: 16px;
  color: var(--lq-schedule-text);
  border: 1px solid var(--lq-schedule-line-strong);
  border-radius: 8px;
  background: var(--lq-schedule-input);
  font-size: 0.9rem;
  font-weight: 760;
}

.listing-queue-volume-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lq-schedule-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.listing-queue-volume-hint .listing-queue-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

@media (max-width: 1180px) {
  .listing-queue-settings-section {
    grid-template-columns: minmax(300px, 0.32fr) minmax(0, 1fr);
  }

  .listing-queue-publishing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .listing-queue-publishing-grid > * {
    padding-inline: 18px;
  }

  .listing-queue-publishing-grid > :nth-child(3) {
    grid-column: 1 / -1;
    padding: 18px 0 0;
    border-top: 1px solid var(--lq-schedule-line);
    border-left: 0;
  }

  .listing-queue-volume-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .listing-queue-settings-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .listing-queue-section-intro {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 18px;
    border-right: 0;
    border-bottom: var(--lq-section-intro-border);
  }

  .listing-queue-section-body {
    padding: 18px;
  }

  .listing-queue-publishing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .listing-queue-section-settings .listing-queue-days-cluster {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .listing-queue-window-groups,
  .listing-queue-blocked-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .listing-queue-section-settings .listing-queue-window-half,
  .listing-queue-section-settings .listing-queue-window-half + .listing-queue-window-half {
    padding: 0;
    border-left: 0;
  }

  .listing-queue-section-settings .listing-queue-window-half + .listing-queue-window-half {
    padding-top: 18px;
    border-top: 1px solid var(--lq-schedule-line);
  }
}

@media (max-width: 620px) {
  .listing-queue-section-intro {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
  }

  .listing-queue-section-icon {
    display: none;
  }

  .listing-queue-section-intro p {
    max-width: none;
  }

  .listing-queue-publishing-grid,
  .listing-queue-volume-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .listing-queue-publishing-grid > *,
  .listing-queue-publishing-grid > :first-child,
  .listing-queue-publishing-grid > :last-child,
  .listing-queue-publishing-grid > :nth-child(3) {
    grid-column: auto;
    padding: 0;
    border: 0;
  }

  .listing-queue-publishing-grid > * + * {
    padding-top: 14px;
    border-top: 1px solid var(--lq-schedule-line);
  }

  .listing-queue-section-settings .listing-queue-day-picker label {
    min-width: 54px;
  }

  .listing-queue-section-settings .listing-queue-window-slots {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .listing-queue-section-settings .listing-queue-slot-row,
  .listing-queue-section-settings .listing-queue-add-slot {
    width: 100%;
  }
}

.toolbar.filters-open #dashboardFilterSheet #statusFilters.dashboard-status-strip {
  grid-template-columns: minmax(0, 1fr) !important;
}
