/* product-settings.css - the subjects-redesign product-settings surface.
   Ported from dashboard/mockups/product-settings/index.html (the approved design).
   SCOPED under .ps-redesign so it cannot touch the legacy flag=false products page,
   insights, ask-honestly, or the catalog/affiliates tabbars (which share the
   .ps-table / .row-* / .attr-modal / .sm-* class names). Design tokens + the
   .btn/.badge/.filter-chip/.auth-input/.icon-btn atoms already live in shared.css. */


/* ════════════════════════════════════════════════════════════════
   PAGE SHELL — ps-page (mirrors app.css)
════════════════════════════════════════════════════════════════ */
.ps-redesign .ps-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}
.ps-redesign .ps-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 0 16px -4px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--radius);
  cursor: pointer;
}
.ps-redesign .ps-close:hover {
  color: var(--text-primary);
  background: var(--page-bg);
}
.ps-redesign .ps-close svg {
  width: 16px;
  height: 16px;
}
.ps-redesign .ps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ps-redesign .ps-title {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.ps-redesign .ps-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-redesign .ps-cadence-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 6px 0 12px;
  background: var(--page-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
}
.ps-redesign .ps-cadence-card-label {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.ps-redesign .cadence-day-grid {
  display: inline-flex;
  gap: 2px;
}
.ps-redesign .cadence-day {
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}
.ps-redesign .cadence-day:hover {
  background: var(--surface-bg);
}
.ps-redesign .cadence-day.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent-border);
}

/* ════════════════════════════════════════════════════════════════
   TAB BAR — cp-tabbar (mirrors posts.css)
════════════════════════════════════════════════════════════════ */
.ps-redesign .cp-tabbar {
  display: flex;
  gap: 0;
  padding: 4px 0 0;
  align-items: center;
  position: relative;
}
.ps-redesign .cp-tabbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--border-default);
}
.ps-redesign .cp-tab {
  padding: 10px 16px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 200ms var(--ease-apple);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.ps-redesign .cp-tab:first-of-type {
  padding-left: 0;
}
.ps-redesign .cp-tab.active {
  color: var(--accent);
}
.ps-redesign .cp-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 0;
}
.ps-redesign .cp-tab:first-of-type.active::after {
  left: 0;
}
.ps-redesign .cp-tab-spacer {
  flex: 1;
}

/* Sub-filter row under tabs (the watchlist-as-attribute pill row) */
.ps-redesign .ps-subfilter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 0;
}
.ps-redesign .ps-subfilter-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
}

/* ════════════════════════════════════════════════════════════════
   PRODUCTS TABLE — ps-table (mirrors app.css)
════════════════════════════════════════════════════════════════ */
.ps-redesign .ps-table-wrap {
  margin-top: 16px;
}
.ps-redesign .ps-table {
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--page-bg);
}
.ps-redesign .ps-table-headrow,
.ps-redesign .ps-table-row {
  display: grid;
  grid-template-columns: 32px 44px 96px minmax(0,1fr) 110px 100px 110px 64px;
  column-gap: 16px;
  align-items: center;
}
.ps-redesign .ps-table-headrow {
  padding: 10px 16px;
  background: var(--surface-bg);
  border-bottom: 1px solid var(--border-default);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ps-redesign .ps-table-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--text-primary);
  transition: background var(--transition-fast);
  min-height: 64px;
  cursor: pointer;
}
.ps-redesign .ps-table-row:last-child {
  border-bottom: none;
}
.ps-redesign .ps-table-row:hover {
  background: var(--surface-bg);
}
.ps-redesign .ps-table-row.selected {
  background: var(--accent-subtle);
}
.ps-redesign .row-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.ps-redesign .row-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--surface-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
}
.ps-redesign .row-thumb svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.4;
}
.ps-redesign .row-sku {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 10.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-redesign .row-nameblock {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-redesign .row-nameblock-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ps-redesign .row-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-redesign .row-brand {
  color: var(--text-tertiary);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-redesign .row-scope-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--surface-bg);
  color: var(--text-tertiary);
}
.ps-redesign .row-scope-chip.watchlist {
  background: rgba(255,189,68,0.15);
  color: #946700;
}
html.dark .ps-redesign .row-scope-chip.watchlist {
  color: #ffbd44;
}
.ps-redesign .row-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
}
.ps-redesign .row-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.ps-redesign .row-status.enabled {
  color: var(--positive);
}
.ps-redesign .row-status.enabled .row-status-dot {
  background: var(--positive);
}
.ps-redesign .row-terms-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}
.ps-redesign .row-terms-count strong {
  font-weight: 500;
  color: var(--text-primary);
}
.ps-redesign .row-last {
  font-size: 11px;
  color: var(--text-tertiary);
}
.ps-redesign .row-actions {
  display: inline-flex;
  gap: 2px;
  justify-content: flex-end;
}
.ps-redesign .row-overflow-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--radius);
  cursor: pointer;
}
.ps-redesign .row-overflow-btn:hover {
  color: var(--text-primary);
  background: var(--page-bg);
}
.ps-redesign .row-overflow-btn svg {
  width: 14px;
  height: 14px;
}

/* ════════════════════════════════════════════════════════════════
   SCRAPES MODAL — extends filters-modal pattern, wide w/ sidebar
════════════════════════════════════════════════════════════════ */
.ps-redesign .scrapes-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--modal-backdrop-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-redesign .scrapes-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.ps-redesign .scrapes-modal {
  width: 1080px;
  max-width: calc(100vw - 32px);
  height: calc(100vh - 80px);
  max-height: 820px;
  background: var(--page-bg);
  border: 1px solid var(--border-default);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(44, 48, 80, 0.22);
}
.ps-redesign .scrapes-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.ps-redesign .scrapes-modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ps-redesign .scrapes-modal-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--surface-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.ps-redesign .scrapes-modal-thumb svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.4;
}
.ps-redesign .scrapes-modal-titleblock {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ps-redesign .scrapes-modal-title {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-redesign .scrapes-modal-subtitle {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: 'Host Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ps-redesign .scrapes-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.ps-redesign .scrapes-modal-icon-btn,
.ps-redesign .scrapes-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.ps-redesign .scrapes-modal-icon-btn:hover,
.ps-redesign .scrapes-modal-close:hover {
  background: var(--surface-bg);
  color: var(--text-primary);
}
.ps-redesign .scrapes-modal-icon-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.5;
}

/* Body = sidebar + content */
.ps-redesign .scrapes-modal-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ── Sidebar ── */
.ps-redesign .sm-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-subtle);
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ps-redesign .sm-sidebar-head {
  padding: 14px 16px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ps-redesign .sm-sidebar-head-count {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.ps-redesign .sm-term-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-redesign .sm-term-item {
  position: relative;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ps-redesign .sm-term-item:hover {
  background: var(--accent-subtle);
}
.ps-redesign .sm-term-item.active {
  background: var(--accent-subtle);
  border-color: var(--accent-border);
}
.ps-redesign .sm-term-item.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 0;
}
.ps-redesign .sm-term-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
}
.ps-redesign .sm-term-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.ps-redesign .sm-term-dirty {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.ps-redesign .sm-term-meta {
  font-size: 10.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ps-redesign .sm-term-meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.ps-redesign .sm-sidebar-foot {
  padding: 8px;
  border-top: 1px solid var(--border-subtle);
}
.ps-redesign .sm-add-term-btn {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--page-bg);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}
.ps-redesign .sm-add-term-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}
.ps-redesign .sm-add-term-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Content (right pane) ── */
.ps-redesign .sm-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 0 28px;
}
.ps-redesign .sm-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-redesign .sm-section:last-child {
  border-bottom: none;
}
.ps-redesign .sm-section-title {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-redesign .sm-section-title-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0;
  font-weight: 400;
}

/* Search term input — slightly bigger than auth-input */
.ps-redesign .sm-term-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 4px 6px 4px 14px;
  background: var(--page-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.ps-redesign .sm-term-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
.ps-redesign .sm-term-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
}
.ps-redesign .sm-term-input-action {
  height: 32px;
  padding: 0 12px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-fast);
}
.ps-redesign .sm-term-input-action:hover {
  background: rgba(68,84,225,0.14);
}
.ps-redesign .sm-term-input-action svg {
  width: 13px;
  height: 13px;
  stroke-width: 1.6;
}

/* Attribute badges + edit affordance */
.ps-redesign .sm-attr-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ps-redesign .sm-attr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid transparent;
}
.ps-redesign .sm-attr-badge.muted {
  background: var(--surface-bg);
  color: var(--text-secondary);
}
.ps-redesign .sm-attr-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px dashed var(--border-default);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.ps-redesign .sm-attr-edit-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}
.ps-redesign .sm-attr-edit-btn svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.6;
}
.ps-redesign .sm-attr-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Two-column compact row for Depth + Last scrape */
.ps-redesign .sm-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.ps-redesign .sm-meta-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ps-redesign .sm-meta-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ps-redesign .sm-depth-select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  background: var(--page-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  appearance: auto;
}
.ps-redesign .sm-depth-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
.ps-redesign .sm-last-scrape-value {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: var(--surface-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-primary);
}
.ps-redesign .sm-last-scrape-relative {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-tertiary);
}
.ps-redesign .sm-last-scrape-value.empty {
  color: var(--text-tertiary);
  font-style: italic;
}

/* Command board */
.ps-redesign .sm-commands {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ps-redesign .sm-command {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--page-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all var(--transition-fast);
}
.ps-redesign .sm-command:hover {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}
.ps-redesign .sm-command:hover .sm-command-icon {
  color: var(--accent);
}
.ps-redesign .sm-command.danger:hover {
  border-color: rgba(255,96,92,0.4);
  background: rgba(255,96,92,0.06);
}
.ps-redesign .sm-command.danger:hover .sm-command-icon {
  color: var(--negative);
}
.ps-redesign .sm-command-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--surface-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}
.ps-redesign .sm-command-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.5;
}
.ps-redesign .sm-command-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ps-redesign .sm-command-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
}
.ps-redesign .sm-command-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* Platforms section */
.ps-redesign .sm-platforms-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.ps-redesign .sm-platforms-head-spacer {
  flex: 1;
}
.ps-redesign .sm-platforms-head-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}
.ps-redesign .sm-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ps-redesign .sm-inline-field-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.ps-redesign .sm-inline-field .sm-depth-select {
  width: 96px;
  height: 32px;
  padding: 0 8px;
  font-size: 12.5px;
  font-family: 'Host Grotesk', sans-serif;
  letter-spacing: -0.01em;
  background: var(--page-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  appearance: auto;
}
.ps-redesign .sm-inline-field .sm-depth-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
.ps-redesign .sm-platforms-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
.ps-redesign .sm-platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}
.ps-redesign .sm-platform-card:hover {
  border-color: var(--border-accent);
}
.ps-redesign .sm-platform-card.active {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}
.ps-redesign .sm-platform-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  opacity: 0.4;
  transition: opacity var(--transition-fast);
}
.ps-redesign .sm-platform-card.active .sm-platform-icon {
  opacity: 1;
}
.ps-redesign .sm-platform-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  transition: color var(--transition-fast);
}
.ps-redesign .sm-platform-card.active .sm-platform-label {
  color: var(--accent);
}

/* Schedule section */
.ps-redesign .sm-schedule-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ps-redesign .sm-schedule-grid {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--page-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
}
.ps-redesign .sm-day {
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}
.ps-redesign .sm-day:hover {
  background: var(--surface-bg);
}
.ps-redesign .sm-day.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent-border);
}
.ps-redesign .sm-schedule-summary {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

/* Scrape history table */
.ps-redesign .sm-history-table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--page-bg);
}
.ps-redesign .sm-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ps-redesign .sm-history-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  background: var(--surface-bg);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.ps-redesign .sm-history-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.ps-redesign .sm-history-table tbody tr:last-child td {
  border-bottom: none;
}
.ps-redesign .sm-history-table tbody tr:hover td {
  background: var(--accent-subtle);
}
.ps-redesign .sm-history-date {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.ps-redesign .sm-history-num,
.ps-redesign th.sm-history-num {
  text-align: right;
  font-family: 'Host Grotesk', sans-serif;
  white-space: nowrap;
}
.ps-redesign .sm-history-num strong {
  font-weight: 500;
  color: var(--text-primary);
}
.ps-redesign .sm-history-trigger {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius);
  background: var(--surface-bg);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ps-redesign .sm-history-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
}
.ps-redesign .sm-history-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.ps-redesign .sm-history-status--success {
  color: var(--positive);
}
.ps-redesign .sm-history-status--success .sm-history-status-dot {
  background: var(--positive);
}
.ps-redesign .sm-history-status--failed {
  color: var(--negative);
}
.ps-redesign .sm-history-status--failed .sm-history-status-dot {
  background: var(--negative);
}
.ps-redesign .sm-history-status--queued {
  color: var(--accent);
}
.ps-redesign .sm-history-status--queued .sm-history-status-dot {
  background: var(--accent);
}
.ps-redesign .sm-history-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius);
  color: var(--text-tertiary);
  font-size: 12.5px;
}
.ps-redesign .sm-history-empty strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Footer ── */
.ps-redesign .scrapes-modal-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--page-bg);
  flex-shrink: 0;
}
.ps-redesign .sm-launch-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.ps-redesign .sm-launch-preview-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.ps-redesign .sm-launch-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--page-bg);
  border: 1px solid var(--border-default);
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 500;
  max-width: 200px;
}
.ps-redesign .sm-launch-chip-term {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ps-redesign .sm-launch-chip-depth {
  flex-shrink: 0;
  font-family: 'Host Grotesk', sans-serif;
  font-size: 10px;
  color: var(--text-tertiary);
  padding: 0 4px;
  background: var(--surface-bg);
  border-radius: 0;
}
.ps-redesign .sm-launch-chip.new {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
  color: var(--accent);
}
.ps-redesign .sm-launch-chip.new .sm-launch-chip-depth {
  background: rgba(68,84,225,0.16);
  color: var(--accent);
}
.ps-redesign .sm-launch-empty {
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-style: italic;
}
.ps-redesign .sm-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ps-redesign .btn-launch {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
}

/* ════════════════════════════════════════════════════════════════
   ATTRIBUTE EDIT MODAL (nested, opens over scrapes modal)
════════════════════════════════════════════════════════════════ */
.ps-redesign .attr-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--modal-backdrop-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-redesign .attr-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.ps-redesign .attr-modal {
  width: 480px;
  max-height: calc(100vh - 120px);
  background: var(--page-bg);
  border: 1px solid var(--border-default);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(44, 48, 80, 0.22);
}
.ps-redesign .attr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.ps-redesign .attr-modal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ps-redesign .attr-modal-footer {
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
}
.ps-redesign .attr-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--page-bg);
}
.ps-redesign .attr-edit-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}
.ps-redesign .attr-edit-row .attr-edit-remove {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-tertiary);
  border-radius: var(--radius);
  cursor: pointer;
}
.ps-redesign .attr-edit-row .attr-edit-remove:hover {
  color: var(--negative);
  background: rgba(255,96,92,0.1);
}
.ps-redesign .attr-edit-row .attr-edit-remove svg {
  width: 12px;
  height: 12px;
}
.ps-redesign .attr-add-btn {
  margin-top: 6px;
  width: 100%;
  height: 36px;
  background: var(--page-bg);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ps-redesign .attr-add-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}
.ps-redesign .attr-add-btn svg {
  width: 14px;
  height: 14px;
}
