.repricing-stage-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #bfd7ff;
  border-radius: 8px;
  background: #f3f7ff;
  color: #234a78;
}

.repricing-publish-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d6e2f3;
  border-radius: 10px;
}

.repricing-mode #work-options-section,
.repricing-mode #publish-section > .publish-tabs,
.repricing-mode #publish-section > .tab-panel,
.repricing-mode #prepare-media-btn,
.repricing-mode #delete-selected-rows-btn,
.repricing-mode label:has(#filter-ready-to-submit-rows),
.repricing-mode label:has(#filter-ozon-ready-rows),
.repricing-mode label:has(#filter-wb-ready-rows),
.repricing-mode label:has(#filter-ym-ready-rows),
.repricing-mode label:has(#filter-wb-ready-short-title-rows),
.repricing-mode label:has(#filter-wb-error-pending-rows),
.repricing-mode label:has(#filter-unsent-warehouse-rows),
.repricing-mode #results-table .col-database,
.repricing-mode #results-table .col-marketplace-search,
.repricing-mode #results-table .col-text-full,
.repricing-mode #results-table .col-confidence {
  display: none !important;
}

.repricing-mode #results-table {
  min-width: 980px;
}

.repricing-ozon-meta {
  margin-top: 5px;
  font-size: 12px;
}

.repricing-ozon-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.repricing-ozon-link:hover {
  text-decoration: underline;
}

.repricing-submit-summary {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  white-space: normal;
}

.repricing-preview-heading,
.repricing-run-status {
  font-weight: 700;
}

.repricing-action-list {
  display: grid;
  gap: 6px;
}

.repricing-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
}

.repricing-preview-changes {
  color: #475569;
  font-size: 13px;
  text-align: right;
}

.repricing-status-succeeded,
.repricing-preview-changed {
  border-color: #86efac;
  background: #f0fdf4;
}

.repricing-status-unknown,
.repricing-status-partial {
  border-color: #fbbf24;
  background: #fffbeb;
}

.repricing-status-failed,
.repricing-status-known_failure,
.repricing-preview-blocked,
.repricing-run-error {
  color: #991b1b;
}

.repricing-recheck-btn {
  flex: 0 0 auto;
}

.repricing-run-note,
.repricing-run-error {
  margin: 0;
}

body {
  margin: 0;
  color: #0f172a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at top left, #dbeafe 0%, transparent 35%),
    radial-gradient(circle at top right, #e9d5ff 0%, transparent 32%),
    #f8fafc;
}

.container {
  max-width: 1580px;
  margin: 32px auto;
  padding: 0 20px 40px;
}

.container.auth-mode {
  max-width: 900px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.container.auth-mode h1 {
  text-align: center;
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

h1 {
  margin: 0 0 18px;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.app-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.app-title-row h1 {
  margin-bottom: 0;
}

.app-version {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.telegram-support {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  color: #2563eb;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.telegram-support:hover,
.telegram-support:focus-visible {
  color: #1d4ed8;
}

@media (max-width: 760px) {
  .app-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .telegram-support {
    width: 100%;
    justify-content: flex-end;
  }
}

.auth-card {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar button {
  height: 36px;
}

#logout-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.month-statistics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.month-statistics span {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  min-width: 72px;
  padding: 0 10px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  line-height: 1.2;
}

.month-statistics strong {
  color: #2563eb;
  font-size: 15px;
  line-height: 1;
}

.session-metadata-inline {
  display: contents;
}

.source-session-state {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.session-save-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.source-session-state .session-pricing-option {
  font-size: 12px;
  padding: 6px 10px;
  white-space: nowrap;
}

.session-save-status:empty {
  display: none;
}

.session-save-status[data-status="saving"]::before {
  width: 11px;
  height: 11px;
  border: 2px solid #93c5fd;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: session-save-spin .7s linear infinite;
  content: "";
}

.session-save-status[data-status="saved"] { color: #15803d; }
.session-save-status[data-status="saved"]::before { content: "●"; font-size: 12px; }
.session-save-status[data-status="error"] { color: #b91c1c; }

@keyframes session-save-spin { to { transform: rotate(360deg); } }

.session-metadata-inline input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
  grid-column: 1;
  grid-row: 1;
}

.session-metadata-inline input[type="text"]::placeholder {
  color: #94a3b8;
}

.statistics-header,
.statistics-range,
.statistics-period-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.statistics-header { justify-content: space-between; }
.statistics-header h2 { margin: 0; }
.statistics-header p { margin: 4px 0 0; color: #64748b; }
.statistics-range { margin: 16px 0; }
.statistics-range label { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }

.statistics-monthly {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.statistics-monthly-header h3 {
  margin: 0;
}

.statistics-monthly-header p {
  margin: 4px 0 0;
  color: #64748b;
}

.statistics-monthly-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.statistics-month-details {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.statistics-month-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  background: #f8fafc;
}

.statistics-month-summary::-webkit-details-marker {
  display: none;
}

.statistics-month-totals {
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
}

.statistics-month-details > .table-wrap {
  padding: 0 8px 8px;
}

.statistics-table th,
.statistics-table td {
  text-align: center;
  vertical-align: middle;
}

.statistics-totals .statistics-totals-row td {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #cbd5e1;
  background: #f8fafc;
  font-weight: 750;
}

.statistics-totals-label {
  text-align: left;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
}

.statistics-totals .statistics-value-main {
  font-size: 20px;
}

.statistics-user {
  display: grid;
  justify-items: start;
  gap: 3px;
  text-align: left;
}

.statistics-user > span {
  color: #64748b;
  font-size: 12px;
}

.statistics-user-managed {
  background: #eff6ff;
}

.statistics-user-managed .statistics-user {
  position: relative;
  padding-left: 24px;
}

.statistics-user-managed .statistics-user::before {
  position: absolute;
  top: 2px;
  left: 7px;
  color: #3b82f6;
  content: "↳";
  font-weight: 800;
}

.statistics-user-role {
  font-weight: 650;
}

.statistics-user-stores {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 2px 0;
}

.statistics-store-badge,
.statistics-user-no-stores {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.statistics-store-badge-ozon {
  color: #1d4ed8;
  background: #dbeafe;
}

.statistics-store-badge-wb {
  color: #9d174d;
  background: #fce7f3;
}

.statistics-store-badge-ym {
  color: #854d0e;
  background: #fef9c3;
}

.statistics-user-no-stores {
  color: #64748b;
  background: #f1f5f9;
}

.statistics-user-inactive {
  background: #fef2f2;
}

.statistics-user-inactive .statistics-user strong,
.statistics-user-inactive .statistics-user-inactive-label {
  color: #b91c1c;
}

.statistics-user-inactive-label {
  font-weight: 700;
}

.statistics-value {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.statistics-value-main {
  color: #0f172a;
  font-size: 18px;
  font-weight: 750;
}

.statistics-change {
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.statistics-change--positive { color: #15803d; }
.statistics-change--negative { color: #b91c1c; }

.manager-sessions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #dbe4f0;
}

.manager-sessions-header,
.manager-session-card,
.manager-session-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.manager-sessions-header {
  justify-content: space-between;
}

.manager-sessions-header h3,
.manager-sessions-header p,
.manager-session-user summary {
  margin: 0;
}

.manager-sessions-header p {
  margin-top: 4px;
  color: #64748b;
}

.manager-sessions-list {
  display: grid;
  gap: 16px;
}

.manager-session-user {
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}

.manager-session-user summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
}

.manager-session-user summary > span {
  color: #64748b;
  font-size: 13px;
}

.manager-session-user-items {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.manager-session-card {
  justify-content: space-between;
  padding: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fafc;
}

.manager-session-content {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 8px;
}

.manager-session-content > strong {
  overflow-wrap: anywhere;
}

.manager-session-actions {
  flex: 0 0 auto;
}

.manager-session-actions button {
  white-space: nowrap;
}

.manager-session-actions .manager-session-copy-copied {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #15803d;
  opacity: 1;
}

.session-pricing-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.session-pricing-badge--ready {
  background: #dcfce7;
  color: #15803d;
}

.session-pricing-badge--not-ready {
  background: #e2e8f0;
  color: #64748b;
}

.manager-session-preview-dialog {
  max-width: 760px;
}

.manager-session-preview-results {
  display: grid;
  max-height: 50vh;
  overflow: auto;
  gap: 8px;
  margin: 12px 0;
}

.manager-session-preview-result {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
}

.manager-session-preview-result span,
.manager-session-preview-comment {
  color: #64748b;
}

@media (max-width: 900px) {
  .topbar { align-items: flex-start; }
  .month-statistics { margin-left: 0; }
  .source-select-controls-row { flex-direction: column; }
  .source-select-controls-row .source-type-switch {
    width: 100%;
    flex-wrap: wrap;
    align-self: stretch;
  }
  .source-select-controls-row .source-session-restore-wrap {
    width: 100%;
    flex: 0 0 auto;
  }
}

.topbar-nav .tab-btn {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
  box-shadow: none;
  border-radius: 10px;
  padding: 8px 12px;
}

.topbar-nav .tab-btn:hover:not([disabled]) {
  transform: none;
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
  box-shadow: none;
}

.topbar-nav .tab-btn:active:not([disabled]) {
  transform: none;
}

.topbar-nav .tab-btn.is-active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.24);
}

.topbar-nav .tab-btn.is-active:hover:not([disabled]) {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
}

#login-btn {
  width: 100%;
  margin-top: 10px;
}

h2 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.card {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.06),
    0 2px 8px rgba(15, 23, 42, 0.04);
  padding: 18px;
  margin-bottom: 14px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #334155;
}

.inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 10px 14px 10px 2px;
  font-size: 14px;
}

input[type="url"],
input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

button {
  border: 1px solid transparent;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.2);
}

button:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

button:active:not([disabled]) {
  transform: translateY(0);
}

button[disabled],
button.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

button.is-loading {
  cursor: wait;
}

button.is-loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 999px;
  animation: store-presence-spin 0.8s linear infinite;
  vertical-align: -2px;
}

.danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.2);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ozon-clear-form-btn {
  margin-left: auto;
}

.recognition-range-row {
  margin: 6px 0 12px;
  max-width: 520px;
}

#saved-disk-folder-select {
  width: min(320px, 100%);
  max-width: 100%;
  margin-bottom: 0;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.5 1.75L6 6.25L10.5 1.75' stroke='%2364748b' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  cursor: pointer;
}

.source-form-field-saved {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
}

.source-yandex-controls {
  --source-control-height: 40px;
  --source-field-width: 280px;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}

.source-yandex-controls .source-form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 0 0 auto;
}

.source-yandex-controls .source-form-field-link,
.source-yandex-controls .source-form-field-saved {
  width: var(--source-field-width);
}

.source-yandex-controls .source-panel-label,
.source-yandex-controls label:not(.source-check-option),
.source-yandex-controls .source-form-field-caption {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: #334155;
}

.source-yandex-controls #public-link,
.source-yandex-controls #check-disk-btn,
.source-yandex-controls #saved-disk-folder-select,
.source-yandex-controls .source-check-option {
  height: var(--source-control-height);
  min-height: var(--source-control-height);
  margin: 0;
  box-sizing: border-box;
}

.source-yandex-controls #public-link,
.source-yandex-controls #saved-disk-folder-select {
  width: 100%;
  max-width: none;
  padding-top: 0;
  padding-bottom: 0;
}

.source-yandex-controls #check-disk-btn {
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
}

.source-yandex-controls .source-check-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.recognition-range-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.source-select-page {
  display: grid;
  gap: 12px;
}

.source-select-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 2px;
}

.source-select-header-copy h2 {
  margin-bottom: 10px;
}

.source-select-intro {
  display: grid;
  gap: 6px;
  max-width: 760px;
}

.source-select-lead {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
}

.source-select-lead strong {
  color: #0f172a;
  font-weight: 700;
}

.source-select-next {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.source-type-switch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
}

.source-select-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}

.source-select-controls-row .source-type-switch {
  flex: 0 0 auto;
  width: auto;
  flex-wrap: nowrap;
  align-self: flex-start;
}

.source-select-controls-row .source-type-option {
  white-space: nowrap;
}

.source-session-restore-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  flex: 1 1 420px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fafc;
}

.source-session-restore-btn {
  box-sizing: border-box;
  display: inline-flex;
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  justify-self: end;
  grid-column: 2;
  grid-row: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.source-session-restore-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.restore-session-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50000;
  width: min(520px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 120px));
  overflow: auto;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #dbe4f0;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.restore-session-menu.hidden {
  display: none;
}

.restore-session-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.restore-session-item + .restore-session-item {
  margin-top: 8px;
}

.restore-session-item-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.session-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: #64748b;
}

.session-item-comment {
  margin: 0;
  padding: 7px 9px;
  border-left: 3px solid #bfdbfe;
  border-radius: 0 8px 8px 0;
  background: #fff;
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.restore-session-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.restore-session-badge-current {
  background: #dbeafe;
  color: #1d4ed8;
}

.restore-session-badge-archived {
  background: #fee2e2;
  color: #b91c1c;
}

.restore-session-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.restore-session-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.restore-session-action-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.restore-session-action-btn-primary {
  border-color: #2563eb;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}

.restore-session-action-btn-primary:hover {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
}

.restore-session-empty {
  padding: 14px 12px;
  font-size: 13px;
  color: #64748b;
  text-align: center;
}

.source-type-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.source-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.source-type-option-label {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.source-type-option:hover .source-type-option-label {
  border-color: #94a3b8;
  background: #f8fafc;
}

.source-type-option:has(input:checked) .source-type-option-label {
  background: #fff;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.source-type-option:has(input:focus-visible) .source-type-option-label {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.source-type-option-disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.source-type-option-disabled .source-type-option-label {
  color: #94a3b8;
}

.source-type-option[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 100;
  width: min(320px, calc(100vw - 32px));
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.source-type-option[data-tooltip]:hover::after,
.source-type-option[data-tooltip]:focus-within::after,
.source-type-option[data-tooltip]:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.source-type-option.is-locked {
  cursor: help;
}

.source-type-option-note {
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.source-panel {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.45) 0%, rgba(255, 255, 255, 0.92) 55%);
}

.source-panel-yandex[hidden],
.source-panel-ozon[hidden] {
  display: none !important;
}

.source-panel label {
  margin-bottom: 6px;
}

.source-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 10px;
  max-width: 640px;
}

.source-form-row #public-link {
  width: min(360px, 100%);
  flex: 0 1 auto;
}

.source-form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  max-width: 640px;
}

.source-form-grid-ozon {
  max-width: 720px;
}

.source-ozon-route-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px 12px;
  margin-bottom: 12px;
  max-width: 900px;
}

.source-route-block {
  flex: 1 1 280px;
  min-width: 0;
  margin: 0;
  padding: 10px 12px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
}

.source-route-block legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.source-route-from-field {
  flex: 1 1 auto;
  width: 100%;
}

.source-route-from-field label:not(.source-load-mode-option) {
  margin-bottom: 6px;
}

.source-route-from-filter {
  flex: 0 0 auto;
  margin: 0;
  width: auto;
}

.source-route-from-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 8px;
}

.source-ozon-product-count {
  margin: 0;
  flex: 0 0 auto;
}

.source-route-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: center;
  width: 28px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: #64748b;
}

.source-route-to-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}

.source-route-target-store {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 280px;
}

.source-ozon-load-fieldset {
  max-width: 900px;
  margin-bottom: 12px;
}

.source-ozon-load-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.source-form-grid-yandex {
  max-width: none;
  align-items: flex-end;
  gap: 10px 24px;
}

.source-form-grid-yandex .source-form-field-link {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 560px;
}

.source-form-field-link .source-form-row {
  margin-bottom: 0;
  flex-wrap: nowrap;
  max-width: none;
}

.source-form-field-link .source-form-row #public-link {
  flex: 1 1 220px;
  width: auto;
  min-width: 140px;
}

.source-form-grid-yandex .source-form-field-caption {
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: #334155;
}

.source-form-field {
  flex: 0 1 260px;
  min-width: 0;
}

.source-form-field-inline {
  display: grid;
  gap: 6px;
  align-content: end;
  flex: 0 0 auto;
}

.source-form-field-caption {
  display: block;
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.source-check-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dbe4f0;
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.source-check-option input {
  width: auto;
  margin: 0;
}

.source-primary-btn {
  white-space: nowrap;
}

.source-load-mode-fieldset legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.source-load-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-destination-fieldset {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 10px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
}

.source-destination-fieldset legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.source-destination-switch {
  flex-wrap: nowrap;
}

.source-load-mode-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.source-load-mode-option input[type="radio"] {
  width: auto;
  margin: 0;
}

.source-load-mode-option:has(input[type="radio"]:checked) {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.source-load-mode-option-limit input[type="number"],
.source-load-mode-option-range input[type="text"] {
  width: 72px;
  padding: 6px 8px;
  margin: 0;
}

.source-load-mode-option-range input[type="text"] {
  width: min(160px, 100%);
}

.source-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.source-select-foot {
  display: grid;
  gap: 10px;
}

.source-select-summary {
  margin: 0;
}

.source-select-summary:empty,
.check-summary-card:empty {
  display: none;
}

.check-summary-card {
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  line-height: 1.45;
}

.check-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.check-summary-identity {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.check-summary-eyebrow {
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.check-summary-copy-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
}

.check-summary-folder {
  min-width: 0;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.check-summary-id {
  min-width: 0;
  color: #64748b;
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
}

.check-summary-copy-btn {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-left: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-summary-copy-row:hover .check-summary-copy-btn,
.check-summary-copy-row:focus-within .check-summary-copy-btn,
.check-summary-copy-btn.is-copied {
  opacity: 1;
  pointer-events: auto;
}

.check-summary-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.check-summary-stat {
  display: grid;
  flex: 0 0 auto;
  width: max-content;
  min-width: 120px;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.check-summary-stat-value {
  color: #334155;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.1;
}

.check-summary-stat-label {
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
}

.check-summary-stat--primary .check-summary-stat-value {
  color: #15803d;
}

.check-summary-hint {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
}

.job-summary-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
}

.job-summary-card:empty {
  display: none;
}

.job-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.job-summary-identity {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.job-summary-eyebrow {
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.job-summary-mode {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.job-summary-status {
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.job-summary-status--success {
  background: #f0fdf4;
  color: #15803d;
}

.job-summary-status--warning {
  background: #fff7ed;
  color: #c2410c;
}

.job-summary-status--error {
  background: #fef2f2;
  color: #b91c1c;
}

.job-summary-status--muted {
  background: #f1f5f9;
  color: #64748b;
}

.job-summary-stat--error .check-summary-stat-value {
  color: #c2410c;
}

.job-summary-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
}

.job-summary-error {
  color: #b91c1c;
  font-weight: 600;
}

.job-summary-note {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 12px;
}

.source-reset-row {
  margin-top: 0;
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .source-yandex-controls {
    flex-wrap: wrap;
  }

  .source-yandex-controls .source-form-field-link,
  .source-yandex-controls .source-form-field-saved {
    flex: 1 1 100%;
    width: 100%;
  }

  .source-yandex-controls {
    --source-field-width: 100%;
  }
}

@media (max-width: 640px) {
  .source-session-restore-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .source-form-row,
  .source-form-grid,
  .source-form-grid-ozon,
  .source-load-mode-fieldset,
  .source-ozon-route-row,
  .source-ozon-load-fieldset {
    max-width: none;
  }

  .source-route-arrow {
    width: 100%;
    transform: rotate(90deg);
    padding: 2px 0;
  }

  .source-route-target-store {
    flex: 1 1 100%;
    max-width: none;
  }

  .source-form-row #public-link,
  .source-form-field {
    flex: 1 1 100%;
    width: 100%;
  }

  .source-primary-btn {
    width: auto;
  }

  .ym-price-formula {
    width: 100%;
  }

  .ym-price-formula-main,
  .ym-price-formula-stack,
  .ym-price-formula-equations,
  .ym-price-formula-equation {
    width: 100%;
  }

  .ym-price-formula-base-cell,
  .ym-price-formula-field,
  .ym-price-formula-result {
    flex: 1 1 100%;
    width: auto;
    min-width: 0;
  }

  .ym-price-formula-equation {
    flex-wrap: wrap;
  }

}

.summary {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  line-height: 1.45;
}

.results-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 10px;
  font-size: 13px;
  color: #334155;
}

.row .results-table-toggle--row {
  margin: 0;
}

.row .results-table-toggle--row.inline {
  margin: 0;
}

.results-table-toggle {
  margin-top: 0;
}

.procenka-callout {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.results-inline-filters-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.results-article-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-article-filter-group label {
  margin: 0;
  font-size: 14px;
  color: #334155;
  white-space: nowrap;
}

.results-article-filter-group input {
  width: min(220px, 100%);
}

.results-price-filter-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.results-price-filter-panel.is-enabled {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
}

.results-price-filter-enable {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.results-price-filter-panel.is-enabled .results-price-filter-enable {
  color: #1d4ed8;
}

.results-price-filter-mode {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  white-space: nowrap;
}

.results-price-filter-panel.is-enabled .results-price-filter-mode {
  color: #334155;
}

.results-price-filter-panel input[type="number"] {
  width: min(140px, 100%);
}

.results-price-filter-panel:not(.is-enabled) .results-price-filter-mode,
.results-price-filter-panel:not(.is-enabled) input[type="number"] {
  opacity: 0.45;
}

.results-selection-counter {
  margin-top: 8px;
  font-size: 13px;
  color: #475569;
}

.results-progress-item {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
}

.results-progress-item.status-processing {
  background: #fef3c7;
  border-color: #facc15;
}

.results-progress-item.status-ok {
  background: #dcfce7;
  border-color: #22c55e;
}

.results-progress-item.status-error {
  background: #fee2e2;
  border-color: #ef4444;
}

.store-presence-panel {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.store-presence-panel.is-pending {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.25);
}

.store-presence-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.store-presence-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #dbe4f0;
  background: #fff;
  font-size: 12px;
  color: #64748b;
}

.store-presence-step.is-active {
  background: #fef3c7;
  border-color: #facc15;
  color: #854d0e;
}

.store-presence-step.is-done {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.store-presence-step.is-waiting {
  opacity: 0.75;
}

.store-presence-chip-spinner,
.store-presence-step-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #facc15;
  border-top-color: transparent;
  border-radius: 999px;
  animation: store-presence-spin 0.8s linear infinite;
  flex: 0 0 12px;
}

.store-presence-stat.is-pending-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-presence-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.store-presence-badge {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  flex: 0 0 14px;
}

.store-presence-badge.status-pending {
  border: 2px solid #facc15;
  border-top-color: transparent;
  animation: store-presence-spin 0.8s linear infinite;
}

.store-presence-badge.status-ready {
  background: #22c55e;
}

.store-presence-badge.status-failed {
  background: #ef4444;
}

.store-presence-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.store-presence-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.store-presence-stat {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dbe4f0;
  background: #fff;
  font-size: 13px;
  color: #334155;
}

.store-presence-stat.status-pending {
  background: #fef3c7;
  border-color: #facc15;
}

.store-presence-stat.status-ok {
  background: #dcfce7;
  border-color: #22c55e;
}

.store-presence-stat.status-warn {
  background: #ffedd5;
  border-color: #fb923c;
}

.store-presence-stat.status-error {
  background: #fee2e2;
  border-color: #ef4444;
}

.store-presence-stat.status-skipped {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

.store-presence-detail {
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
  white-space: pre-wrap;
}

@keyframes store-presence-spin {
  to {
    transform: rotate(360deg);
  }
}

.source-ozon-load-actions {
  margin-bottom: 0;
}

.store-presence-actions {
  margin-top: 0;
}

.store-presence-actions[hidden] {
  display: none !important;
}

#store-presence-actions-anchor-ozon .store-presence-actions,
#store-presence-actions-anchor-yandex .store-presence-actions {
  margin-top: 10px;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 12px;
}

table {
  width: 100%;
  min-width: 1088px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

#results-table {
  min-width: 1358px;
}

#results-table.is-procenka-mode {
  min-width: 1528px;
}

#results-table tr.result-row-fully-successful td {
  background: #ecfdf3;
}

#results-table tr.result-row-ready-to-submit td {
  background: #fffbeb;
}

th,
td {
  border-bottom: 1px solid #eef2f7;
  padding: 8px;
  vertical-align: top;
  font-size: 13px;
  overflow-wrap: anywhere;
}

tr:last-child td {
  border-bottom: none;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #334155;
  text-align: center;
}

td input,
td textarea {
  font-size: 13px;
}

.col-select {
  width: 38px;
}

#results-table th.col-select,
#results-table td.col-select {
  padding-left: 4px;
  padding-right: 2px;
}

.col-database {
  width: 36px;
}

.results-col-database {
  width: 36px;
  max-width: 36px;
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
  white-space: nowrap;
}

.result-main-row.is-expanded {
  background: rgba(248, 250, 252, 0.95);
}

.result-database-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  box-shadow: none;
  cursor: pointer;
}

.result-database-toggle:hover:not([disabled]) {
  transform: none;
  background: #f8fafc;
  box-shadow: none;
}

.result-database-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.15s ease;
}

.result-main-row.is-expanded .result-database-toggle svg {
  transform: rotate(90deg);
}

.result-database-detail-row td {
  padding: 0;
  border-bottom: 1px solid #dbe4f0;
  background: #f8fafc;
  text-align: left;
}

.result-database-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
}

.result-database-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.result-database-message {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #475569;
}

.result-database-message--error {
  color: #b91c1c;
}

.result-database-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 4)), 1fr));
  justify-items: stretch;
}

.result-database-edition {
  display: grid;
  gap: 4px;
  padding: 8px 10px 8px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  justify-items: start;
}

.result-database-meta,
.result-database-title,
.result-database-citation,
.result-database-classification {
  width: 100%;
  max-width: 100%;
  text-align: left;
}

.result-database-meta {
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

.result-database-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
}

.result-database-citation {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.result-database-classification {
  font-size: 11px;
  line-height: 1.3;
  color: #64748b;
}

.result-database-highlight {
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  border-radius: 4px;
  padding: 0 2px;
  font-weight: 700;
}

.result-database-highlight--title-phrase {
  background: #fde68a;
  color: #713f12;
  box-shadow: inset 0 -1px 0 rgba(180, 83, 9, 0.35);
}

.result-database-highlight--author-phrase {
  background: #bfdbfe;
  color: #1e3a8a;
  box-shadow: inset 0 -1px 0 rgba(37, 99, 235, 0.32);
}

.result-database-highlight--title-word {
  background: #fef3c7;
  color: #92400e;
}

.result-database-highlight--author-word {
  background: #dbeafe;
  color: #1d4ed8;
}

.col-article {
  width: 84px;
}

#results-table th.col-article,
#results-table td.col-article {
  padding-left: 6px;
  padding-right: 6px;
}

.article-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  line-height: 1.35;
}

.article-cell-text {
  white-space: nowrap;
  overflow-wrap: normal;
  font-weight: 600;
}

.article-copy-btn {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 4px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1;
  box-shadow: none;
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.article-cell > .article-copy-btn {
  margin-left: 0;
  opacity: 0;
  pointer-events: none;
}

.article-cell:hover > .article-copy-btn,
.article-cell:focus-within > .article-copy-btn,
.article-cell > .article-copy-btn.is-copied {
  opacity: 1;
  pointer-events: auto;
}

.article-copy-btn svg {
  width: 12px;
  height: 12px;
}

.article-copy-btn:hover:not([disabled]) {
  transform: none;
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
  box-shadow: none;
}

.article-copy-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.article-copy-btn:active:not([disabled]) {
  transform: none;
}

.article-copy-btn.is-copied {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.col-series,
.col-author,
.col-title {
  width: 170px;
}

.col-price {
  width: 96px;
}

#results-table.is-procenka-mode col.col-price {
  width: 148px;
}

.col-marketplace-search {
  width: 58px;
}

#results-table th.col-marketplace-search,
#results-table td.col-marketplace-search {
  padding-left: 3px;
  padding-right: 3px;
}

#results-table:not(.is-procenka-mode) col.col-text-full {
  width: 0;
}

#results-table.is-procenka-mode col.col-text-full {
  width: 170px;
}

#results-table:not(.is-procenka-mode) th.col-text-full,
#results-table:not(.is-procenka-mode) td.col-text-full {
  width: 0;
  max-width: 0;
  padding: 0;
  border-width: 0;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: top;
}

#results-table:not(.is-procenka-mode) th.col-text-full *,
#results-table:not(.is-procenka-mode) td.col-text-full * {
  display: none;
}

.price-field-with-actions {
  width: 100%;
}

#results-table.is-procenka-mode .price-field-with-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#results-table.is-procenka-mode .price-field-with-actions .field-price {
  flex: 0 0 72px;
  width: 72px;
  min-width: 0;
  align-self: center;
}

.price-quick-fill-actions {
  display: none;
  grid-template-columns: repeat(2, max-content);
  align-content: center;
  gap: 2px 8px;
}

#results-table.is-procenka-mode .price-quick-fill-actions {
  display: grid;
  align-self: center;
}

.price-quick-fill-actions .field-meta-action {
  display: block;
  min-width: 2.75em;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.col-confidence {
  width: 0;
  max-width: 0;
  padding: 0;
  border-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

#results-table col.col-confidence {
  width: 0;
}

#results-table th.col-confidence *,
#results-table td.col-confidence * {
  display: none;
}

.col-preview {
  width: 76px;
}

#results-table.is-preview-enlarged .col-preview {
  width: 492px;
}

#results-table.is-preview-enlarged .preview-wrap,
#results-table.is-preview-enlarged .preview-wrap img,
#results-table.is-preview-enlarged .preview-placeholder {
  width: 453.6px;
  height: 453.6px;
}

#results-table.is-preview-enlarged .preview-placeholder.is-pending::after {
  width: 54px;
  height: 54px;
  border-width: 6px;
}

#toggle-preview-size-btn.is-active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.col-status {
  width: 180px;
}

.col-error {
  width: 140px;
}

.col-updated-at {
  width: 170px;
}

.col-store {
  width: 180px;
}

.col-external-article {
  width: 120px;
}

.col-external-id {
  width: 120px;
}

.col-sent-costs {
  width: 120px;
}

.col-publish-status {
  width: 120px;
}

.col-import-status {
  width: 130px;
}

.col-author-dict-status {
  width: 130px;
}

.col-author-dict-values {
  width: 170px;
}

.col-author-dict-error {
  width: 190px;
}

.col-author-dict-updated {
  width: 170px;
}

.col-task-id {
  width: 100px;
}

.col-import-errors {
  width: 260px;
}

.preview-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50.4px;
  height: 50.4px;
}

.preview-wrap img {
  width: 50.4px;
  height: 50.4px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.preview-cell-content {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.preview-confidence {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.preview-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50.4px;
  height: 50.4px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.preview-placeholder.is-pending::after {
  width: 14px;
  height: 14px;
  border: 2px solid #cbd5e1;
  border-top-color: #64748b;
  border-radius: 999px;
  content: "";
  animation: preview-spin 0.9s linear infinite;
}

.preview-placeholder.is-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

@keyframes preview-spin {
  to {
    transform: rotate(360deg);
  }
}

.preview-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.18);
}

.preview-zoom-overlay.is-visible {
  display: flex;
}

.preview-zoom-frame {
  position: relative;
  display: inline-block;
  pointer-events: none;
}

.preview-zoom-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.24);
}

.preview-zoom-close::before,
.preview-zoom-close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: #0f172a;
  content: "";
  transform-origin: center;
}

.preview-zoom-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.preview-zoom-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.preview-zoom-overlay img {
  display: block;
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid #94a3b8;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.38);
  pointer-events: none;
}

.submit-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
}

.submit-confirm-dialog {
  width: min(460px, 100%);
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
  padding: 22px;
}

.submit-confirm-dialog h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.submit-confirm-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0 0 18px;
  font-size: 14px;
}

.submit-confirm-details dt {
  color: #64748b;
  font-weight: 700;
}

.submit-confirm-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.submit-confirm-price-value-low {
  color: #dc2626;
}

.submit-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.submit-confirm-cancel {
  border-color: #cbd5e1;
  background: #fff;
  color: #334155;
  box-shadow: none;
}

.cell-textarea {
  min-width: 0;
  min-height: 34px;
  overflow: hidden;
  resize: none;
  line-height: 1.35;
  white-space: pre-wrap;
}

.cell-textarea-wide {
  min-height: 34px;
}

.recognized-text-field-with-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.recognized-text-field-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 13px;
}

.recognized-text-caps-btn {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.counted-text-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.field-character-counter {
  align-self: flex-end;
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.field-character-counter.is-over-limit {
  color: #dc2626;
  font-weight: 600;
}

.counted-text-field-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 13px;
}

.field-meta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-right: auto;
}

button.field-meta-action {
  margin-right: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #94a3b8;
  text-underline-offset: 2px;
  box-shadow: none;
  transform: none;
  transition: color 0.15s ease;
}

button.field-meta-action:hover:not([disabled]),
button.field-meta-action:active:not([disabled]) {
  color: #475569;
  background: none;
  box-shadow: none;
  transform: none;
  text-decoration-color: #64748b;
}

button.field-meta-action[hidden] {
  display: none;
}

.is-edited {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.16);
}

.cell-small {
  width: 100%;
  padding-left: 6px;
  padding-right: 6px;
  appearance: textfield;
}

.cell-small::-webkit-outer-spin-button,
.cell-small::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#results-table tbody .col-status,
#results-table tbody .col-error {
  font-size: 12px;
  line-height: 1.25;
}

#results-table tbody .col-error {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.marketplace-search-link {
  font-size: 12px;
  white-space: nowrap;
}

.marketplace-search-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.marketplace-search-copy-btn {
  margin-top: 2px;
  opacity: 0;
  pointer-events: none;
}

.marketplace-search-cell:hover .marketplace-search-copy-btn,
.marketplace-search-cell:focus-within .marketplace-search-copy-btn,
.marketplace-search-copy-btn.is-copied {
  opacity: 1;
  pointer-events: auto;
}

#results-table .results-col-header-with-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
}

#results-table .results-col-header-with-copy .article-copy-btn {
  margin-left: 0;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

#results-table .results-col-header-with-copy .article-copy-btn svg {
  width: 11px;
  height: 11px;
}

#results-table .col-marketplace-search {
  text-align: center;
}

.row-price-form-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  white-space: pre-line;
}

td:first-child,
th:first-child {
  text-align: center;
}

.row-selector {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.row-selector-all {
  vertical-align: middle;
}

.publish-tabs {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 6px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.84);
}

.tab-btn {
  position: relative;
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: none;
}

.tab-btn[data-tab="ozon"] {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.tab-btn[data-tab="wb"] {
  background: #fff1f7;
  color: #9d174d;
  border-color: #fbcfe8;
}

.tab-btn[data-tab="download"] {
  background: #f8fafc;
  color: #334155;
  border-color: #e2e8f0;
}

.tab-btn.is-active[data-tab="ozon"] {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
  border-color: #60a5fa;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.18);
}

.tab-btn.is-active[data-tab="wb"] {
  background: linear-gradient(135deg, #fde7f3, #fbcfe8);
  color: #831843;
  border-color: #f9a8d4;
  box-shadow: 0 8px 18px rgba(219, 39, 119, 0.14);
}

.tab-btn.is-active[data-tab="download"] {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 8px 18px rgba(100, 116, 139, 0.14);
}

#published-table {
  min-width: 960px;
}

.published-page {
  display: grid;
  gap: 14px;
}

.published-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.published-header-copy h2 {
  margin: 0 0 6px;
}

.published-lead {
  margin: 0;
  max-width: 52ch;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.published-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.published-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
}

.published-stat-value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
}

.published-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.published-stat--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.published-stat--success .published-stat-value {
  color: #15803d;
}

.published-stat--progress {
  border-color: #fde68a;
  background: #fffbeb;
}

.published-stat--progress .published-stat-value {
  color: #b45309;
}

.published-stat--errors {
  border-color: #fecaca;
  background: #fef2f2;
}

.published-stat--errors .published-stat-value {
  color: #b91c1c;
}

.published-status-breakdown {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.published-status-breakdown-body {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.published-status-breakdown-row {
  display: flex;
  gap: 8px;
}

.published-toolbar {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
}

.published-toolbar-filters,
.published-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}

.published-toolbar-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.published-toolbar-field label,
.published-toolbar-field-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.published-toolbar-field select,
.published-toolbar-field-search input {
  width: auto;
  min-width: 180px;
}

.published-toolbar-field-search input {
  min-width: 220px;
}

.published-status-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.14);
}

.published-status-tab {
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.published-status-tab.is-active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.published-status-select-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.published-search-hint {
  align-self: center;
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
}

.published-error {
  margin: 0;
}

.published-empty {
  padding: 28px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.85);
  text-align: center;
}

.published-empty-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.published-empty-text {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.published-empty-action {
  margin-top: 12px;
}

.shops-page {
  display: grid;
  gap: 12px;
}

.shops-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.shops-header-copy h2 {
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.shops-lead {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.shops-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shops-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.14);
}

.shops-tab-btn {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.shops-tab-btn.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.shops-tab-panel {
  display: none;
}

.shops-tab-panel.is-active {
  display: block;
}

.shops-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.shops-summary::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.shops-summary[data-status="loading"]::before {
  background: #2563eb;
  animation: shops-summary-pulse 1.2s ease-in-out infinite;
}

.shops-summary[data-status="success"]::before {
  background: #22a06b;
}

.shops-summary[data-status="error"] {
  color: #9f3340;
}

.shops-summary[data-status="error"]::before {
  background: #c45863;
}

.shops-summary:empty {
  display: none;
}

@keyframes shops-summary-pulse {
  50% {
    opacity: 0.35;
  }
}

.shops-empty {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.shops-coming-soon {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}

#shops-ozon-table {
  min-width: 1140px;
  border-collapse: separate;
  border-spacing: 0;
}

#shops-ozon-table th {
  padding: 10px 12px;
  vertical-align: middle;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid #dbe3ee;
}

#shops-ozon-table td {
  padding: 14px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #e8edf3;
}

#shops-ozon-table tbody tr {
  transition: background-color 0.16s ease;
}

#shops-ozon-table tbody tr:hover {
  background: #f8fafc;
}

.shops-store-name {
  min-width: 138px;
  color: #0f172a;
  font-weight: 700;
}

.shops-expand-head,
.shops-expand-cell {
  width: 64px;
  text-align: center;
}

.shops-expand-btn {
  min-width: 42px;
  padding: 5px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.shops-expand-btn:hover:not([disabled]) {
  transform: none;
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: none;
}

.shops-row.is-expanded {
  background: #f8fafc;
}

.shops-detail-row td {
  padding: 0 14px 16px;
  background: #f8fafc;
}

.shops-zero-stock-panel {
  padding: 16px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
}

.shops-zero-stock-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shops-zero-stock-heading h3 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
}

.shops-zero-stock-heading span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.shops-zero-stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.shops-zero-stock-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.shops-zero-stock-card-body {
  min-width: 0;
}

.shops-zero-stock-card-body strong,
.shops-zero-stock-card-body span {
  display: block;
}

.shops-zero-stock-card-body strong {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.shops-zero-stock-card-body span {
  margin-top: 4px;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shops-zero-stock-empty {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.shops-client-id {
  color: #64748b;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.shops-quotas-cell {
  width: 220px;
}

.shops-quota-item + .shops-quota-item {
  margin-top: 10px;
}

.shops-quota-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #475569;
  font-size: 12px;
}

.shops-quota-heading strong {
  color: #0f172a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.shops-quota-track {
  height: 5px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.shops-quota-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4f7fe9;
}

.shops-quota-fill--warning {
  background: #d79b32;
}

.shops-number-cell {
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.shops-number-cell--error {
  color: #a63d46;
}

.shops-stocks-cell strong,
.shops-stocks-cell span {
  display: block;
}

.shops-stocks-cell {
  text-align: center;
}

.shops-stocks-cell strong {
  color: #0f172a;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.shops-stocks-cell span {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}

.shops-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.shops-status-badge--success {
  color: #166534;
  background: #e8f7f0;
}

.shops-status-badge--success::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22a06b;
}

.shops-row--pending td:last-child {
  color: #1d4ed8;
}

.shops-row--error td:last-child {
  color: #b91c1c;
}

#shops-ozon-table th:nth-child(3),
#shops-ozon-table th:nth-child(5),
#shops-ozon-table th:nth-child(6),
#shops-ozon-table th:nth-child(7),
#shops-ozon-table th:nth-child(8),
#shops-ozon-table td:nth-child(8) {
  text-align: center;
}

#shops-ozon-table .shops-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  box-shadow: none;
  cursor: pointer;
}

#shops-ozon-table .shops-sort-btn:hover:not([disabled]) {
  transform: none;
  color: #2563eb;
  box-shadow: none;
}

#shops-ozon-table .shops-sort-btn:active:not([disabled]) {
  transform: none;
}

#shops-ozon-table .shops-sort-btn.is-active {
  color: #1d4ed8;
}

#shops-ozon-table .shops-sort-btn::after {
  content: "↕";
  font-size: 10px;
  color: #94a3b8;
}

#shops-ozon-table .shops-sort-btn.is-active[data-sort-direction="asc"]::after {
  content: "↑";
  color: #2563eb;
}

#shops-ozon-table .shops-sort-btn.is-active[data-sort-direction="desc"]::after {
  content: "↓";
  color: #2563eb;
}

.shops-quotas-head .shops-sort-btn {
  display: inline-flex;
}

@media (max-width: 700px) {
  .shops-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .shops-summary {
    margin-left: 0;
  }
}

.published-table-wrap {
  margin-top: 0;
}

.published-table {
  width: 100%;
  border-collapse: collapse;
}

.published-table th,
.published-table td {
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.published-table th {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  white-space: nowrap;
}

.published-col-expand {
  width: 40px;
}

.published-main-row {
  cursor: pointer;
}

.published-main-row.is-expanded {
  background: rgba(239, 246, 255, 0.55);
}

.published-row-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  box-shadow: none;
}

.published-row-toggle:hover:not([disabled]) {
  transform: none;
  background: #f8fafc;
  box-shadow: none;
}

.published-row-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.published-main-row.is-expanded .published-row-toggle svg {
  transform: rotate(90deg);
}

.published-marketplace-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.published-marketplace-badge--ozon {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.published-marketplace-badge--wb {
  background: #fff1f7;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}

.published-book-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.published-book-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
}

.published-book-author {
  font-size: 12px;
  line-height: 1.3;
  color: #64748b;
}

.published-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.published-status-badge--ok {
  background: #dcfce7;
  color: #15803d;
}

.published-status-badge--pending {
  background: #f1f5f9;
  color: #64748b;
}

.published-status-badge--error {
  background: #fee2e2;
  color: #b91c1c;
}

.published-cell-muted {
  font-size: 13px;
  line-height: 1.35;
  color: #334155;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.published-detail-row td {
  padding: 0;
  border-bottom: 1px solid #dbe4f0;
  background: #f8fafc;
}

.published-detail-panel {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px 54px;
}

.published-detail-section {
  display: grid;
  gap: 6px;
}

.published-detail-section-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.published-detail-grid {
  display: grid;
  gap: 4px 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.published-detail-item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.published-detail-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.published-detail-value {
  font-size: 13px;
  line-height: 1.4;
  color: #0f172a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.published-detail-value--error {
  color: #b91c1c;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .published-toolbar-filters,
  .published-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .published-toolbar-field select,
  .published-toolbar-field-search input {
    width: 100%;
    min-width: 0;
  }

  .published-detail-panel {
    padding-left: 16px;
  }
}

.tab-panel {
  display: none;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
}

.tab-panel.is-active {
  display: block;
}

.tab-panel[data-tab-panel="ozon"] {
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.52)),
    #eff6ff;
  border-color: #bfdbfe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.tab-panel[data-tab-panel="wb"] {
  background:
    linear-gradient(180deg, rgba(255, 241, 247, 0.98), rgba(253, 231, 243, 0.58)),
    #fff1f7;
  border-color: #fbcfe8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.tab-panel[data-tab-panel="download"] {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.72)),
    #f8fafc;
  border-color: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.status-cell {
  white-space: normal;
}

.status-line {
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.status-line a {
  color: inherit;
  font-weight: inherit;
}

.status-pending {
  color: #64748b;
}

.status-processing {
  color: #ca8a04;
  font-weight: 700;
}

.status-ok {
  color: #047857;
  font-weight: 700;
}

.preview-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.preview-media-badge {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.2;
  color: #475569;
  white-space: nowrap;
}

.status-skipped {
  color: #64748b;
  font-style: italic;
}

.status-error {
  color: #b91c1c;
  font-weight: 700;
}

.ozon-layout {
  display: grid;
  gap: 12px;
}

.ozon-group {
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #dbe4f0;
}

.ozon-group h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.ozon-group-summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.ozon-group-summary-title {
  white-space: nowrap;
}

.ozon-group-summary-hint {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.ozon-group-summary::-webkit-details-marker {
  display: none;
}

.ozon-group-summary::before {
  content: ">";
  color: #64748b;
  transition: transform 0.16s ease;
}

.ozon-collapsible-group[open] .ozon-group-summary {
  margin-bottom: 10px;
}

.ozon-collapsible-group[open] .ozon-group-summary::before {
  transform: rotate(90deg);
}

.ozon-group-category {
  background: #f5f9ff;
}

.ozon-group-store {
  background: #f5fffa;
}

.ozon-group-attrs {
  background: #f8f7ff;
}

.ozon-group-price {
  background: #fff8f3;
}

.ym-price-formula {
  width: 50%;
  max-width: 100%;
}

.ym-price-formula-main {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

.ym-price-formula-base-cell,
.ym-price-formula-field,
.ym-price-formula-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.ym-price-formula-base-cell {
  flex: 1 1 180px;
  width: auto;
  min-width: 0;
  justify-content: flex-start;
}

.ym-price-formula-base-hint {
  margin: 0;
  line-height: 1.3;
}

.ym-settings-unsaved-hint {
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  line-height: 1.35;
}

.ym-settings-unsaved-hint.hidden {
  display: none;
}

.ym-price-formula-stack {
  display: grid;
  gap: 8px;
  flex: 2 1 320px;
  width: auto;
  min-width: 0;
  max-width: 100%;
}

.ym-price-formula-equations {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.ym-price-formula-equation {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  max-width: 100%;
}

.ym-price-formula-equation-discount {
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}

.ym-price-formula-field {
  flex: 1 1 180px;
  width: auto;
  min-width: 0;
}

.ym-price-formula-field input,
.ym-price-formula-base-cell input {
  width: 100%;
  min-width: 0;
}

.ym-price-formula-op {
  flex: 0 0 auto;
  align-self: center;
  width: 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: #64748b;
}

.ym-price-formula-result {
  flex: 0 0 140px;
  width: auto;
  min-width: 120px;
  justify-content: center;
  background: #f8fafc;
}

.ym-price-formula-result-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
}

.ym-price-formula-result-value {
  font-size: 16px;
  line-height: 1.2;
  color: #0f172a;
}

.ym-price-formula-base-cell.is-required-highlight,
.ym-price-formula-field.is-required-highlight {
  border-color: #f87171;
  background: #fffafa;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.12);
}

.ym-price-formula-base-cell.is-required-highlight label,
.ym-price-formula-field.is-required-highlight label {
  color: #991b1b;
}

.ym-price-formula-base-cell.is-required-highlight input,
.ym-price-formula-field.is-required-highlight input {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.ym-price-formula-base-cell label,
.ym-price-formula-field label {
  margin: 0;
}

.ozon-group-size {
  background: #f3fbf7;
}

.packaging-profile-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.packaging-profile-btn.is-active {
  background: #1f4b3a;
  color: #fff;
  border-color: #1f4b3a;
}

.packaging-profile-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.packaging-custom-hint,
.packaging-dirty-hint,
.packaging-settings-status {
  margin: 0 0 8px;
}

.packaging-dirty-hint {
  color: #8a4b00;
  font-weight: 600;
}

.packaging-custom-actions {
  margin: 0 0 10px;
}

.packaging-mp-field.is-dirty input {
  border-color: #c47b1a;
  background: #fff8ee;
}

.packaging-mp-fields input:not([readonly]) {
  background: #fff;
}

.packaging-profile-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.packaging-mp-group {
  min-width: 0;
  border: 1px solid #d7e3dc;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fbf9;
}

.packaging-mp-title {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

.packaging-mp-fields {
  display: grid;
  gap: 4px;
}

.packaging-mp-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 6px;
}

.packaging-mp-field label {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  color: #40534a;
}

.packaging-mp-fields input[readonly] {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 4px 6px;
  background: #f5f7f6;
  color: #24312c;
  font-size: 13px;
}

@media (max-width: 900px) {
  .packaging-profile-values {
    grid-template-columns: 1fr;
  }
}

.ozon-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(340px, 1fr));
  gap: 10px 16px;
  margin-bottom: 0;
}

.shops-cards-top {
  margin-bottom: 12px;
}

.shops-cards-folders {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.shops-cards-folder-item {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fafc;
}

.shops-cards-folder-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
  font-size: 12px;
}

#shops-cards-table th,
#shops-cards-table td {
  vertical-align: top;
  padding: 6px 8px;
}

#shops-cards-table td {
  white-space: pre-line;
}

.media-prep-page {
  display: grid;
  gap: 16px;
}

.media-prep-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.media-prep-header-copy {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.media-prep-header-copy h2 {
  margin-bottom: 6px;
}

.media-prep-lead {
  margin: 0;
  max-width: 640px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.media-prep-disclaimer {
  margin: 10px 0 0;
  width: max-content;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.45;
}

.media-prep-disclaimer p {
  margin: 0;
}

.media-prep-disclaimer p + p {
  margin-top: 6px;
}

.media-prep-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.media-prep-stat {
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #dbe4f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  text-align: center;
}

.media-prep-stat-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: #0f172a;
}

.media-prep-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.media-prep-stat--processing .media-prep-stat-value {
  color: #1d4ed8;
}

.media-prep-stat--queued .media-prep-stat-value {
  color: #7c3aed;
}

.media-prep-stat--done .media-prep-stat-value {
  color: #15803d;
}

.media-prep-form-panel {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.45) 0%, rgba(255, 255, 255, 0.92) 55%);
}

.media-prep-form-panel label {
  margin-bottom: 10px;
}

.media-prep-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.media-prep-add-btn {
  white-space: nowrap;
}

.media-prep-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px;
}

.media-prep-pipeline-step {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.media-prep-pipeline-arrow {
  color: #94a3b8;
  font-size: 13px;
}

.media-prep-queue-section {
  display: grid;
  gap: 10px;
}

.media-prep-queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.media-prep-queue-heading h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.media-prep-queue-count {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.media-prep-summary {
  margin: 0;
}

.media-prep-queue {
  display: grid;
  gap: 12px;
}

.media-prep-queue-empty {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 28px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  text-align: center;
}

.media-prep-queue-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 22px;
  font-weight: 700;
}

.media-prep-queue-empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.media-prep-queue-empty-text {
  margin: 0;
  max-width: 420px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.media-prep-queue-active {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-prep-queue-archive {
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.media-prep-queue-archive-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.media-prep-queue-archive-header:hover {
  background: #eef2f7;
}

.media-prep-queue-archive-count {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.media-prep-queue-archive-items {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-prep-queue-archive-items[hidden] {
  display: none;
}

.media-prep-queue-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  border-left: 4px solid #cbd5e1;
}

.media-prep-queue-item--queued {
  border-left-color: #8b5cf6;
}

.media-prep-queue-item--processing {
  border-left-color: #2563eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.media-prep-queue-item--completed {
  border-left-color: #16a34a;
}

.media-prep-queue-item--completed_with_errors {
  border-left-color: #d97706;
}

.media-prep-queue-item--failed {
  border-left-color: #dc2626;
}

.media-prep-queue-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.media-prep-queue-item-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.media-prep-copy-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.media-prep-copy-btn {
  flex: 0 0 auto;
  margin-left: 0;
}

.media-prep-copy-text {
  min-width: 0;
}

.media-prep-queue-title-row .media-prep-copy-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.media-prep-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.media-prep-status-badge-queued {
  background: #f3e8ff;
  color: #6d28d9;
}

.media-prep-status-badge-processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.media-prep-status-badge-completed {
  background: #dcfce7;
  color: #15803d;
}

.media-prep-status-badge-completed_with_errors {
  background: #fef3c7;
  color: #b45309;
}

.media-prep-status-badge-failed {
  background: #fee2e2;
  color: #b91c1c;
}

.media-prep-queue-link .media-prep-copy-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 12px;
}

.media-prep-progress-grid {
  display: grid;
  gap: 8px;
}

.media-prep-progress-row {
  display: grid;
  gap: 4px;
}

.media-prep-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.media-prep-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.media-prep-progress-value {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.media-prep-progress-track {
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.media-prep-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.25s ease;
}

.media-prep-progress-fill.is-done {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.media-prep-queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.media-prep-queue-duration,
.media-prep-queue-summary {
  font-size: 13px;
  color: #475569;
}

.media-prep-queue-duration-processing {
  color: #1d4ed8;
  font-weight: 600;
}

.media-prep-queue-error {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  font-size: 13px;
  color: #b91c1c;
}

.media-prep-queue-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1280px) {
  .media-prep-queue-active,
  .media-prep-queue-archive-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .media-prep-form-row {
    grid-template-columns: 1fr;
  }

  .media-prep-add-btn {
    width: 100%;
  }

  .media-prep-queue-active,
  .media-prep-queue-archive-items {
    grid-template-columns: 1fr;
  }
}

.models-page {
  display: grid;
  gap: 18px;
  width: 100%;
}

.models-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.models-header-copy h2 {
  margin: 0 0 6px;
}

.models-lead {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
  max-width: 52ch;
}

.models-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.models-generated-at {
  color: #64748b;
  font-size: 13px;
}

.models-period-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.14);
}

.models-period-tab {
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.models-period-tab.is-active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

.models-period-hint {
  margin: -6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.models-chain-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 14px;
  align-items: start;
}

.models-chain-panel,
.models-cumulative-panel {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.85);
}

.models-cumulative-panel .models-section-title {
  margin-bottom: 6px;
}

.models-cumulative-list {
  display: grid;
  gap: 4px;
}

.models-cumulative-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
}

.models-cumulative-row-label {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}

.models-cumulative-row-fill {
  flex: 1 1 auto;
  min-width: 8px;
  border-bottom: 1px dotted rgba(148, 163, 184, 0.55);
  transform: translateY(-2px);
}

.models-cumulative-row-value {
  flex: 0 0 auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #334155;
}

.models-cumulative-row--ollama .models-cumulative-row-value {
  color: #6d28d9;
}

.models-cumulative-row--openai .models-cumulative-row-value {
  color: #0e7490;
}

.models-cumulative-row--total {
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.models-cumulative-row--total .models-cumulative-row-label,
.models-cumulative-row--total .models-cumulative-row-value {
  font-weight: 600;
  color: #475569;
}

.models-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.models-chain-flow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.models-chain-step {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
}

.models-chain-step--openai {
  border-color: rgba(14, 116, 144, 0.35);
  background: rgba(236, 254, 255, 0.7);
}

.models-chain-step-id {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.models-chain-step-provider {
  font-size: 12px;
  color: #475569;
}

.models-chain-step-model {
  font-size: 15px;
}

.models-chain-step-detail {
  display: inline-flex;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.models-chain-arrow {
  align-self: center;
  color: #94a3b8;
  font-size: 18px;
}

.models-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.models-kpi {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
}

.models-kpi-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.models-kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.models-kpi--covers .models-kpi-value {
  color: #1d4ed8;
}

.models-kpi--vision .models-kpi-value {
  color: #1d4ed8;
}

.models-kpi--import .models-kpi-value {
  color: #64748b;
}

.models-kpi--ratio .models-kpi-value {
  color: #334155;
}

.models-kpi--accepted .models-kpi-value {
  color: #15803d;
}

.models-kpi--manual .models-kpi-value {
  color: #b45309;
}

.models-kpi--failed .models-kpi-value {
  color: #b91c1c;
}

.models-kpi--ollama .models-kpi-value {
  color: #6d28d9;
}

.models-kpi--openai .models-kpi-value {
  color: #0e7490;
}

.models-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.models-panel {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: #fff;
}

.models-table-wrap {
  max-width: 100%;
  overflow-x: hidden;
}

.models-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}

.models-table th,
.models-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.models-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.models-table tbody tr:last-child td {
  border-bottom: 0;
}

.models-summary {
  margin: 0;
}

@media (max-width: 980px) {
  .models-chain-row {
    grid-template-columns: 1fr;
  }

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

  .models-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .models-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.nav-badge.hidden {
  display: none;
}

.current-tasks-page {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.current-tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.current-tasks-header-copy h2 {
  margin-bottom: 4px;
}

.current-tasks-lead {
  margin: 0;
  max-width: 520px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.current-tasks-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-height: 28px;
  align-items: center;
}

.current-tasks-stats.is-empty {
  visibility: hidden;
}

.current-tasks-stat {
  min-width: auto;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  text-align: center;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.current-tasks-stat-value {
  display: inline;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
}

.current-tasks-stat-label {
  display: inline;
  margin-top: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #64748b;
  white-space: nowrap;
}

.current-tasks-stat--total .current-tasks-stat-value {
  color: #0f172a;
}

.current-tasks-stat--recognition .current-tasks-stat-value {
  color: #7c3aed;
}

.current-tasks-stat--media .current-tasks-stat-value {
  color: #2563eb;
}

.current-tasks-stat--import .current-tasks-stat-value,
.current-tasks-stat--ozon .current-tasks-stat-value {
  color: #1d4ed8;
}

.current-tasks-stat--wb .current-tasks-stat-value {
  color: #be185d;
}

.current-tasks-stat--ym .current-tasks-stat-value {
  color: #a16207;
}

.current-tasks-stat--cards .current-tasks-stat-value,
.current-tasks-stat--presence .current-tasks-stat-value {
  color: #0f766e;
}

.current-tasks-total.hidden {
  display: none;
}

.current-tasks-total {
  display: none;
}

.current-tasks-summary {
  margin: 0;
}

.current-tasks-section {
  display: grid;
  gap: 6px;
}

.current-tasks-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.current-tasks-section-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.current-tasks-list,
.current-tasks-groups {
  display: grid;
  gap: 8px;
  contain: layout style;
}

.current-tasks-list {
  grid-template-columns: 1fr;
}

.current-tasks-empty {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 16px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
}

.current-tasks-empty--compact {
  padding: 12px 10px;
}

.current-tasks-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 16px;
  font-weight: 700;
}

.current-tasks-empty-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.current-tasks-empty-text {
  margin: 0;
  max-width: 360px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.current-tasks-item {
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  border-left: 3px solid #cbd5e1;
  overflow: hidden;
}

.current-tasks-item--recognition {
  border-left-color: #8b5cf6;
}

.current-tasks-item--media {
  border-left-color: #2563eb;
}

.current-tasks-item--import,
.current-tasks-item--ozon {
  border-left-color: #3b82f6;
}

.current-tasks-item--wb {
  border-left-color: #ec4899;
}

.current-tasks-item--ym {
  border-left-color: #eab308;
}

.current-tasks-item--cards,
.current-tasks-item--presence {
  border-left-color: #14b8a6;
}

.current-tasks-item-body {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  align-items: flex-start;
}

.current-tasks-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.current-tasks-item--recognition .current-tasks-item-icon {
  background: #f3e8ff;
  color: #7c3aed;
}

.current-tasks-item--media .current-tasks-item-icon {
  background: #eff6ff;
  color: #2563eb;
}

.current-tasks-item--ozon .current-tasks-item-icon,
.current-tasks-item--import .current-tasks-item-icon {
  background: #eff6ff;
  color: #1d4ed8;
}

.current-tasks-item--wb .current-tasks-item-icon {
  background: #fdf2f8;
  color: #be185d;
}

.current-tasks-item--ym .current-tasks-item-icon {
  background: #fefce8;
  color: #a16207;
}

.current-tasks-item-content {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.current-tasks-item-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.current-tasks-item-title {
  font-size: 13px;
  line-height: 1.3;
  color: #0f172a;
}

.current-tasks-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: #eff6ff;
  color: #1d4ed8;
}

.current-tasks-status-badge--recognition {
  background: #f3e8ff;
  color: #7c3aed;
}

.current-tasks-status-badge--media {
  background: #dbeafe;
  color: #1d4ed8;
}

.current-tasks-status-badge--wb {
  background: #fce7f3;
  color: #be185d;
}

.current-tasks-status-badge--ym {
  background: #fef9c3;
  color: #854d0e;
}

.current-tasks-status-badge--cards,
.current-tasks-status-badge--presence {
  background: #ccfbf1;
  color: #0f766e;
}

.current-tasks-item-progress {
  font-size: 12px;
  color: #475569;
  line-height: 1.3;
  min-height: 1.3em;
}

.current-tasks-item-progress.is-empty {
  visibility: hidden;
}

.current-tasks-progress-row {
  display: grid;
  gap: 2px;
  min-height: 18px;
}

.current-tasks-progress-row.is-empty {
  visibility: hidden;
}

.current-tasks-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.current-tasks-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.current-tasks-progress-value {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.current-tasks-progress-track {
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.current-tasks-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.25s ease;
}

.current-tasks-progress-fill.is-done {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.current-tasks-group {
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
  border-left: 3px solid #cbd5e1;
}

.current-tasks-group--ozon {
  border-left-color: #3b82f6;
}

.current-tasks-group--wb {
  border-left-color: #ec4899;
}

.current-tasks-group-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.current-tasks-group-header:hover {
  background: #f8fafc;
}

.current-tasks-group-header-main {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}

.current-tasks-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.current-tasks-group--ozon .current-tasks-group-icon {
  background: #eff6ff;
  color: #1d4ed8;
}

.current-tasks-group--wb .current-tasks-group-icon {
  background: #fdf2f8;
  color: #be185d;
}

.current-tasks-group-title-wrap {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.current-tasks-group-title-wrap strong {
  font-size: 13px;
  line-height: 1.25;
}

.current-tasks-group-subtitle {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  min-height: 1.3em;
}

.current-tasks-group-subtitle.is-empty {
  visibility: hidden;
}

.current-tasks-group-header-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.current-tasks-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}

.current-tasks-group--wb .current-tasks-group-count {
  background: #fdf2f8;
  color: #be185d;
}

.current-tasks-group-chevron {
  color: #94a3b8;
  font-size: 14px;
}

.current-tasks-group-items {
  display: grid;
  gap: 0;
  border-top: 1px solid #e2e8f0;
  background: #fafbfd;
}

.current-tasks-group-items[hidden] {
  display: none;
}

.current-tasks-group-item {
  display: grid;
  gap: 2px;
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
}

.current-tasks-group-item:last-child {
  border-bottom: 0;
}

.current-tasks-group-item-title {
  font-weight: 600;
  color: #0f172a;
}

.current-tasks-group-item-meta {
  color: #64748b;
}

.current-tasks-group-more {
  padding: 6px 10px;
  font-size: 12px;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.current-tasks-by-user {
  display: grid;
  gap: 12px;
}

.current-tasks-by-user.hidden {
  display: none;
}

#current-tasks-own-sections.hidden {
  display: none;
}

.current-tasks-user-block {
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
}

.current-tasks-user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f1f5f9;
}

.current-tasks-user-title {
  font-size: 14px;
  color: #0f172a;
}

.current-tasks-user-count {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.current-tasks-user-body {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
}

.current-tasks-user-section {
  display: grid;
  gap: 8px;
}

.current-tasks-user-section-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}

.current-tasks-history {
  display: grid;
  gap: 10px;
}

.current-tasks-history-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.current-tasks-history-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-elevated);
}

.current-tasks-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.current-tasks-history-title {
  font-size: 15px;
}

.current-tasks-history-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.current-tasks-history-status--succeeded {
  color: #166534;
  background: #dcfce7;
}

.current-tasks-history-status--partial {
  color: #92400e;
  background: #fef3c7;
}

.current-tasks-history-status--failed {
  color: #991b1b;
  background: #fee2e2;
}

.current-tasks-history-status--unknown {
  color: #374151;
  background: #e5e7eb;
}

.current-tasks-history-meta,
.current-tasks-history-counts {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.current-tasks-history-details {
  margin-top: 8px;
  font-size: 13px;
}

.current-tasks-history-error {
  margin: 8px 0 0;
  white-space: pre-wrap;
  color: var(--text-primary);
}

@media (max-width: 720px) {
  .current-tasks-page {
    max-width: none;
  }
}

.shops-cards-cell-found {
  background: #ecfdf5;
}

.shops-cards-cell-not_found {
  background: #f8fafc;
  color: #475569;
}

.shops-cards-cell-api_error,
.shops-cards-cell-auth_error,
.shops-cards-cell-rate_limited {
  background: #fef2f2;
  color: #991b1b;
}

.ozon-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.ozon-form-row.is-required-highlight {
  border-color: #f87171;
  background: #fffafa;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.12);
}

.ozon-form-row.is-required-highlight label {
  color: #991b1b;
}

.ozon-form-row.is-required-highlight input,
.ozon-form-row.is-required-highlight select {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.ozon-form-row label {
  margin: 0;
}

.ozon-field-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ozon-field-control textarea {
  min-height: 74px;
}

.ozon-store-meta {
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 8px 10px;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.4;
}

.ozon-free-slots-count {
  font-size: 12px;
  color: #334155;
  line-height: 1.35;
}

.ozon-free-slots-details {
  font-size: 12px;
  color: #334155;
}

.ozon-free-slots-details-summary {
  cursor: pointer;
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
  list-style: none;
  width: fit-content;
}

.ozon-free-slots-details-summary::-webkit-details-marker {
  display: none;
}

.ozon-free-slots-list {
  margin-top: 6px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ozon-free-slots-list-item {
  line-height: 1.35;
  word-break: break-word;
}

.ozon-free-slots-list-article {
  font-weight: 600;
}

.hint-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.default-hint {
  color: #64748b;
  font-size: 12px;
}

.field-hint {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.publish-action-hint {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.publish-action-hint--media {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #92400e;
}

.publish-action-hint.hidden {
  display: none;
}

.marketplace-onboarding-help {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}

.marketplace-onboarding-help p {
  margin: 0;
}

.marketplace-onboarding-help ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.marketplace-onboarding-help a {
  color: #1d4ed8;
  font-weight: 700;
}

input.is-field-error,
select.is-field-error,
textarea.is-field-error {
  border-color: #dc2626;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field-error-text {
  color: #b91c1c;
  font-weight: 600;
}

.ghost-btn {
  background: #fff;
  color: #1e40af;
  border-color: #93c5fd;
  box-shadow: none;
  padding: 5px 10px;
}

.stocks-page {
  display: grid;
  gap: 16px;
  width: 100%;
}

.stocks-header {
  display: grid;
  gap: 14px;
}

.stocks-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.stocks-store-picker {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.85);
}

.stocks-store-picker-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.stocks-store-picker-summary::-webkit-details-marker {
  display: none;
}

.stocks-store-picker-summary::before {
  content: ">";
  flex: 0 0 auto;
  color: #64748b;
  transition: transform 0.16s ease;
}

.stocks-store-picker[open] .stocks-store-picker-summary::before {
  transform: rotate(90deg);
}

.stocks-store-picker-summary-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.stocks-store-picker-summary-meta {
  margin-left: auto;
  font-size: 13px;
  color: #64748b;
  text-align: right;
}

.stocks-store-picker-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.stocks-store-picker-sections,
.stocks-store-picker-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.stocks-store-picker-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.stocks-store-picker-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.stocks-store-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stocks-store-picker-list-ozon {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px 14px;
  align-items: start;
}

.stocks-store-picker-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #334155;
}

.stocks-store-picker-item input {
  flex: 0 0 auto;
  margin: 2px 0 0;
}

.stocks-store-picker-item-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stocks-store-picker-list-ozon .stocks-store-picker-item-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
}

.stocks-store-picker-item-name {
  line-height: 1.35;
  word-break: break-word;
}

.stocks-store-picker-item-count {
  font-size: 12px;
  color: #64748b;
}

.stocks-store-picker-store {
  display: grid;
  gap: 4px;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.stocks-store-picker-prefixes {
  display: grid;
  gap: 2px;
  margin-left: 22px;
  min-width: 0;
}

.stocks-store-picker-prefixes-label {
  font-size: 12px;
  color: #475569;
}

.stocks-store-picker-prefixes-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 6px;
  background: #fff;
}

.stocks-store-picker-prefixes-hint {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.stocks-store-picker-prefixes-hint-global {
  margin: 0 0 8px;
}

.stocks-store-picker-mp-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stocks-store-picker-warehouses {
  display: grid;
  gap: 4px;
  margin-left: 22px;
  min-width: 0;
}

.stocks-store-picker-warehouse {
  color: #475569;
  font-size: 13px;
  min-width: 0;
}

.stocks-store-picker-warehouse .stocks-store-picker-item-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.35em;
  row-gap: 0;
  min-width: 0;
  word-break: normal;
  overflow-wrap: anywhere;
}

.stocks-store-picker-warehouse-id {
  white-space: nowrap;
}

.stocks-store-picker-warehouse-status {
  margin-left: 22px;
  font-size: 12px;
  color: #64748b;
}

.stocks-store-picker-hint {
  margin: 0;
  font-size: 13px;
  color: #b45309;
}

.stocks-store-picker-hint.hidden {
  display: none;
}

.stocks-store-picker-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.stocks-store-picker-actions .stocks-store-picker-hint {
  color: #64748b;
}

@media (max-width: 760px) {
  .stocks-store-picker-list-ozon {
    grid-template-columns: 1fr;
  }

  .stocks-store-picker-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .stocks-store-picker-summary-meta {
    margin-left: 0;
    text-align: left;
  }
}

.stocks-header-copy h2 {
  margin: 0 0 6px;
}

.stocks-lead {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
  max-width: none;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .stocks-lead {
    white-space: normal;
  }
}

.stocks-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stocks-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #334155;
}

.stocks-filter-label input {
  flex: 0 0 auto;
  margin: 0;
}

.stocks-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.stocks-auto-sync-panel {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  padding: 12px 14px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.stocks-auto-sync-head h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.stocks-auto-sync-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.stocks-auto-sync-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.95);
}

.stocks-auto-sync-card--running {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(239, 246, 255, 0.95);
}

.stocks-auto-sync-card--failed {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(254, 242, 242, 0.95);
}

.stocks-auto-sync-card--next {
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(255, 255, 255, 0.98);
}

.stocks-auto-sync-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.stocks-auto-sync-card-value {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.stocks-auto-sync-card-note {
  font-size: 12px;
  line-height: 1.4;
  color: #15803d;
  font-weight: 500;
}

.stocks-auto-sync-freshness {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(241, 245, 249, 0.85);
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
}

.stocks-auto-sync-freshness--running {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(239, 246, 255, 0.85);
  color: #1d4ed8;
}

.stocks-auto-sync-freshness-ago {
  color: #0f172a;
}

.stocks-auto-sync-freshness-hint {
  color: #64748b;
}

.stocks-auto-sync-meta {
  margin-top: 8px;
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: #64748b;
}

.stocks-auto-sync-meta-line {
  display: block;
}

.stocks-auto-sync-log {
  margin-top: 12px;
}

.stocks-auto-sync-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.stocks-auto-sync-log-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.stocks-auto-sync-log-toggle:empty {
  display: none;
}

.stocks-auto-sync-log-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.stocks-log-toggle-btn {
  margin: 0;
}

.stocks-log-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.75);
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #334155;
}

.stocks-log-item--failed {
  background: rgba(254, 242, 242, 0.85);
}

.stocks-log-item--sync-problem {
  background: rgba(255, 251, 235, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.stocks-log-seg {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.88);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stocks-log-seg--meta {
  color: #64748b;
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  padding-right: 4px;
}

.stocks-log-seg--article {
  font-weight: 700;
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.35);
}

.stocks-log-seg--store {
  color: #0f766e;
  background: rgba(240, 253, 250, 0.92);
  border-color: rgba(20, 184, 166, 0.28);
}

.stocks-log-seg--sync {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #334155;
}

.stocks-log-seg--sale,
.stocks-log-seg--sale-ozon {
  color: #1d4ed8;
  background: rgba(239, 246, 255, 0.9);
  border-color: rgba(59, 130, 246, 0.25);
}

.stocks-log-seg--sale-wb {
  color: #7c3aed;
  background: rgba(139, 62, 252, 0.12);
  border-color: rgba(139, 62, 252, 0.28);
}

.stocks-log-seg--sale-ym {
  color: #854d0e;
  background: rgba(253, 224, 71, 0.28);
  border-color: rgba(161, 98, 7, 0.4);
}

.stocks-log-seg--deal {
  color: #334155;
  background: rgba(239, 246, 255, 0.65);
  border-color: rgba(59, 130, 246, 0.2);
}

.stocks-log-seg--manual {
  color: #475569;
  background: rgba(241, 245, 249, 0.95);
}

.stocks-log-seg--status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stocks-log-seg--ok {
  color: #15803d;
  background: #dcfce7;
  border-color: #86efac;
}

.stocks-log-seg--skipped {
  color: #475569;
  background: rgba(241, 245, 249, 0.95);
}

.stocks-log-seg--failed {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.stocks-log-seg--unknown {
  color: #64748b;
}

.stocks-log-seg--error {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.stocks-log-seg--sync-problem {
  color: #b45309;
  font-weight: 700;
  background: rgba(254, 243, 199, 0.95);
  border-color: rgba(245, 158, 11, 0.45);
}

.stocks-progress {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.9);
}

.stocks-progress--busy {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(239, 246, 255, 0.92);
}

.stocks-progress-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(59, 130, 246, 0.25);
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: store-presence-spin 0.8s linear infinite;
  flex: 0 0 16px;
}

.stocks-progress-spinner.hidden {
  display: none;
}

.stocks-progress--busy .stocks-kpi-value {
  animation: stocks-kpi-pulse 1.4s ease-in-out infinite;
}

@keyframes stocks-kpi-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.stocks-progress.hidden {
  display: none;
}

.stocks-progress--failed {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(254, 242, 242, 0.75);
}

.stocks-progress-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.stocks-progress-pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stocks-progress-pipeline.hidden {
  display: none;
}

.stocks-progress-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: #fff;
  min-width: 0;
}

.stocks-progress-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.stocks-progress-step-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stocks-progress-step-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.stocks-progress-step-detail {
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
  overflow-wrap: anywhere;
}

.stocks-progress-step--pending {
  opacity: 0.72;
}

.stocks-progress-step--pending .stocks-progress-step-index {
  background: #f1f5f9;
  color: #64748b;
}

.stocks-progress-step--active {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
  animation: stocks-progress-step-pulse 1.5s ease-in-out infinite;
}

@keyframes stocks-progress-step-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.24);
  }
}

.stocks-progress-step-index--spinner {
  border: 2px solid rgba(59, 130, 246, 0.25);
  border-top-color: #2563eb;
  background: #eff6ff;
  animation: store-presence-spin 0.8s linear infinite;
}

.stocks-progress-step-index--done {
  background: #dcfce7;
  color: #15803d;
}

.stocks-progress-step--active .stocks-progress-step-index:not(.stocks-progress-step-index--spinner):not(.stocks-progress-step-index--done) {
  background: #dbeafe;
  color: #1d4ed8;
}

.stocks-progress-step--active .stocks-progress-step-detail {
  color: #1d4ed8;
  font-weight: 600;
}

.stocks-progress-step--done {
  border-color: #bbf7d0;
  background: rgba(240, 253, 244, 0.85);
}

.stocks-progress-step--done .stocks-progress-step-index {
  background: #dcfce7;
  color: #15803d;
}

.stocks-progress-step--failed {
  border-color: #fecaca;
  background: rgba(254, 242, 242, 0.9);
}

.stocks-progress-step--failed .stocks-progress-step-index {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 860px) {
  .stocks-progress-pipeline {
    grid-template-columns: 1fr;
  }
}

.stocks-job-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stocks-job-badge--queued,
.stocks-job-badge--comparing {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.stocks-job-badge--ready {
  background: #dcfce7;
  color: #15803d;
}

.stocks-job-badge--failed {
  background: #fee2e2;
  color: #991b1b;
}

.stocks-phase-text {
  margin: 0;
  flex: 1 1 220px;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}

.stocks-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stocks-kpi {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #fff;
}

.stocks-kpi-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  color: #0f172a;
}

.stocks-kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.stocks-kpi--desync .stocks-kpi-value {
  color: #b45309;
}

.stocks-kpi--duplicate .stocks-kpi-value {
  color: #b91c1c;
}

.stocks-kpi--error .stocks-kpi-value {
  color: #b91c1c;
}

.stocks-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.stocks-progress-track.hidden {
  display: none;
}

.stocks-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: width 0.35s ease;
}

.stocks-progress-bar--stripes {
  background: linear-gradient(
    90deg,
    #2563eb 0%,
    #60a5fa 25%,
    #2563eb 50%,
    #60a5fa 75%,
    #2563eb 100%
  );
  background-size: 200% 100%;
  animation: stocks-progress-bar-shimmer 1.1s linear infinite;
}

@keyframes stocks-progress-bar-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.stocks-toolbar #stocks-compare-btn.is-busy {
  position: relative;
  padding-left: 34px;
}

.stocks-toolbar #stocks-compare-btn.is-busy::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 999px;
  animation: store-presence-spin 0.8s linear infinite;
}

.stocks-progress-hint {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.stocks-progress-hint.hidden {
  display: none;
}

.stocks-error-text {
  margin: 0;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.45;
}

.stocks-error-text--warning {
  color: #92400e;
}

.stocks-error-text.hidden {
  display: none;
}

.stocks-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.stocks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stocks-table th,
.stocks-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stocks-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.stocks-table-message {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #64748b;
  font-size: 13px;
}

.stocks-table-message--loading {
  color: #1d4ed8;
  font-weight: 600;
}

.stocks-select-col {
  width: 42px;
  text-align: left;
  vertical-align: top;
}

.stocks-select-all-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  cursor: pointer;
}

.stocks-select-all-label input {
  margin: 0;
}

.stocks-row-desync,
.stocks-row-desync-ozon,
.stocks-row-desync-wb {
  transition: background-color 0.15s ease;
}

.stocks-row-desync {
  background: rgba(254, 243, 199, 0.45);
}

.stocks-row-desync-ozon {
  background: rgba(239, 246, 255, 0.95);
  box-shadow: inset 3px 0 0 #3b82f6;
}

.stocks-row-desync-wb {
  background: rgba(245, 243, 255, 0.95);
  box-shadow: inset 3px 0 0 #8b5cf6;
}

.stocks-row-duplicate {
  background: rgba(254, 226, 226, 0.35);
}

.stocks-row-error {
  background: rgba(254, 226, 226, 0.55);
}

.stocks-qty-col {
  min-width: 11.5rem;
  vertical-align: top;
}

.stocks-actions-col {
  min-width: 220px;
  vertical-align: top;
}

.stocks-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stocks-adjust-btn {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 10px;
}

.stocks-qty-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.stocks-qty-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  flex: 0 0 auto;
}

.stocks-qty-badges--adjustable {
  flex-wrap: nowrap;
}

.stocks-sale-hint {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow-wrap: anywhere;
  word-break: normal;
}

.stocks-sale-hint--found {
  color: #047857;
}

.stocks-sale-hint--none {
  color: #94a3b8;
}

.stocks-sale-hint--expected.stocks-sale-hint--found {
  font-weight: 600;
}

.stocks-sale-hint--expected.stocks-sale-hint--none {
  color: #b45309;
  font-weight: 600;
}

.stocks-sold-on-hint {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.stocks-sold-on-hint--ozon {
  background: rgba(239, 246, 255, 0.9);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.stocks-sold-on-hint--wb {
  background: rgba(139, 62, 252, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(139, 62, 252, 0.28);
}

.stocks-sold-on-hint--ym {
  background: rgba(253, 224, 71, 0.28);
  color: #854d0e;
  border: 1px solid rgba(161, 98, 7, 0.4);
}

.stocks-auto-zero-hint {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.stocks-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  border: 1px solid transparent;
}

.stocks-qty-adjust-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
}

.stocks-qty--zero {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.stocks-qty--one {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.stocks-qty--many {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.stocks-qty--unknown {
  color: #94a3b8;
  font-weight: 500;
}

.stocks-qty--highlight {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22);
}

.stocks-qty--highlight.stocks-qty--one {
  background: #d1fae5;
  color: #065f46;
}

.stocks-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.stocks-status-sale_desync {
  background: #fef3c7;
  color: #92400e;
}

.stocks-status-duplicate_ozon {
  background: #fee2e2;
  color: #991b1b;
}

.stocks-status-ok {
  background: #ecfdf5;
  color: #065f46;
}

.stocks-status-read_error {
  background: #fee2e2;
  color: #991b1b;
}

.stocks-ozon-match-list {
  margin: 0;
  padding-left: 16px;
}

@media (max-width: 980px) {
  .stocks-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stocks-kpi-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .ozon-form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-settings {
  color: #0f172a;
}

.admin-settings-collapsible {
  display: block;
}

.admin-settings-block + .admin-settings-block-separated,
.admin-settings-collapsible + .admin-settings-block-separated {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #dbe4f0;
}

.admin-settings-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
}

.admin-settings-summary::-webkit-details-marker {
  display: none;
}

.admin-settings-summary-main {
  min-width: 0;
  flex: 1;
}

.admin-settings-summary-main h2,
.admin-settings-summary-desc {
  margin-top: 0;
}

.admin-settings-summary-desc {
  margin-bottom: 8px;
  color: #475569;
}

.admin-settings-summary-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  padding-top: 4px;
}

.admin-settings-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.admin-settings-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.admin-settings-chip--ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.admin-settings-chip--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.admin-settings-chip--warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.admin-settings-chip--idle {
  border-color: #e2e8f0;
  background: #f1f5f9;
  color: #64748b;
}

.admin-settings-body {
  margin-top: 14px;
}

.admin-workers-jobs {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.admin-workers-jobs h3 {
  margin: 0;
  font-size: 13px;
  color: #0f172a;
}

.admin-workers-jobs-empty {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.admin-workers-jobs-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}

.admin-workers-jobs-table th,
.admin-workers-jobs-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.admin-workers-jobs-table th {
  color: #475569;
  font-weight: 600;
  background: #f8fafc;
}

.admin-workers-jobs-row--error td {
  background: #fff7f7;
}

.admin-workers-jobs-row--error td:nth-child(7) {
  color: #b91c1c;
  font-weight: 600;
}

@media (max-width: 760px) {
  .admin-settings-block[data-admin-settings-block="workers"] .admin-settings-summary-desc {
    display: none;
  }

  .admin-settings-block[data-admin-settings-block="workers"] .admin-settings-summary-main h2 {
    margin-bottom: 6px;
    font-size: 16px;
  }

  .admin-settings-block[data-admin-settings-block="workers"] .admin-settings-body {
    margin-top: 10px;
  }

  .admin-workers-status {
    gap: 8px;
    padding: 8px 10px;
  }

  .admin-workers-meta {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
  }

  .admin-workers-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .admin-workers-card {
    gap: 4px;
    padding: 7px 8px;
    border-radius: 8px;
  }

  .admin-workers-card-header {
    gap: 6px;
  }

  .admin-workers-card-header h3 {
    font-size: 12px;
  }

  .admin-workers-card .admin-backups-status-badge {
    padding: 1px 6px;
    font-size: 10px;
  }

  .admin-workers-card-grid {
    gap: 1px 6px;
  }

  .admin-workers-card-grid dt,
  .admin-workers-card-grid dd {
    font-size: 11px;
    line-height: 1.3;
  }

  .admin-workers-card-error {
    padding: 4px 6px;
    font-size: 11px;
  }

  .admin-workers-jobs {
    gap: 6px;
  }

  .admin-workers-jobs-table {
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  .admin-workers-jobs-table thead {
    display: none;
  }

  .admin-workers-jobs-table tbody,
  .admin-workers-jobs-table tr,
  .admin-workers-jobs-table td {
    display: block;
    width: auto;
  }

  .admin-workers-jobs-table tbody {
    display: grid;
    gap: 6px;
  }

  .admin-workers-jobs-table tr {
    padding: 7px 8px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #fff;
  }

  .admin-workers-jobs-table th,
  .admin-workers-jobs-table td {
    padding: 1px 0;
    border-bottom: none;
  }

  .admin-workers-jobs-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 6px;
    align-items: baseline;
  }

  .admin-workers-jobs-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
  }

  .admin-workers-jobs-table td:first-child {
    display: block;
    margin-bottom: 2px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
  }

  .admin-workers-jobs-table td:first-child::before {
    display: none;
  }

  .admin-workers-jobs-table td.admin-workers-jobs-cell--empty {
    display: none;
  }

  .admin-workers-jobs-row--error {
    background: #fff7f7;
  }

  .admin-workers-jobs-row--error td {
    background: transparent;
  }

  .admin-workers-jobs-row--error td:nth-child(7) {
    font-weight: 600;
  }

  .admin-workers-queues {
    gap: 4px;
    padding: 7px 8px;
  }

  .admin-workers-queues h3,
  .admin-workers-jobs h3 {
    font-size: 12px;
  }

  .admin-workers-queue-chip {
    padding: 2px 7px;
    font-size: 11px;
  }
}

.admin-active-users-status {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
  overflow-x: auto;
}

.admin-active-users-table {
  width: 100%;
  background: #fff;
}

.admin-active-users-error {
  margin: 0;
  color: #b91c1c;
  font-weight: 600;
}

.admin-media-prep-schedule-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.admin-media-prep-schedule-enabled {
  font-weight: 600;
}

.admin-media-prep-schedule-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 160px));
  gap: 12px 16px;
  align-items: end;
}

.admin-media-prep-schedule-tz {
  grid-column: 1 / -1;
  margin: 0;
}

.admin-workers-status {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.admin-workers-meta {
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.admin-workers-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-workers-card {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
  border-left: 3px solid #cbd5e1;
}

.admin-workers-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-workers-card-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.3;
}

.admin-workers-card .admin-backups-status-badge {
  padding: 2px 8px;
  font-size: 11px;
}

.admin-workers-card-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  margin: 0;
}

.admin-workers-card-grid dt {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.admin-workers-card-grid dd {
  margin: 0;
  color: #0f172a;
  font-size: 12px;
  word-break: break-word;
}

.admin-workers-card-error {
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  word-break: break-word;
}

.admin-workers-queues {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}

.admin-workers-queues h3 {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
}

.admin-workers-queue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-workers-queue-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-backups-status {
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.admin-backups-meta {
  margin: 0 0 16px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.admin-backups-meta-secondary {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 12px;
}

.admin-backups-section + .admin-backups-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.admin-backups-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-backups-section > h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 15px;
}

.admin-backups-section-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
}

.admin-backups-status-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-backups-status-badge--ok {
  color: #166534;
  background: #dcfce7;
}

.admin-backups-status-badge--warn {
  color: #9a3412;
  background: #ffedd5;
}

.admin-backups-status-badge--error {
  color: #991b1b;
  background: #fee2e2;
}

.admin-backups-status-badge--idle {
  color: #475569;
  background: #e2e8f0;
}

.admin-backups-sync-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  word-break: break-word;
}

.admin-backups-empty {
  margin: 0;
  color: #64748b;
}

.admin-backups-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-backups-table th,
.admin-backups-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.admin-backups-table th {
  color: #475569;
  font-weight: 600;
  background: #fff;
}

.admin-backups-table td {
  color: #0f172a;
  word-break: break-word;
}

.admin-backups-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-backups-loading {
  margin: 0;
  color: #64748b;
}

.admin-backups-error {
  margin: 0;
  color: #b91c1c;
}

.admin-backups-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.admin-backups-grid dt {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.admin-backups-grid dd {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  word-break: break-word;
}

.admin-settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.admin-settings-header h2,
.admin-settings-header p {
  margin-top: 0;
}

.admin-settings-eyebrow {
  margin-bottom: 5px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-settings-notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e40af;
}

.admin-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
}

.admin-create-form label,
.admin-user-core-controls label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.admin-users-list {
  display: grid;
  gap: 10px;
}

.admin-user-group {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px 10px;
}

.admin-user-group-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  cursor: pointer;
  list-style: none;
}

.admin-user-group-summary::-webkit-details-marker {
  display: none;
}

.admin-user-group-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.admin-user-card {
  display: block;
  padding: 10px 12px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
}

.admin-user-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-user-copy-btn {
  flex-shrink: 0;
}

.admin-user-card-meta {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.admin-user-password-btn {
  white-space: nowrap;
}

.admin-user-card-manager {
  border-left: 5px solid #2563eb;
  background: #eff6ff;
}

.admin-user-card-managed {
  border-left: 5px solid #93c5fd;
  background: #f8fbff;
}

.admin-user-card-inactive {
  border-color: #ef4444;
  background: #fef2f2;
}

.admin-user-card-inactive .admin-user-card-identity strong,
.admin-user-card-inactive .admin-user-hierarchy-label {
  color: #b91c1c;
}

.admin-user-card-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  cursor: pointer;
  list-style: none;
}

.admin-user-card-identity::-webkit-details-marker {
  display: none;
}

.admin-user-card-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.admin-user-card-identity strong {
  font-size: 15px;
}

.admin-user-id {
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.admin-user-hierarchy-label {
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.admin-user-core-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  align-items: end;
  gap: 8px 12px;
}

.admin-user-active {
  display: flex !important;
  align-items: center;
  min-height: 32px;
}

.admin-user-permissions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.admin-user-permissions label {
  padding: 4px 8px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
}

.admin-user-permissions fieldset {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.admin-user-permissions legend {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.admin-access-cell-changed {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.24);
}

.admin-user-active.admin-access-cell-changed {
  padding: 6px 10px;
  border-radius: 10px;
}

.admin-user-actions,
.admin-user-password {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-actions {
  justify-content: space-between;
}

.admin-user-password input {
  min-width: 220px;
}

@media (max-width: 900px) {
  .admin-create-form,
  .admin-user-permissions {
    grid-template-columns: 1fr 1fr;
  }

  .admin-user-permissions fieldset {
    grid-template-columns: 1fr 1fr;
  }

  .admin-user-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .admin-settings-header,
  .admin-user-card-identity,
  .admin-user-password {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-backups-grid {
    grid-template-columns: 1fr;
  }

  .admin-backups-table {
    display: block;
    overflow-x: auto;
  }

  .admin-create-form,
  .admin-user-core-controls,
  .admin-user-permissions {
    grid-template-columns: 1fr;
  }

  .admin-user-permissions fieldset {
    grid-template-columns: 1fr;
  }

  .manager-sessions-header,
  .manager-session-card,
  .manager-session-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-card-managed {
    margin-left: 18px;
  }

  .admin-user-card-managed::before {
    left: -18px;
  }
}

.shipping-lists-page .shipping-lists-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.shipping-lists-lead {
  margin: 8px 0 0;
  color: var(--muted, #555);
  max-width: 720px;
}

.shipping-lists-progress,
.shipping-lists-result {
  margin-top: 16px;
}

.shipping-lists-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.shipping-lists-stat {
  padding: 12px 14px;
  border: 1px solid var(--border, #ddd);
  border-radius: 10px;
  background: #fafafa;
}

.shipping-lists-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.shipping-lists-stat-label {
  display: block;
  margin-top: 4px;
  color: var(--muted, #555);
  font-size: 0.85rem;
}

.shipping-lists-result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.shipping-lists-download-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.shipping-lists-download-link:hover {
  border-color: #b8b8b8;
  background: #f7f7f7;
}

.shipping-lists-download-icon {
  display: inline-flex;
  color: #c62828;
}

.shipping-lists-table-wrap {
  margin-top: 4px;
}

.shipping-lists-table {
  width: 100%;
  border-collapse: collapse;
}

.shipping-lists-table th,
.shipping-lists-table td {
  border: 1px solid var(--border, #ddd);
  padding: 6px 8px;
  vertical-align: middle;
  text-align: left;
}

.shipping-lists-table th {
  background: #f3f3f3;
  font-size: 0.85rem;
}

.shipping-lists-cell-posting,
.shipping-lists-cell-article {
  white-space: nowrap;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}

.shipping-lists-cell-preview {
  width: 52px;
  text-align: center;
}

.shipping-lists-cell-preview img {
  display: block;
  width: 44px;
  height: 62px;
  object-fit: cover;
  margin: 0 auto;
  border-radius: 4px;
}

.shipping-lists-cell-title {
  min-width: 180px;
}

.shipping-lists-label-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.shipping-lists-label-badge--ready {
  background: #e8f5e9;
  color: #2e7d32;
}

.shipping-lists-label-badge--pending {
  background: #fff3e0;
  color: #ef6c00;
}

.shipping-lists-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  font-size: 12px;
  font-weight: 600;
}

.shipping-lists-phase-text,
.shipping-lists-error:not(.hidden) {
  margin: 8px 0 0;
}

.shipping-lists-error:not(.hidden) {
  margin-top: 12px;
  color: #b00020;
}

.shipping-lists-page .stocks-select-all-label {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, #ddd);
}

.search-page .search-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.search-page .search-lead {
  margin: 4px 0 0;
  color: var(--muted, #5b6472);
}

.search-block h3 {
  margin: 0 0 12px;
}

.article-search-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  justify-items: start;
}

.article-search-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.article-search-row input {
  width: min(320px, 70vw);
  flex: 0 1 auto;
  min-width: 0;
}

.article-search-row button {
  flex: 0 0 auto;
}

.search-results-table {
  width: 100%;
  border-collapse: collapse;
}

.search-results-table th,
.search-results-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #ddd);
  text-align: left;
  vertical-align: top;
}

.search-results-table tr[data-status="found"] td:nth-child(3) {
  color: #0b6b3a;
  font-weight: 600;
}

.search-results-table tr[data-status="not_found"] td:nth-child(3) {
  color: #5b6472;
}

.search-results-table tr[data-status="api_error"] td:nth-child(3),
.search-results-table tr[data-status="auth_error"] td:nth-child(3),
.search-results-table tr[data-status="rate_limited"] td:nth-child(3),
.search-results-table tr[data-status="data_error"] td:nth-child(3) {
  color: #b00020;
  font-weight: 600;
}

@media (max-width: 720px) {
  .search-results-wrap {
    overflow-x: auto;
  }
}
