/* items-style.css - Styles specific to items.html */

.items-form-card,
.items-list-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
}

/* Single-product eBay preparation */
.ebay-upload-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #dbe3ef;
}

.ebay-upload-tab {
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #64748b;
  font-weight: 700;
}

.ebay-upload-tab:hover,
.ebay-upload-tab:focus-visible {
  color: #1d4ed8;
}

.ebay-upload-tab.is-active {
  border-bottom-color: #2563eb;
  color: #1e3a8a;
}

.ebay-upload-tab:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

#ebay-latest-upload-error {
  margin-bottom: 14px;
}

#ebay-latest-upload-error[hidden],
#ebay-status-panel[hidden],
#ebay-data-panel[hidden] {
  display: none;
}

.account-toolbar {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ebay-seller-toolbar-button {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.ebay-oauth-result {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border: 2px solid #93c5fd;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a5f;
}

.ebay-oauth-result[hidden] {
  display: none;
}

.ebay-oauth-result:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.ebay-oauth-result--success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #14532d;
}

.ebay-oauth-result--error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #7f1d1d;
}

.ebay-oauth-result-icon {
  flex: 0 0 auto;
  font-size: 1.35rem;
  line-height: 1.2;
}

.ebay-oauth-result-content {
  min-width: 0;
}

.ebay-oauth-result h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 800;
}

.ebay-oauth-result-message {
  margin: 0 0 6px;
  font-weight: 800;
}

.ebay-oauth-result-guidance,
.ebay-oauth-result-fallback {
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.ebay-oauth-result-close {
  min-height: 44px;
}

.ebay-oauth-result-fallback {
  margin-top: 10px;
  margin-bottom: 0;
  font-weight: 700;
}

.ebay-seller-dialog {
  max-width: 520px;
}

.ebay-seller-dialog .modal-content {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 16px;
}

.ebay-seller-dialog .modal-header,
.ebay-seller-dialog .modal-body,
.ebay-seller-dialog .modal-footer,
#ebay-seller-dialog-populated {
  min-width: 0;
  max-width: 100%;
}

#ebay-seller-dialog-populated {
  overflow: hidden;
}

.ebay-seller-dialog-body {
  min-width: 0;
  background: #f8fafc;
}

.ebay-seller-dialog-state,
.ebay-seller-dialog-status {
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.5;
}

.ebay-seller-dialog-state {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
}

.ebay-seller-dialog-state[hidden],
.ebay-seller-dialog-status[hidden] {
  display: none;
}

.ebay-seller-dialog-state h6,
#ebay-seller-dialog-list-title {
  margin: 0 0 5px;
  color: #1e293b;
  font-weight: 800;
}

.ebay-seller-dialog-status {
  margin-bottom: 10px;
}

.ebay-seller-binding-list {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ebay-seller-binding-item {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
}

.ebay-seller-binding-id {
  min-width: 0;
  max-width: 100%;
  flex: 1 1 240px;
  color: #1e293b;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.ebay-seller-binding-environment {
  flex: 0 0 auto;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.ebay-seller-dialog-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.ebay-seller-dialog-actions .btn,
.ebay-seller-dialog-close {
  min-width: 44px;
  min-height: 44px;
}

.ebay-preparation-dialog .modal-content {
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.ebay-preparation-header {
  align-items: flex-start;
  padding: 18px 22px;
  border-bottom-color: rgba(203, 213, 225, 0.82);
}

.ebay-preparation-eyebrow {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ebay-preparation-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 3px;
}

.ebay-preparation-context .ebay-preparation-eyebrow {
  margin-bottom: 0;
}

.ebay-preparation-product {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.84rem;
}

.ebay-preparation-body {
  padding: 20px 22px 24px;
  background: #f8fafc;
}

.ebay-status,
.ebay-helper-status {
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.45;
}

.ebay-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ebay-status[hidden] {
  display: none;
}

.ebay-policy-location-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 8px 0 14px;
}

.ebay-policy-location-controls .form-text {
  margin: 0;
}

.ebay-error-summary {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 10px;
  background: #fff7f7;
  color: #7f1d1d;
  outline: none;
}

.ebay-error-summary:focus-visible {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.ebay-error-summary h6 {
  margin: 0 0 5px;
  font-weight: 800;
}

.ebay-error-summary ul {
  margin: 8px 0 0;
  padding-left: 1.25rem;
}

.ebay-error-retry {
  font-weight: 700;
}

.ebay-loading-state,
.ebay-empty-state {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 12px;
  background: #ffffff;
  color: #475569;
}

.ebay-empty-state > .bi {
  color: #64748b;
  font-size: 1.7rem;
}

.ebay-empty-state h6 {
  margin: 0 0 5px;
  color: #1e293b;
  font-weight: 800;
}

.ebay-empty-state p {
  max-width: 66ch;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.ebay-preparation-notice,
.ebay-review-heading,
.ebay-success-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 10px;
}

.ebay-preparation-notice {
  margin-bottom: 14px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0c4a6e;
  font-size: 0.87rem;
  line-height: 1.5;
}

.ebay-preparation-notice > .bi {
  margin-top: 2px;
}

.ebay-preparation-section {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 12px;
  background: #ffffff;
}

.ebay-preparation-section > legend {
  float: none;
  width: auto;
  margin: 0 0 12px;
  color: #1e293b;
  font-size: 0.92rem;
  font-weight: 850;
}

.ebay-preparation-grid,
.ebay-aspects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.ebay-preparation-grid--policies {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 10px;
}

.ebay-field {
  min-width: 0;
}

.ebay-field--category-search {
  grid-row: span 2;
}

.ebay-field .form-label {
  margin-bottom: 5px;
  color: #334155;
  font-size: 0.79rem;
  font-weight: 800;
}

.ebay-field .form-control,
.ebay-field .form-select,
.ebay-field .btn {
  min-height: 42px;
}

.ebay-field [aria-invalid="true"],
#ebay-selected-category[aria-invalid="true"],
#ebay-aspects[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 0.18rem rgba(220, 38, 38, 0.12);
}

.ebay-environment-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.ebay-environment-badge--sandbox {
  border-color: #fbbf24;
  background: #fffbeb;
  color: #854d0e;
}

.ebay-environment-badge--production {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.ebay-environment-badge--unset {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}

.ebay-category-results {
  display: grid;
  gap: 7px;
  max-height: 210px;
  margin-top: 8px;
  overflow-y: auto;
}

.ebay-category-result {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  text-align: left;
}

.ebay-category-result:hover,
.ebay-category-result:focus-visible,
.ebay-category-result.is-selected {
  border-color: #0d6efd;
  background: #eff6ff;
}

.ebay-category-result-name,
.ebay-category-result-path {
  display: block;
}

.ebay-category-result-name {
  font-size: 0.86rem;
  font-weight: 800;
}

.ebay-category-result-path {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.74rem;
}

.ebay-selected-category,
.ebay-helper-empty {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.84rem;
}

.ebay-helper-empty {
  margin: 0;
}

.ebay-aspect-combobox {
  min-width: 0;
}

.ebay-aspect-listbox {
  max-height: 210px;
  margin-top: 6px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

.ebay-aspect-listbox[hidden] {
  display: none;
}

.ebay-aspect-option {
  padding: 8px 10px;
  color: #1e293b;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.ebay-aspect-option + .ebay-aspect-option {
  border-top: 1px solid #e2e8f0;
}

.ebay-aspect-option:hover,
.ebay-aspect-option.is-active,
.ebay-aspect-option[aria-selected="true"] {
  background: #eff6ff;
  color: #1e3a8a;
}

.ebay-aspect-option.is-active {
  box-shadow: inset 3px 0 0 #0d6efd;
}

.ebay-aspect-combobox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.ebay-aspect-page-status {
  color: #64748b;
  font-size: 0.76rem;
}

.ebay-aspect-paging {
  display: inline-flex;
  gap: 6px;
}

.ebay-aspects-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 9px;
}

.ebay-aspects-heading h6 {
  margin: 0;
  font-weight: 800;
}

.ebay-aspects-heading span {
  min-width: 0;
  color: #64748b;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ebay-review-heading,
.ebay-success-heading {
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.ebay-review-heading h6,
.ebay-success-heading h6 {
  margin: 0 0 4px;
  font-weight: 850;
}

.ebay-review-heading h6:focus-visible,
.ebay-success-heading h6:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.35);
  outline-offset: 3px;
}

.ebay-review-heading p,
.ebay-success-heading p {
  margin: 0;
  font-size: 0.87rem;
}

.ebay-success-heading {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}

.ebay-result-panel {
  min-width: 0;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #cbd5e1;
}

.ebay-result-heading,
.ebay-attempt-history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ebay-result-heading {
  margin-bottom: 8px;
}

.ebay-result-heading-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.ebay-result-heading-status > .bi {
  font-size: 1.05rem;
}

#ebay-success-actions.is-status-only #ebay-edit-prepared-button,
#ebay-success-actions.is-status-only #ebay-submit-publish-button {
  display: none;
}

.ebay-result-heading h6,
.ebay-attempt-history-heading h6 {
  margin: 0;
  color: #1e293b;
  font-weight: 850;
}

.ebay-result-heading h6:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.35);
  outline-offset: 3px;
}

.ebay-result-effect {
  margin: 0 0 12px;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.55;
}

.ebay-result-progress,
.ebay-result-resume-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ebay-result-listing {
  margin-top: 12px;
}

.ebay-result-listing a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #0d6efd;
  border-radius: 8px;
  color: #0d6efd;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ebay-result-listing a:hover,
.ebay-result-listing a:focus-visible {
  background: #eff6ff;
}

.ebay-attempt-history-section {
  min-width: 0;
  margin-top: 16px;
}

.ebay-technical-details {
  margin-top: 16px;
  border-top: 1px solid #cbd5e1;
  padding-top: 12px;
}

.ebay-technical-details summary {
  min-height: 44px;
  padding: 10px 0;
  color: #475569;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.ebay-technical-details summary:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.35);
  outline-offset: 3px;
}

.ebay-attempt-history-heading {
  align-items: baseline;
  margin-bottom: 8px;
}

.ebay-attempt-history-heading span {
  color: #64748b;
  font-size: 0.74rem;
}

.ebay-attempt-history {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ebay-attempt-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}

.ebay-attempt-card h6 {
  margin: 0 0 8px;
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 850;
}

.ebay-attempt-card .ebay-summary-list {
  border-radius: 8px;
}

.ebay-attempt-items,
.ebay-diagnostic-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}

.ebay-attempt-item,
.ebay-diagnostic {
  min-width: 0;
  padding: 9px 10px;
  border-left: 3px solid #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ebay-diagnostic--error {
  border-left-color: #dc2626;
  background: #fff7f7;
  color: #7f1d1d;
}

.ebay-diagnostic--warning {
  border-left-color: #d97706;
  background: #fffbeb;
  color: #78350f;
}

.ebay-result-resume-note {
  border-color: #fde68a;
  background: #fffbeb;
  color: #78350f;
}

.ebay-summary-list {
  display: grid;
  grid-template-columns: minmax(140px, 0.32fr) minmax(0, 1fr);
  margin: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}

.ebay-summary-list dt,
.ebay-summary-list dd {
  min-width: 0;
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid #e2e8f0;
  overflow-wrap: anywhere;
}

.ebay-summary-list dt {
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.ebay-summary-list dd {
  color: #1e293b;
  font-size: 0.86rem;
}

.ebay-summary-list > :nth-last-child(-n + 2) {
  border-bottom: 0;
}

.ebay-preparation-footer {
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px;
}

.ebay-footer-context {
  color: #64748b;
  font-size: 0.76rem;
}

.ebay-footer-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 991.98px) {
  .ebay-preparation-grid--policies {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .account-toolbar {
    width: 100%;
  }

  .ebay-seller-toolbar-button {
    flex: 1 1 auto;
  }

  .ebay-oauth-result {
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
  }

  .ebay-oauth-result-close {
    width: 100%;
  }

  .ebay-seller-dialog {
    width: calc(100% - 16px);
    max-width: none;
    margin: 8px;
  }

  .ebay-seller-dialog-actions .btn {
    flex: 1 1 100%;
  }

  .ebay-preparation-dialog {
    width: 100%;
    min-height: 100%;
    margin: 0;
  }

  .ebay-preparation-dialog .modal-content {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .ebay-preparation-header,
  .ebay-preparation-footer {
    position: sticky;
    z-index: 5;
    background: #ffffff;
  }

  .ebay-preparation-header {
    top: 0;
    padding: 15px 16px;
  }

  .ebay-preparation-body {
    padding: 14px 12px 18px;
  }

  .ebay-preparation-grid,
  .ebay-preparation-grid--policies,
  .ebay-aspects,
  .ebay-summary-list {
    grid-template-columns: 1fr;
  }

  .ebay-result-heading,
  .ebay-attempt-history-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .ebay-result-listing a {
    width: 100%;
    justify-content: center;
  }

  .ebay-attempt-card {
    padding: 10px;
  }

  .ebay-field--category-search {
    grid-row: auto;
  }

  .ebay-summary-list dt,
  .ebay-summary-list dd {
    border-bottom: 0;
  }

  .ebay-summary-list dt {
    padding-bottom: 2px;
  }

  .ebay-summary-list dd {
    padding-top: 2px;
    border-bottom: 1px solid #e2e8f0;
  }

  .ebay-preparation-footer {
    bottom: 0;
    align-items: stretch;
    flex-direction: column;
    padding: 10px 12px;
  }

  .ebay-footer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ebay-footer-actions .btn {
    min-height: 44px;
  }
}

.items-form-card {
  overflow: hidden;
  padding: 0;
  border-color: rgba(226, 232, 240, 0.95);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.add-item-header {
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
}

.add-item-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: #ffffff;
}

.add-mode-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 10px;
  background: #f8fafc;
}

.add-mode-tab {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
}

.add-mode-tab.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.add-mode-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.add-form-section {
  min-width: 0;
}

.add-form-row {
  min-width: 0;
  padding: 0;
}

.add-item-form .detail-form-grid--simple,
.add-item-form .detail-form-grid--commerce {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.add-item-form .detail-form-grid--simple {
  gap: 10px;
}

.add-item-form .detail-form-grid--identity {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.add-form-section--simple {
  border-color: rgba(0, 113, 227, 0.22);
  background: #fbfdff;
}

.add-form-section--simple .detail-group-heading {
  border-bottom-color: rgba(0, 113, 227, 0.16);
}

.add-form-section--simple .detail-group-heading h6 {
  color: #0f172a;
}

.add-form-section--simple [data-add-field="media"] {
  grid-column: 1 / -1;
}

.add-field-anchor {
  display: none;
}

.add-form-row--upc,
.add-form-row--spu,
.detail-form-row--upc,
.detail-form-row--spu {
  grid-column: auto;
}

.add-form-row .form-label {
  margin-bottom: 6px;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
}

#addItemForm .form-control,
#addItemForm .form-select {
  min-height: 42px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: none;
  color: #1d1d1f;
  font-size: 0.92rem;
}

#addItemForm .form-control:hover,
#addItemForm .form-select:hover {
  border-color: rgba(148, 163, 184, 0.95);
  background-color: #ffffff;
}

#addItemForm .form-control:focus,
#addItemForm .form-select:focus {
  border-color: rgba(0, 102, 204, 0.55);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.16);
}

#addItemForm textarea.form-control {
  min-height: 78px;
  resize: vertical;
}

.photo-file-shell {
  overflow: hidden;
  border: 1px solid rgba(209, 217, 230, 0.95);
  border-radius: 16px;
  background: #f5f5f7;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.photo-file-shell:focus-within {
  border-color: rgba(0, 102, 204, 0.55);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.16);
}

.photo-file-shell.is-invalid {
  border-color: rgba(185, 28, 28, 0.85);
  background: #fff5f5;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.12);
}

#photo-file.form-control {
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding: 0 12px 0 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  line-height: 46px;
  box-shadow: none;
}

#photo-file::file-selector-button {
  height: 46px;
  margin: 0 12px 0 0;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid rgba(209, 217, 230, 0.95);
  border-radius: 14px 0 0 14px;
  background: #ffffff;
  color: #1d1d1f;
  font-weight: 650;
}

#photo-file::-webkit-file-upload-button {
  height: 46px;
  margin: 0 12px 0 0;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid rgba(209, 217, 230, 0.95);
  border-radius: 14px 0 0 14px;
  background: #ffffff;
  color: #1d1d1f;
  font-weight: 650;
}

.add-form-row-media {
  display: grid;
  gap: 8px;
}

.add-form-row-media.is-invalid {
  padding: 12px;
  border: 2px solid rgba(185, 28, 28, 0.7);
  border-radius: 14px;
  background: #fff8f8;
}

.add-form-row-media.is-invalid .form-label {
  color: #991b1b;
}

.add-form-hint {
  color: #6e6e73;
  font-size: 0.82rem;
  line-height: 1.45;
}

.add-form-hint--spu {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
  margin-top: -4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  padding: 5px 7px;
}

.add-form-hint--spu i {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 1px;
}

.add-form-hint--spu span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.add-form-hint--identity-wide {
  grid-column: 1 / -1;
}

.detail-unlink-family-button {
  width: 100%;
  min-height: 34px;
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 750;
}

.photo-required-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(185, 28, 28, 0.55);
  border-radius: 10px;
  background: #fee2e2;
  color: #7f1d1d;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

.photo-required-message .bi {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #b91c1c;
}

.add-dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.add-variant-grid,
.detail-variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-variant-grid--codes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

#createItemBtn {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: #0071e3;
  color: #ffffff;
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.24);
}

#createItemBtn:hover {
  background: #0077ed;
}

.mobile-panel-switcher {
  display: none;
}

.event-log-shell {
  display: grid;
  gap: 14px;
}

.event-log-header,
.event-log-filters,
.event-log-results {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.event-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.event-log-title {
  margin: 0;
  color: #111827;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.event-log-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.event-log-filters {
  display: grid;
  grid-template-columns: minmax(160px, 0.85fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(220px, 1.25fr) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
}

.event-log-filter {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
}

.event-log-filter .form-control {
  min-height: 40px;
}

.event-log-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.event-log-results {
  overflow: hidden;
}

.event-log-results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.event-log-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.event-log-summary,
.event-log-status {
  color: var(--muted);
  font-size: 0.86rem;
}

.event-log-table-wrap {
  overflow-x: auto;
}

.event-log-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.event-log-table th,
.event-log-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f7;
  vertical-align: top;
}

.event-log-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-log-time {
  white-space: nowrap;
}

.event-action-label {
  color: #111827;
  font-weight: 750;
}

.event-action-key {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.event-result {
  display: inline-flex;
  min-width: 64px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.event-result--success {
  background: #dcfce7;
  color: #166534;
}

.event-result--muted {
  background: #f1f5f9;
  color: #475569;
}

.event-log-message {
  max-width: 360px;
  color: #334155;
  overflow-wrap: anywhere;
}

.event-log-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.event-log-pagination {
  display: flex;
  justify-content: center;
  padding: 14px;
}

.clone-family-options {
  display: grid;
  gap: 10px;
}

.clone-family-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 10px;
  background: #ffffff;
}

.clone-family-option:hover,
.clone-family-option:focus-within {
  border-color: rgba(0, 102, 204, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12);
}

.clone-family-option input {
  margin-top: 3px;
}

.clone-family-option-title {
  color: #111827;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.clone-family-option-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.photo-preview-area {
  border: 1px solid rgba(209, 217, 230, 0.95);
  border-radius: 18px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: #f5f5f7;
}

.photo-preview-area.is-invalid {
  border-color: rgba(185, 28, 28, 0.75);
  background: #fff5f5;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.18);
}

.photo-preview-area.has-preview {
  align-items: stretch;
  justify-content: flex-start;
  padding: 10px;
  overflow-y: auto;
}

.pending-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  width: 100%;
}

.pending-image-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.pending-image-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #f8fafc;
}

.pending-image-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
}

.pending-image-name {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-image-remove {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--danger);
  line-height: 1;
  padding: 2px;
}

.status-message {
  min-height: 28px;
  margin: 0;
  color: var(--muted);
}

#form-message.status-message:empty {
  display: none;
}

#form-message.status-message:not(:empty) {
  min-height: 44px;
  margin: 0 !important;
  padding: 12px 16px 16px;
  background: #f5f5f7;
}

.status-message--success {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-weight: 600;
}

.status-message--success .bi {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
}

#form-message.status-message--error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fee2e2;
  color: #7f1d1d;
  font-weight: 700;
}

#form-message.status-message--error .bi {
  flex: 0 0 auto;
  color: #b91c1c;
  font-size: 1rem;
  line-height: 1;
}

.detail-save-message {
  flex: 1 1 260px;
  min-width: 0;
  margin-right: auto;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
}

.detail-save-message:empty {
  display: none;
}

.detail-save-message--success {
  color: var(--success);
  font-weight: 600;
}

.detail-save-message--error {
  color: #7f1d1d;
  font-weight: 700;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.photo-preview-area img.preview-img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 6px;
}

/* Product tools share one quiet, compact visual language. */
.items-list-header,
.product-list-actions,
.selection-toolbar,
.selection-primary-actions,
.selection-selector-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.items-list-header { justify-content: space-between; gap: 16px; }
.product-list-actions, .selection-primary-actions { gap: 8px; }
.product-list-controls { --product-list-control-height: 36px; margin: 24px 0 20px; }
.product-search-field { width: 100%; max-width: 560px; min-width: 0; }
.product-search-field .form-label { margin-bottom: 6px; }
.product-search-row { display: grid; grid-template-columns: minmax(128px, .42fr) minmax(0, 1fr); gap: 8px; }
.product-search-row.has-numeric-filter { grid-template-columns: minmax(128px, .34fr) minmax(86px, .2fr) minmax(0, 1fr); }
.product-search-row .form-select,
.product-search-row .form-control {
  height: var(--product-list-control-height);
  min-height: var(--product-list-control-height);
  min-width: 0;
  border: 1px solid #d5dbe3;
  border-radius: 8px;
  color: #334155;
  font-size: 14px;
}
.selection-toolbar {
  width: 100%;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 0;
  border-block: 1px solid #e5e9f2;
  background: #fff;
  font-size: 14px;
}
.selection-selector-group { gap: 12px 20px; min-width: 0; }
.selection-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  min-width: 84px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.selection-count-badge.is-empty { color: #64748b; }
.selection-label-mobile { display: none; }
.product-select-all-control {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 7px;
  margin: 0;
  padding: 0;
  color: #334155;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}
.product-select-all-control .form-check-input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.product-select-all-control:has(.form-check-input:disabled) { color: #64748b; cursor: not-allowed; }
.selection-hint { min-height: 20px; margin: 8px 0 16px; color: #64748b; font-size: 12px; line-height: 20px; text-align: right; }

.marketassist-queue-progress {
  border: 1px solid #dbe7f3;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.marketassist-queue-progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.marketassist-queue-title {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.marketassist-queue-label {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: normal;
}

.marketassist-queue-count {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.marketassist-queue-count:not(:disabled) {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.marketassist-queue-count:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 3px;
  border-radius: 6px;
}

.marketassist-processing-products {
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: #ffffff;
}

.marketassist-processing-title {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.marketassist-processing-list {
  display: grid;
  gap: 6px;
}

.marketassist-processing-item {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  color: var(--text);
  text-align: left;
}

.marketassist-processing-item:hover,
.marketassist-processing-item:focus-visible {
  border-color: rgba(37, 99, 235, 0.32);
  background: #eff6ff;
}

.marketassist-processing-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 700;
}

.marketassist-processing-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.marketassist-progress-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebf3;
}

.marketassist-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #0891b2 100%);
  transition: width 0.24s ease;
}

.marketassist-queue-progress.is-complete .marketassist-queue-count {
  color: var(--success);
}

.marketassist-queue-progress.is-complete .marketassist-progress-bar {
  background: linear-gradient(90deg, #16a34a 0%, #0f766e 100%);
}

.marketassist-detail-progress {
  width: 100%;
}

.marketassist-detail-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebf3;
}

.marketassist-detail-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #0891b2 100%);
  transition: width 0.24s ease;
}

.marketassist-detail-progress.is-complete .marketassist-detail-progress-bar {
  background: linear-gradient(90deg, #16a34a 0%, #0f766e 100%);
}

.marketassist-detail-progress.is-error .marketassist-detail-progress-bar {
  background: linear-gradient(90deg, #dc2626 0%, #f97316 100%);
}

.product-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.product-pagination-pages {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.product-page-button {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  line-height: 1;
}

.product-page-button:hover,
.product-page-button:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

.product-page-button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.product-pagination-ellipsis {
  min-width: 24px;
  text-align: center;
  color: var(--muted);
}

/* Item card in list */
.item-card {
  background: var(--card-bg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 22px;
  display: block;
  margin-bottom: 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.item-card:hover {
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.item-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  min-width: 0;
}

.item-name {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card-main {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.item-card-thumb {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.item-card-media {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-right: 24px;
  border-right: 1px solid rgba(226, 232, 240, 0.95);
}

.item-card-id {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f1f5f9;
}

.item-card-select {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
  white-space: nowrap;
}

.item-card-select .form-check-input {
  margin: 0;
}

.item-card-body {
  min-width: 0;
  font-size: 0.92rem;
}

.item-detail {
  color: var(--text);
}

.item-detail-row {
  min-height: 40px;
  display: grid;
  grid-template-columns: 28px minmax(128px, 0.32fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  white-space: normal;
}

.item-detail-row:last-child {
  border-bottom: 0;
}

.item-detail-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.86rem;
}

.item-detail-label {
  min-width: 0;
  color: #334155;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.item-detail-value {
  min-width: 0;
  color: #111827;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.item-condition-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.item-condition-badge--new {
  background: #dcfce7;
  color: #15803d;
}

.item-condition-badge--used {
  background: #e0f2fe;
  color: #0369a1;
}

.item-condition-badge--damaged {
  background: #fee2e2;
  color: #b91c1c;
}

.item-condition-badge--other,
.item-condition-badge--unknown {
  background: #f1f5f9;
  color: #475569;
}

.item-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px -22px -22px;
  padding: 16px 22px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.item-card-actions .btn {
  min-width: 98px;
  font-size: 0.84rem;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 8px;
}

#detailForm {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#detailForm .detail-form-section {
  display: grid;
  gap: 12px;
}

#detailForm .detail-form-row {
  margin: 0 !important;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.detail-form-group {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.detail-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

.detail-group-heading h6 {
  margin: 0;
  color: #111827;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
}

.detail-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-form-grid--identity {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr);
}

.detail-form-grid--commerce {
  grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(116px, 0.55fr));
}

.detail-form-row--wide {
  grid-column: 1 / -1;
}

#detailForm .form-label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
}

#detailForm .form-control,
#detailForm .form-select {
  min-height: 42px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: none;
  color: #1d1d1f;
  font-size: 0.92rem;
}

#detailForm .detail-form-row--upc .form-control,
#detailForm .detail-form-row--spu .form-control {
  width: 100%;
}

#detailForm .form-control:hover,
#detailForm .form-select:hover {
  border-color: rgba(148, 163, 184, 0.95);
  background-color: #ffffff;
}

#detailForm .form-control:focus,
#detailForm .form-select:focus {
  border-color: rgba(0, 102, 204, 0.55);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.16);
}

#detailForm textarea.form-control {
  min-height: 82px;
  resize: vertical;
}

#detailForm #detail-product-copy {
  min-height: 148px;
}

#detailForm fieldset.detail-form-row {
  min-width: 0;
}

#detailForm fieldset.detail-form-row legend {
  float: none;
  width: auto;
  padding: 0;
}

.detail-dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.detail-form-hint {
  display: block;
  margin-top: 8px;
  color: #6e6e73;
  font-size: 0.82rem;
  line-height: 1.45;
}

.detail-section-title {
  margin: 0;
  color: #1d1d1f;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.35;
}

.detail-media-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.detail-media-header .btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.detail-media-column {
  min-width: 0;
}

.detail-media-column > .detail-media-header,
.detail-media-column > #detail-image-preview,
.detail-media-column > .mt-3 {
  min-width: 0;
}

.marketassist-job-status {
  color: #334155;
  line-height: 1.45;
}

.detail-media-column {
  display: flex;
  flex-direction: column;
}

.detail-media-column > .mt-3 {
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 14px;
  background: #ffffff;
}

.detail-mobile-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: #f8fafc;
}

.detail-mobile-tab {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  padding: 0 10px;
  font-size: 0.9rem;
  font-weight: 800;
}

.detail-mobile-tab.is-active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

#detailModal[data-detail-tab="identity"] [data-detail-tab-section="details"],
#detailModal[data-detail-tab="identity"] [data-detail-tab-section="commerce"],
#detailModal[data-detail-tab="details"] [data-detail-tab-section="identity"],
#detailModal[data-detail-tab="details"] [data-detail-tab-section="commerce"],
#detailModal[data-detail-tab="commerce"] [data-detail-tab-section="identity"],
#detailModal[data-detail-tab="commerce"] [data-detail-tab-section="details"] {
  display: none !important;
}

#detailModal[data-detail-tab="details"] .detail-modal-layout > .col-lg-7,
#detailModal[data-detail-tab="commerce"] .detail-modal-layout > .col-lg-7 {
  width: 100%;
}

.detail-modal-layout {
  row-gap: 18px;
}

.detail-image-gallery {
  display: grid;
  grid-template-columns: minmax(132px, 168px) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.detail-primary-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  z-index: 1;
}

.detail-primary-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.detail-primary-image-frame:hover,
.detail-primary-image-frame:focus-within {
  z-index: 8;
}

.detail-primary-image-frame:hover .detail-primary-image,
.detail-primary-image-frame:focus-within .detail-primary-image {
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
  transform: scale(1.72);
}

.detail-thumbnail-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 168px;
  overflow-y: auto;
  padding-right: 2px;
}

.detail-thumbnail-card {
  position: relative;
  min-width: 0;
}

.detail-thumbnail-button {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 5px 24px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #1d1d1f;
  text-align: left;
}

.detail-thumbnail-card.is-primary .detail-thumbnail-button {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.16);
}

.detail-thumbnail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border-radius: 6px;
  background: #f8fafc;
}

.detail-thumbnail-label {
  min-width: 0;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-thumbnail-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 69, 58, 0.32);
  border-radius: 999px;
  background: #fff;
  color: #ff453a;
  font-size: 0.58rem;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.detail-thumbnail-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.detail-image-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 10px;
}

.detail-image-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}

.detail-image-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.detail-image-name {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-image-delete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.suggestion-copy-strip {
  display: grid;
  gap: 9px;
  max-height: min(54vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 5px 6px 2px;
  scrollbar-width: thin;
}

.suggestion-card {
  position: relative;
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  min-height: auto;
  padding: 13px 36px 13px 14px;
  text-align: left;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.suggestion-card-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 69, 58, 0.32);
  border-radius: 999px;
  background: #ffffff;
  color: #ff453a;
  font-size: 0.58rem;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.suggestion-card-remove:hover,
.suggestion-card-remove:focus-visible {
  background: #fff5f5;
  color: #ff3b30;
}

.suggestion-card:hover,
.suggestion-card:focus-visible {
  border-color: rgba(37, 99, 235, 0.26);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.suggestion-card.is-selected {
  border-color: rgba(20, 115, 230, 0.74);
  background: #f7fbff;
  box-shadow: 0 0 0 3px rgba(20, 115, 230, 0.14);
}

.suggestion-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 3px;
}

.suggestion-card-copy {
  min-width: 0;
  max-width: 100%;
  color: #111827;
  display: block;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.suggestion-card-index {
  color: #006d77;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.suggestion-card-title {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: #1d1d1f;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.suggestion-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.suggestion-card-meta span {
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.suggestion-card-cta {
  align-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
  padding-top: 8px;
}

.suggestion-card-cta span {
  color: #7c3aed;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0;
}

.items-list-card {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

/* Preview images in form (reuse pattern from utils.js handleFiles) */
.photo-preview-area .preview-image-wrapper {
  position: relative;
  display: inline-block;
  margin: 4px;
}

.photo-preview-area .preview-image-wrapper img {
  max-height: 120px;
  border-radius: 6px;
}

.photo-preview-area .preview-image-wrapper button {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 575.98px) {
  .product-list-controls,
  .product-search-field,
  .selection-toolbar,
  .product-pagination {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .product-search-row {
    grid-template-columns: 1fr;
  }

  .product-search-row.has-numeric-filter {
    grid-template-columns: 1fr;
  }

  .product-filter-field,
  .product-numeric-comparator,
  #product-search {
    width: 100%;
  }

  .product-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .product-pagination-pages {
    justify-content: center;
  }

  .item-card {
    display: grid;
    grid-template-columns: minmax(118px, 44%) minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 10px;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  }

  .item-card:hover {
    transform: none;
  }

  .item-card-header {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin-bottom: 0;
  }

  .item-name {
    font-size: 1.06rem;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .item-card-main {
    display: contents;
  }

  .item-card-thumb {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .item-card-media {
    display: contents;
  }

  .item-card-id {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    width: max-content;
    max-width: 100%;
  }

  .item-card-select {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
  }

  .item-card-body {
    grid-column: 1 / -1;
    grid-row: 4;
    margin-top: 0;
  }

  .item-detail-row--dimensions {
    display: none;
  }

  .item-detail-row {
    grid-template-columns: 26px 104px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 4px;
    min-height: 38px;
    padding: 6px 0;
  }

  .item-detail-label {
    white-space: nowrap;
  }

  .item-detail-value {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .marketassist-queue-progress-header {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .item-card-actions {
    grid-column: 1 / -1;
    grid-row: 5;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 16px -16px -16px;
    padding: 14px 16px 16px;
    background: #f5f5f7;
  }

  .item-card-actions .btn {
    min-width: 0;
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.18;
    white-space: normal;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
    transition:
      background-color 0.15s ease,
      box-shadow 0.15s ease,
      transform 0.12s ease;
  }

  .item-card-actions .btn i {
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1;
  }

  .item-card-actions .btn span {
    min-width: 0;
  }

  .item-card-actions .btn:active {
    transform: scale(0.98);
  }

  .item-card-actions .btn[data-action="detail"] {
    background: #0071e3;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(0, 113, 227, 0.2);
  }

  .item-card-actions .btn[data-action="publish"] {
    background: #ecfdf5;
    color: #047857;
    box-shadow: inset 0 0 0 1px #bbf7d0;
  }

  .item-card-actions .btn[data-action="publish-shopee"] {
    background: #fff7ed;
    color: #c2410c;
    box-shadow: inset 0 0 0 1px #fed7aa;
  }

  .item-card-actions .btn[data-action="delete"] {
    background: #fff1f2;
    color: #be123c;
    box-shadow: inset 0 0 0 1px #fecdd3;
  }

  .suggestion-card {
    grid-template-columns: 1fr;
    border-radius: 8px;
  }

  .event-log-header,
  .event-log-filters,
  .event-log-results {
    border-radius: 16px;
    box-shadow: none;
  }

  .event-log-filters {
    grid-template-columns: 1fr;
  }

  .event-log-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .event-log-filter-actions .btn {
    min-height: 44px;
  }

}

@media (max-width: 991.98px) {
  .page-wrap {
    padding: 12px;
  }

  .title_container {
    border: 0;
    border-radius: 20px;
    box-shadow: none;
  }

  .mobile-panel-switcher {
    position: sticky;
    top: 10px;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 12px;
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: #f2f2f7;
  }

  .mobile-panel-tab {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.95rem;
    font-weight: 700;
  }

  .mobile-panel-tab.is-active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  }

  body[data-mobile-panel="create"] [data-mobile-panel-section="list"],
  body[data-mobile-panel="list"] [data-mobile-panel-section="create"] {
    display: none !important;
  }

  .items-form-card,
  .items-list-card {
    border-color: rgba(148, 163, 184, 0.22);
    border-radius: 22px;
    padding: 16px;
    box-shadow: none;
  }

  .items-form-card {
    padding: 0;
    border-radius: 24px;
  }

  .add-item-header {
    padding: 18px 18px 12px;
  }

  .add-item-form {
    gap: 12px;
    padding: 12px;
  }

  .add-mode-switcher {
    gap: 5px;
  }

  .add-form-row {
    padding: 13px;
  }

  .add-item-form .detail-form-grid--identity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .add-item-form .detail-form-grid--simple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 9px;
    row-gap: 5px;
  }

  .add-form-section--simple {
    padding: 8px;
  }

  .add-form-section--simple .detail-group-heading {
    margin-bottom: 6px;
    padding-bottom: 5px;
  }

  .add-form-section--simple [data-add-field="media"],
  .add-form-section--simple [data-add-field="name"],
  .add-form-section--simple [data-add-field="location"] {
    grid-column: 1 / -1;
  }

  .add-form-section--simple .add-form-row,
  .add-form-section--simple .add-form-row--upc {
    padding: 2px 0;
  }

  .add-form-section--simple .form-label {
    margin-bottom: 3px;
    font-size: 0.74rem;
  }

  #addItemForm .add-form-section--simple .form-control,
  #addItemForm .add-form-section--simple .form-select {
    min-height: 36px;
    font-size: 0.88rem;
  }

  #addItemForm .add-form-section--simple textarea.form-control {
    min-height: 42px;
  }

  .add-form-section--simple .photo-file-shell,
  #add-mode-full-panel .photo-file-shell {
    height: 40px;
    min-height: 40px;
  }

  .add-form-section--simple #photo-file.form-control,
  #add-mode-full-panel #photo-file.form-control {
    height: 38px;
    min-height: 38px;
    line-height: 38px;
  }

  .add-form-section--simple #photo-file::file-selector-button {
    height: 38px;
  }

  .add-form-section--simple #photo-file::-webkit-file-upload-button {
    height: 38px;
  }

  .add-form-section--simple #photo-help {
    display: none;
  }

  .add-form-section--simple .photo-preview-area:not(.has-preview) {
    display: none;
  }

  .add-form-section--simple .photo-preview-area {
    min-height: 64px;
    margin-top: 6px !important;
  }

  .add-form-section--simple .photo-placeholder {
    padding: 8px;
  }

  .add-form-section--simple .photo-placeholder .bi {
    font-size: 2rem !important;
  }

  #add-mode-full-panel {
    gap: 8px;
  }

  #add-mode-full-panel .detail-form-group {
    padding: 8px;
  }

  #add-mode-full-panel .detail-group-heading {
    margin-bottom: 6px;
    padding-bottom: 5px;
  }

  #add-mode-full-panel .detail-form-grid,
  #add-mode-full-panel .detail-form-grid--identity,
  #add-mode-full-panel .detail-form-grid--commerce {
    column-gap: 9px;
    row-gap: 5px;
  }

  #add-mode-full-panel .add-form-row {
    padding: 2px 0;
  }

  #add-mode-full-panel .form-label {
    margin-bottom: 3px;
    font-size: 0.74rem;
  }

  #addItemForm #add-mode-full-panel .form-control,
  #addItemForm #add-mode-full-panel .form-select {
    min-height: 36px;
    font-size: 0.88rem;
  }

  #addItemForm #add-mode-full-panel textarea.form-control {
    min-height: 42px;
  }

  #add-mode-full-panel #photo-file::file-selector-button {
    height: 38px;
  }

  #add-mode-full-panel #photo-file::-webkit-file-upload-button {
    height: 38px;
  }

  #add-mode-full-panel .photo-preview-area {
    margin-top: 6px !important;
  }

  .add-form-row--upc,
  .add-form-row--spu,
  .detail-form-row--upc,
  .detail-form-row--spu {
    min-width: 0;
    padding: 0;
  }

  .add-form-row--upc .form-control,
  .add-form-row--spu .form-control,
  .detail-form-row--upc .form-control,
  .detail-form-row--spu .form-control {
    width: 100%;
  }

  .add-form-hint--identity-wide {
    margin-top: 6px;
    overflow-wrap: anywhere;
  }

  .items-list-card {
    max-height: none;
    overflow: visible;
  }

  .items-list-header {
    align-items: stretch !important;
    flex-direction: column;
    gap: 12px;
  }

  .product-list-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
  }

  .form-control,
  .form-select {
    min-height: 44px;
    border-radius: 14px;
  }

  .detail-modal-dialog {
    margin: 0.75rem;
  }

  .detail-modal-dialog .modal-content {
    border-radius: 18px;
  }

  .detail-mobile-tabs {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: -4px 0 12px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: #f8fafc;
  }

  .detail-mobile-tab {
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #64748b;
    padding: 0 8px;
    font-size: 0.86rem;
    font-weight: 800;
  }

  .detail-mobile-tab.is-active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  }

  #detailModal[data-detail-tab="identity"] [data-detail-tab-section="details"],
  #detailModal[data-detail-tab="identity"] [data-detail-tab-section="commerce"],
  #detailModal[data-detail-tab="details"] [data-detail-tab-section="identity"],
  #detailModal[data-detail-tab="details"] [data-detail-tab-section="commerce"],
  #detailModal[data-detail-tab="commerce"] [data-detail-tab-section="identity"],
  #detailModal[data-detail-tab="commerce"] [data-detail-tab-section="details"] {
    display: none !important;
  }

  .detail-form-group {
    padding: 14px;
    border-radius: 12px;
  }

  .detail-form-grid,
  .detail-form-grid--identity,
  .detail-form-grid--commerce {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #detailForm .detail-form-grid--identity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-dimension-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-media-column {
    gap: 12px;
  }

  .detail-media-column > .mt-3 {
    min-width: 0;
    overflow: hidden;
    padding: 14px;
    border-radius: 12px;
  }

  .detail-image-gallery {
    grid-template-columns: minmax(108px, 132px) minmax(0, 1fr);
  }

  .detail-thumbnail-strip {
    max-height: 132px;
  }

  .suggestion-copy-strip {
    grid-auto-columns: minmax(286px, 86%);
    grid-auto-flow: column;
    gap: 10px;
    max-height: none;
    margin: 0 -6px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding: 2px 8px 12px;
    scroll-padding-inline: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .suggestion-card {
    width: 100%;
    min-height: 260px;
    max-height: 420px;
    align-content: start;
    padding: 13px 34px 13px 14px;
    scroll-snap-align: start;
  }

  .suggestion-card-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .suggestion-card-copy {
    max-height: 150px;
    overflow-y: auto;
  }

  .suggestion-card-meta {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .suggestion-card-meta span {
    flex: 0 0 auto;
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .event-log-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-log-filter--keyword,
  .event-log-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .event-log-filters {
    grid-template-columns: 1fr;
  }

  .add-variant-grid,
  .detail-variant-grid,
  .detail-inline-action {
    grid-template-columns: 1fr;
  }

  .detail-modal-dialog {
    width: 100%;
    max-width: none;
    min-height: 100%;
    margin: 0;
  }

  .detail-modal-dialog .modal-content {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .detail-modal-dialog .modal-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #ffffff;
  }

  .detail-form-group {
    padding: 12px;
  }

  .detail-group-heading {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  #add-mode-simple-panel,
  #add-mode-full-panel {
    gap: 8px;
  }

  #add-mode-simple-panel .detail-form-group,
  #add-mode-full-panel .detail-form-group {
    padding: 8px;
  }

  #add-mode-simple-panel .detail-group-heading,
  #add-mode-full-panel .detail-group-heading {
    margin-bottom: 6px;
    padding-bottom: 5px;
  }

  #add-mode-simple-panel .detail-form-grid,
  #add-mode-full-panel .detail-form-grid,
  #add-mode-simple-panel .detail-form-grid--identity,
  #add-mode-full-panel .detail-form-grid--identity,
  #add-mode-simple-panel .detail-form-grid--commerce,
  #add-mode-full-panel .detail-form-grid--commerce {
    column-gap: 9px;
    row-gap: 5px;
  }

  #add-mode-simple-panel .add-form-row,
  #add-mode-full-panel .add-form-row {
    padding: 2px 0;
  }

  .detail-inline-action {
    display: grid;
  }

  .detail-dimension-grid {
    grid-template-columns: 1fr 1fr;
  }

  .add-item-form .detail-form-grid--commerce {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Account and list toolbar controls only; product cards and dialogs keep their styles. */
.account-toolbar .toolbar-button,
.items-list-card .toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d5dbe3;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
  transition: none;
}
.account-toolbar .toolbar-button .bi,
.items-list-card .toolbar-button .bi { font-size: 16px; line-height: 1; }
.account-toolbar .toolbar-button-quiet { border-color: transparent; color: #64748b; }
.account-toolbar .user-badge { background: transparent; border: 0; border-left: 1px solid #e5e9f2; border-radius: 0; padding: 0 8px; font-size: 14px; font-weight: 500; }
.items-list-card .toolbar-button:disabled { opacity: 1; color: #94a3b8; background: #f8fafc; border-color: #e5e9f2; cursor: not-allowed; }
.account-toolbar .toolbar-button:focus-visible,
.items-list-card .toolbar-button:focus-visible,
.product-search-row :is(input, select):focus-visible,
.selection-toolbar input:focus-visible { outline: 3px solid #bfdbfe; outline-offset: 2px; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .account-toolbar .toolbar-button:not(:disabled):hover,
  .items-list-card .toolbar-button:not(:disabled):hover { background: #f8fafc; border-color: #94a3b8; }
  .account-toolbar .toolbar-button:not(:focus-visible),
  .items-list-card .toolbar-button:not(:focus-visible) { transition: transform 120ms cubic-bezier(.23, 1, .32, 1); }
  .account-toolbar .toolbar-button:not(:disabled):not(:focus-visible):active,
  .items-list-card .toolbar-button:not(:disabled):not(:focus-visible):active { transform: scale(.98); }
}
@media (max-width: 700px), (pointer: coarse) {
  .account-toolbar .toolbar-button,
  .items-list-card .toolbar-button,
  .selection-count-badge,
  .product-select-all-control { min-height: 44px; }
  .product-list-controls { --product-list-control-height: 44px; }
}
@media (max-width: 700px) {
  .selection-toolbar { align-items: stretch; }
  .selection-selector-group { gap: 0 12px; }
  .selection-primary-actions { width: 100%; }
  .selection-primary-actions .toolbar-button { flex: 1; }
  .selection-hint { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .account-toolbar .toolbar-button,
  .items-list-card .toolbar-button { transition: none !important; transform: none !important; }
}
