:root {
  --bg: #f3f0e8;
  --panel: rgba(255, 253, 249, 0.9);
  --panel-border: rgba(32, 53, 67, 0.15);
  --ink: #1a2932;
  --muted: #5d6b75;
  --accent: #00758f;
  --accent-strong: #004d63;
  --ok: #22836f;
  --bad: #bf3e2c;
  --warn: #ad6f1a;
  --radius: 16px;
  --shadow: 0 16px 50px rgba(20, 38, 48, 0.15);
  --listing-thumb-max: 46px;
  --global-filter-offset: 0px;
  --scrollbar-size: 6px;
  --scrollbar-track: rgba(26, 41, 50, 0.05);
  --scrollbar-thumb: rgba(26, 41, 50, 0.22);
  --scrollbar-thumb-hover: rgba(26, 41, 50, 0.34);
  --overlay-note-gap: 12px;
  --overlay-note-font-size: 12px;
  --global-head-control-height: 40px;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 1px solid transparent;
  background-clip: padding-box;
  background-color: var(--scrollbar-thumb);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 0%, #fff2d9 0%, transparent 35%),
    radial-gradient(circle at 80% 20%, #d7f0ef 0%, transparent 38%),
    linear-gradient(160deg, #f8f5ef, #ecebe2 58%, #e5ebea);
  line-height: 1.35;
  padding: 18px;
  position: relative;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(4px);
  opacity: 0.24;
}

.ambient-a {
  width: 320px;
  height: 320px;
  background: #1f8ea5;
  top: -80px;
  right: -70px;
}

.ambient-b {
  width: 260px;
  height: 260px;
  background: #e3644a;
  bottom: -100px;
  left: -80px;
}

.app-shell {
  width: min(98vw, 1950px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
}

.btn-label {
  display: inline-block;
}

.view-screen[hidden] {
  display: none !important;
}

.agreement-inline {
  margin-top: 12px;
  padding: 14px;
}

.presets-panel {
  margin-top: 12px;
  padding: 12px;
}

.global-filters-frame {
  margin-top: 6px;
  padding: 8px 10px;
  position: sticky;
  top: 8px;
  z-index: 45;
}

.global-filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px 10px;
}

.global-filters-head-main {
  display: grid;
  gap: 4px;
}

.global-filters-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.global-filters-head-actions .btn-mini {
  margin-top: 0;
  min-height: var(--global-head-control-height);
  height: var(--global-head-control-height);
  padding: 0 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
}

.global-head-article-filter {
  min-width: 220px;
  max-width: 300px;
  display: grid;
  gap: 3px;
  position: relative;
}

.global-head-article-filter > span {
  font: 600 9px/1.1 "IBM Plex Sans", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5a6973;
}

.global-head-article-filter .filter-input {
  min-height: var(--global-head-control-height);
  height: var(--global-head-control-height);
  padding: 6px 10px 6px 32px;
}

.global-head-article-filter::before,
.global-category-search::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.78;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23516775' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}

.global-filters-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 7px;
}

.global-filters-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--global-head-control-height);
  height: var(--global-head-control-height);
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(24, 57, 72, 0.14);
  background: rgba(236, 244, 247, 0.9);
  color: #4e6471;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
}

.global-filters-summary-value {
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(31, 60, 75, 0.12);
  color: #264859;
  font: 700 11px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.global-count-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  color: #58707d;
}

.global-count-mode-caption {
  font: 600 10px/1 "IBM Plex Sans", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.global-count-mode-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 11px/1 "IBM Plex Sans", sans-serif;
  color: #6f7f89;
  transition: color 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}

.global-count-mode-label.is-active {
  color: #204656;
}

#filterCountModeErrorsLabel.is-active {
  color: #9a2f22;
  background: rgba(191, 62, 44, 0.12);
  border-color: rgba(191, 62, 44, 0.26);
}

#filterCountModeRowsLabel.is-active {
  color: #0b5f74;
  background: rgba(0, 117, 143, 0.14);
  border-color: rgba(0, 117, 143, 0.28);
}

.global-count-mode-switch {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 18px;
  cursor: pointer;
}

.global-count-mode-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.global-count-mode-slider {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 1px solid rgba(191, 62, 44, 0.42);
  background: rgba(191, 62, 44, 0.2);
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.global-count-mode-slider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(23, 55, 68, 0.28);
  transform: translateY(-50%);
  transition: transform 0.16s ease;
}

.global-count-mode-switch input:checked + .global-count-mode-slider {
  background: rgba(0, 117, 143, 0.38);
  border-color: rgba(0, 117, 143, 0.52);
}

.global-count-mode-switch input:checked + .global-count-mode-slider::after {
  transform: translate(16px, -50%);
}

.global-count-mode-switch input:focus-visible + .global-count-mode-slider {
  outline: 2px solid rgba(0, 117, 143, 0.28);
  outline-offset: 2px;
}

.global-filters-body {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 6px;
}

.global-filter-group {
  border: 1px solid rgba(20, 44, 58, 0.14);
  border-radius: 12px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.8);
}

.global-filter-group-mode {
  grid-column: 1 / -1;
}

.global-count-mode-box {
  border: 1px solid rgba(31, 60, 75, 0.16);
  border-radius: 10px;
  background: rgba(238, 246, 250, 0.82);
  padding: 6px 9px;
  width: fit-content;
}

.global-filter-subgroup {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(20, 44, 58, 0.14);
}

.global-filter-group-presets,
.global-filter-group-columns {
  grid-column: 1 / -1;
}

.global-filter-group-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4f6674;
}

.global-filter-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.global-filter-group-head .btn-mini {
  margin-top: 0;
  padding: 5px 8px;
}

.global-group-summary {
  margin: 4px 0 0;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-category-search {
  margin-top: 6px;
  max-width: 360px;
  position: relative;
}

.global-category-search .filter-input {
  min-height: 28px;
  padding: 5px 9px 5px 32px;
}

.global-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.global-filter-chip {
  border: 1px solid rgba(20, 44, 58, 0.2);
  background: rgba(255, 255, 255, 0.94);
  color: #1f3c4b;
  border-radius: 999px;
  padding: 5px 9px;
  min-height: 31px;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}

.global-filter-chip:hover {
  border-color: rgba(0, 117, 143, 0.58);
  background: rgba(0, 117, 143, 0.08);
}

.global-filter-chip.is-active {
  background: rgba(0, 117, 143, 0.14);
  border-color: rgba(0, 117, 143, 0.56);
  color: #0b5568;
}

.global-filter-chip:active {
  transform: translateY(0);
  background: rgba(0, 117, 143, 0.16);
}

.global-filter-chip-name {
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-filter-chip-count {
  min-width: 22px;
  text-align: center;
  border-radius: 999px;
  padding: 2px 6px;
  font: 700 11px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  background: rgba(31, 60, 75, 0.12);
  color: #2f4a58;
}

.global-filter-chip-count.is-problems {
  background: rgba(191, 62, 44, 0.12);
  color: #9a2f22;
}

.global-filter-chip-count.is-rows {
  background: rgba(0, 117, 143, 0.14);
  color: #0b5f74;
}

.global-columns-filters {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.global-filter-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.global-filter-field > span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #5c6f7b;
}

.global-filters-frame.is-collapsed .global-filters-body {
  display: none;
}

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

.preset-filters {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
  padding-bottom: 0;
}

.preset-chip {
  font-weight: 500;
}

.preset-chip:hover {
  border-color: rgba(0, 117, 143, 0.58);
}

.preset-chip.is-active {
  background: rgba(0, 117, 143, 0.14);
  border-color: rgba(0, 117, 143, 0.56);
  color: #0b5568;
}

.preset-chip-count {
  font-weight: 700;
}

#globalCategoryFilters {
  max-height: 164px;
  overflow: auto;
  padding-right: 2px;
}

.global-category-search-empty {
  width: 100%;
  border: 1px dashed rgba(20, 44, 58, 0.24);
  border-radius: 9px;
  background: rgba(233, 244, 248, 0.52);
  color: #4f6674;
  font: 500 11px/1.25 "IBM Plex Sans", sans-serif;
  padding: 6px 8px;
}

.agreement-dashboard {
  display: grid;
  gap: 12px;
}

.agreement-block {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 12px;
}

.agreement-block-head {
  display: grid;
  grid-template-columns: minmax(420px, 540px) minmax(0, 1fr);
  align-items: start;
  gap: 8px 14px;
}

.agreement-head-main {
  min-width: 420px;
  width: 100%;
}

.agreement-head-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.agreement-block-head h2 {
  margin: 6px 0 0;
  font: 700 30px/1.08 "Space Grotesk", "IBM Plex Sans", sans-serif;
}

.agreement-head-chart-btn {
  border: 1px solid rgba(17, 33, 42, 0.2);
  background: rgba(255, 255, 255, 0.94);
  color: #264454;
  border-radius: 10px;
  padding: 6px 10px;
  min-height: 34px;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.1s ease,
    box-shadow 0.16s ease;
}

.agreement-head-chart-btn .ui-icon {
  width: 15px;
  height: 15px;
}

.agreement-head-chart-btn:hover {
  border-color: rgba(0, 117, 143, 0.58);
  background: rgba(0, 117, 143, 0.1);
  color: #0b5568;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(9, 58, 72, 0.14);
}

.agreement-head-chart-btn:active {
  transform: translateY(0);
  background: rgba(0, 117, 143, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.agreement-head-main .subtle {
  margin-top: 6px;
}

.agreement-seller-settings {
  min-width: 0;
  width: 100%;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 6px;
}

.agreement-seller-settings .seller-chip {
  padding: 5px 9px;
  font-size: 11px;
}

.agreement-topline {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 10px;
}

.agreement-total {
  border-radius: 14px;
  border: 1px solid rgba(191, 62, 44, 0.28);
  padding: 10px 12px;
  color: #742116;
  background: linear-gradient(145deg, #fcece8, #f6dad4);
  display: grid;
  grid-template-columns: minmax(132px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px 14px;
}

.agreement-total-alert {
  border-color: rgba(191, 62, 44, 0.28);
  color: #742116;
  background: linear-gradient(145deg, #fcece8, #f6dad4);
}

.agreement-total-ok {
  border-color: rgba(34, 131, 111, 0.34);
  color: #145f4d;
  background: linear-gradient(145deg, #eaf8f4, #d8f1ea);
}

.agreement-total-main {
  display: grid;
  gap: 3px;
  align-content: start;
}

.agreement-total-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.agreement-total-value {
  margin: 4px 0 0;
  font: 700 62px/0.9 "Space Grotesk", "IBM Plex Sans", sans-serif;
}

.agreement-total-meta-list {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.agreement-total-meta-stack {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.agreement-total-meta-list-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.agreement-total-meta-list-extra {
  justify-content: flex-start;
}

.agreement-total-meta-pill {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.42);
  color: #6f2519;
  font-size: 11px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  white-space: nowrap;
  min-width: 0;
}

.agreement-total-meta-list-main .agreement-total-meta-pill {
  text-align: left;
}

.agreement-total-meta-pill-extra {
  text-align: left;
}

.agreement-breakdown {
  border: 1px solid rgba(18, 45, 58, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 12px;
}

.agreement-breakdown-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px 12px;
}

.agreement-breakdown-head-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agreement-breakdown-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.agreement-break-rail {
  margin-top: 7px;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: rgba(18, 45, 58, 0.08);
}

.agreement-breakdown-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.agreement-breakdown-cabinet-filters {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agreement-cabinet-quick-filter {
  border: 1px solid rgba(18, 45, 58, 0.2);
  background: rgba(255, 255, 255, 0.92);
  color: #355262;
  border-radius: 999px;
  min-height: 28px;
  padding: 4px 9px;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font: 600 11px/1 "IBM Plex Sans", sans-serif;
}

.agreement-cabinet-quick-filter:hover {
  border-color: rgba(0, 117, 143, 0.48);
  background: rgba(0, 117, 143, 0.1);
}

.agreement-cabinet-quick-filter.is-active {
  border-color: rgba(0, 117, 143, 0.55);
  background: rgba(0, 117, 143, 0.16);
  color: #0b5568;
}

.agreement-cabinet-quick-filter-name {
  min-width: 0;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agreement-cabinet-quick-filter-count {
  min-width: 22px;
  height: 19px;
  border-radius: 999px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 11px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  background: rgba(18, 45, 58, 0.1);
}

.agreement-cabinet-quick-filter.is-active .agreement-cabinet-quick-filter-count {
  background: rgba(0, 117, 143, 0.18);
}

.agreement-break-segment {
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  display: block;
  cursor: pointer;
  background: var(--segment-color, #cf4a32);
}

.agreement-break-segment + .agreement-break-segment {
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.96);
}

.agreement-break-segment:hover {
  filter: brightness(0.96);
}

.agreement-break-segment:focus-visible {
  outline: 2px solid rgba(0, 117, 143, 0.42);
  outline-offset: -2px;
}

.agreement-break-segment-empty {
  background: rgba(18, 45, 58, 0.16);
}

.agreement-break-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate3d(-9999px, -9999px, 0);
  z-index: 120000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.agreement-break-tooltip.is-visible {
  opacity: 1;
}

.agreement-break-tooltip-text {
  max-width: 340px;
  border-radius: 10px;
  border: 1px solid rgba(18, 45, 58, 0.22);
  background: rgba(17, 31, 40, 0.95);
  color: #f2f8fa;
  padding: 10px 12px;
  font: 500 12px/1.35 "IBM Plex Sans", sans-serif;
  box-shadow: 0 14px 28px rgba(8, 24, 32, 0.32);
}

.agreement-break-tooltip-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

.agreement-break-tooltip-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.agreement-break-tooltip-list {
  margin: 8px 0 0;
  padding: 0 0 0 16px;
  display: grid;
  gap: 3px;
}

.agreement-break-tooltip-list strong {
  color: #ffffff;
}

.agreement-break-tooltip-list li::marker {
  color: rgba(255, 255, 255, 0.78);
}

.ui-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  pointer-events: none;
}

.icon-hint-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate3d(-9999px, -9999px, 0);
  z-index: 120001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.icon-hint-tooltip.is-visible {
  opacity: 1;
}

.icon-hint-tooltip-text {
  max-width: 220px;
  border-radius: 9px;
  border: 1px solid rgba(16, 38, 50, 0.28);
  background: rgba(17, 31, 40, 0.95);
  color: #f1f7fa;
  padding: 6px 9px;
  font: 500 11px/1.3 "IBM Plex Sans", sans-serif;
  box-shadow: 0 12px 24px rgba(8, 24, 32, 0.3);
}

.agreement-breakdown-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 5px 12px;
  font-size: 12px;
  color: #425765;
}

.agreement-breakdown-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.agreement-breakdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 8px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.agreement-breakdown-name {
  color: #425765;
}

.agreement-breakdown-count {
  color: #2f4b5a;
  font: 700 12px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.agreement-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.agreement-card {
  border: 1px solid rgba(18, 45, 58, 0.14);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.92);
  min-height: 178px;
  display: grid;
  gap: 6px;
}

.agreement-card-limits {
  background: linear-gradient(145deg, rgba(244, 248, 250, 0.96), rgba(237, 243, 246, 0.94));
  border-color: rgba(70, 101, 116, 0.3);
}

.agreement-card-limits.agreement-card-has-problem {
  background: linear-gradient(145deg, rgba(241, 247, 250, 0.96), rgba(234, 242, 246, 0.94));
  border-color: rgba(79, 110, 124, 0.36);
}

.agreement-card-limits .agreement-card-count {
  color: #36596b;
}

.agreement-card-limits .agreement-card-hint {
  color: #506672;
}

.agreement-card-limits .agreement-card-bar span {
  background: linear-gradient(90deg, #95b2c1, #6f91a3);
}

.agreement-card-has-problem {
  background: linear-gradient(145deg, rgba(255, 244, 240, 0.96), rgba(252, 236, 230, 0.94));
  border-color: rgba(191, 62, 44, 0.34);
}

.agreement-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.agreement-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1d3a4a;
}

.agreement-card-percent {
  font-size: 12px;
  font-weight: 600;
  color: #4b6170;
}

.agreement-card-count {
  font: 700 38px/1 "Space Grotesk", "IBM Plex Sans", sans-serif;
  color: #b43c28;
}

.agreement-card-count-wrap {
  display: inline-flex;
  align-items: flex-end;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.agreement-card-count-subtle {
  font: 600 11px/1.2 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  color: #6c7f89;
  opacity: 0.78;
  margin-bottom: 4px;
}

.agreement-card-clean .agreement-card-count {
  color: #2e4c5d;
}

.agreement-card-limits .agreement-card-count-subtle {
  color: #59707d;
  opacity: 0.72;
}

.agreement-card-hint {
  font-size: 12px;
  color: #5a6e79;
}

.agreement-card-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(18, 45, 58, 0.12);
}

.agreement-card-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f58c72, #cf4a32);
}

.agreement-card-clean .agreement-card-bar span {
  background: linear-gradient(90deg, #a5c4cc, #7c99a4);
}

.agreement-problem-cabinets {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 3px;
}

.agreement-problem-cabinets-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(30px, auto) auto minmax(30px, auto);
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  font-size: 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5f7380;
}

.agreement-problem-cabinets-head-problems,
.agreement-problem-cabinets-head-articles {
  justify-self: end;
  text-align: right;
}

.agreement-problem-cabinets-head-slash {
  justify-self: center;
}

.agreement-problem-cabinets-head-total,
.agreement-problem-cabinet-value {
  justify-self: end;
  text-align: right;
}

.agreement-problem-cabinet-item {
  border-radius: 8px;
  background: rgba(20, 39, 50, 0.08);
  padding: 3px 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(30px, auto) auto minmax(30px, auto);
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #314f5e;
}

.agreement-problem-cabinet-item.is-warning {
  background: rgba(200, 127, 32, 0.14);
  color: #87510e;
}

.agreement-problem-cabinet-item.is-over {
  background: rgba(191, 62, 44, 0.14);
  color: #8c2d21;
}

.agreement-card-limits .agreement-problem-cabinet-item {
  background: rgba(62, 96, 132, 0.12);
  color: #2f4f67;
}

.agreement-card-limits .agreement-problem-cabinet-item.is-warning {
  background: rgba(94, 126, 187, 0.2);
  color: #294d79;
}

.agreement-card-limits .agreement-problem-cabinet-item.is-over {
  background: rgba(127, 92, 185, 0.2);
  color: #4a2f79;
}

.agreement-problem-cabinet-name {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
  white-space: normal;
  line-height: 1.2;
}

.agreement-problem-cabinet-name-main {
  min-width: 0;
}

.agreement-problem-cabinet-subtle {
  font: 500 9px/1.2 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  opacity: 0.66;
  white-space: nowrap;
}

.agreement-problem-cabinet-value,
.agreement-problem-cabinet-problems,
.agreement-problem-cabinet-articles {
  font: 600 10px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.agreement-problem-cabinet-problems,
.agreement-problem-cabinet-articles {
  min-width: 3ch;
}

.agreement-problem-cabinet-slash {
  justify-self: center;
  font: 600 10px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.agreement-problem-cabinet-meta {
  font: 600 10px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  color: #5f7380;
  justify-self: end;
  text-align: right;
}

.agreement-problem-cabinet-divider {
  width: 1px;
  height: 12px;
  border-radius: 999px;
  background: rgba(49, 79, 94, 0.26);
}

.agreement-problem-cabinet-item.is-warning .agreement-problem-cabinet-divider,
.agreement-problem-cabinet-item.is-over .agreement-problem-cabinet-divider {
  background: currentColor;
  opacity: 0.34;
}

.agreement-problem-cabinets-wrap {
  display: grid;
  gap: 4px;
}

.agreement-card-filter {
  border: 1px solid rgba(17, 33, 42, 0.2);
  background: rgba(255, 255, 255, 0.94);
  color: #264454;
  border-radius: 8px;
  padding: 6px 9px;
  min-height: 38px;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}

.agreement-card-filter.is-active {
  border-color: rgba(0, 117, 143, 0.58);
  background: rgba(0, 117, 143, 0.14);
  color: #0b5568;
}

.agreement-card-filter:not(.is-active):hover {
  border-color: rgba(0, 117, 143, 0.5);
  background: rgba(0, 117, 143, 0.08);
  color: #124a5d;
  transform: translateY(-1px);
}

.agreement-card-filter:active {
  transform: translateY(0);
}

.agreement-card-filter:focus-visible {
  outline: 2px solid rgba(0, 117, 143, 0.3);
  outline-offset: 1px;
}

.agreement-card-actions {
  margin-top: 4px;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.agreement-card-actions .agreement-card-filter {
  flex: 1 1 auto;
}

.agreement-icon-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(17, 33, 42, 0.2);
  background: rgba(255, 255, 255, 0.96);
  color: #325162;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease, transform 0.1s ease,
    box-shadow 0.16s ease;
}

.agreement-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agreement-icon-btn:hover {
  border-color: rgba(0, 117, 143, 0.58);
  background: rgba(0, 117, 143, 0.1);
  color: #0b5568;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(10, 58, 72, 0.14);
}

.agreement-icon-btn:active {
  transform: translateY(0);
  background: rgba(0, 117, 143, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.agreement-actions {
  display: flex;
  justify-content: flex-end;
}

.agreement-reset-btn {
  border: 1px solid rgba(17, 33, 42, 0.2);
  background: rgba(255, 255, 255, 0.94);
  color: #264454;
  border-radius: 8px;
  padding: 7px 10px;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease, transform 0.1s ease,
    box-shadow 0.16s ease;
}

.agreement-reset-btn:hover {
  border-color: rgba(0, 117, 143, 0.52);
  background: rgba(0, 117, 143, 0.09);
  color: #0b5568;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(10, 58, 72, 0.12);
}

.agreement-reset-btn:active {
  transform: translateY(0);
  background: rgba(0, 117, 143, 0.14);
}

.agreement-empty {
  border: 1px dashed rgba(25, 53, 68, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  padding: 16px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 8px 0;
  font: 700 34px/1.05 "Space Grotesk", "IBM Plex Sans", sans-serif;
}

.subtle {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 820px;
}

.hero-meta {
  align-self: flex-start;
  min-width: 320px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 117, 143, 0.08);
  border: 1px dashed rgba(0, 117, 143, 0.35);
}

.hero-meta p {
  margin: 0;
  font-size: 13px;
}

.hero-meta p + p {
  margin-top: 6px;
}

.problem-line {
  border-radius: 8px;
  padding: 4px 6px;
  background: rgba(34, 131, 111, 0.1);
}

.problem-alert {
  background: rgba(191, 62, 44, 0.14);
  color: #8b2d21;
  font-weight: 600;
}

.controls {
  margin-top: 12px;
  padding: 14px;
}

.controls-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.controls-subtle {
  margin-top: 6px;
  max-width: none;
}

.controls-body {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.controls.controls-collapsed .controls-body {
  display: none;
}

.seller-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seller-chip {
  border: 1px solid rgba(0, 117, 143, 0.28);
  background: rgba(0, 117, 143, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.seller-chip .mono {
  font-weight: 600;
}

.seller-chip a {
  color: var(--accent-strong);
  text-decoration: none;
}

.seller-chip a:hover {
  text-decoration: underline;
}

.seller-settings-manage-btn {
  appearance: none;
  min-width: 40px;
  justify-content: center;
  cursor: pointer;
  border-style: dashed;
  border-color: rgba(0, 117, 143, 0.5);
  background: rgba(0, 117, 143, 0.14);
  color: #0b5568;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.seller-settings-manage-btn:hover {
  border-color: rgba(0, 117, 143, 0.75);
  background: rgba(0, 117, 143, 0.22);
  transform: translateY(-1px);
}

.seller-settings-manage-btn:active {
  transform: translateY(0);
  background: rgba(0, 117, 143, 0.28);
}

.seller-settings-manage-btn:focus-visible {
  outline: 2px solid rgba(0, 117, 143, 0.35);
  outline-offset: 1px;
}

.seller-chip-plus {
  font: 700 17px/1 "Space Grotesk", "IBM Plex Sans", sans-serif;
  letter-spacing: 0.01em;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.compact-grid .btn {
  height: 40px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(27, 42, 55, 0.2);
  border-radius: 10px;
  padding: 9px 11px;
  font: 500 14px/1.2 "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font: 600 12px/1.2 "IBM Plex Sans", "Segoe UI", sans-serif;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23385162' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
}

select,
select option,
select optgroup {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

select option {
  background: #f4f8fa;
  color: #1f3a48;
  font-size: 12px;
  font-weight: 500;
}

select option:checked {
  background: rgba(0, 117, 143, 0.16);
  color: #0d4f63;
  font-weight: 600;
}

select option:disabled,
select optgroup:disabled {
  background: rgba(230, 236, 240, 0.95);
  color: rgba(79, 98, 109, 0.75);
}

select optgroup {
  background: #edf4f7;
  color: #4c6574;
  font-size: 12px;
  font-weight: 700;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(0, 117, 143, 0.28);
  border-color: rgba(0, 117, 143, 0.65);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-row-top {
  justify-content: flex-end;
}

.btn {
  border: 1px solid rgba(27, 42, 55, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 14px;
  font: 600 13px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.16s ease, background-color 0.16s ease,
    color 0.16s ease;
}

.btn-has-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-xs {
  width: 12px;
  height: 12px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(17, 38, 49, 0.16);
}

.btn:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 0 1px rgba(12, 31, 42, 0.06);
}

.btn:focus-visible {
  outline: 2px solid rgba(0, 117, 143, 0.35);
  outline-offset: 1px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.btn-primary {
  background: linear-gradient(160deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(160deg, #0784a0, #045f79);
  box-shadow: 0 10px 24px rgba(5, 82, 104, 0.28);
}

.btn-primary:active:not(:disabled) {
  background: linear-gradient(160deg, #056f87, #034d63);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 5px 12px rgba(5, 82, 104, 0.2);
}

.btn-danger {
  background: rgba(191, 62, 44, 0.12);
  border-color: rgba(191, 62, 44, 0.45);
  color: #8d2b1f;
}

.btn-danger:hover:not(:disabled) {
  border-color: rgba(191, 62, 44, 0.66);
  background: rgba(191, 62, 44, 0.18);
  color: #7a2419;
  box-shadow: 0 9px 20px rgba(124, 37, 26, 0.2);
}

.btn-danger:active:not(:disabled) {
  background: rgba(191, 62, 44, 0.24);
  color: #661d14;
}

.btn-problem {
  background: rgba(173, 111, 26, 0.14);
  border-color: rgba(173, 111, 26, 0.45);
  color: #7e4f06;
}

.btn-problem:hover:not(:disabled) {
  border-color: rgba(173, 111, 26, 0.66);
  background: rgba(173, 111, 26, 0.2);
  color: #684206;
  box-shadow: 0 9px 20px rgba(117, 79, 22, 0.2);
}

.btn-problem:active:not(:disabled) {
  background: rgba(173, 111, 26, 0.26);
  color: #563705;
}

.btn-mini {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-row-top .btn-mini {
  margin-top: 0;
}

.bulk-progress-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(380px, calc(100vw - 24px));
  z-index: 120;
  opacity: 0;
  transform: translateX(calc(100% + 28px));
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22, 0.84, 0.29, 1), opacity 0.2s ease;
}

.bulk-progress-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.bulk-progress-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid rgba(5, 69, 87, 0.28);
  background: linear-gradient(155deg, rgba(228, 245, 250, 0.95), rgba(210, 234, 241, 0.95));
  box-shadow: 0 14px 36px rgba(14, 44, 56, 0.22);
  padding: 10px 12px;
}

.bulk-progress-ring {
  --bulk-progress: 0%;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: conic-gradient(#0c809d var(--bulk-progress), rgba(12, 128, 157, 0.22) 0);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  transition: background 0.12s linear;
}

.bulk-progress-ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(23, 59, 72, 0.12);
}

.bulk-progress-percent {
  position: relative;
  z-index: 1;
  font: 700 10px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  color: #174455;
}

.bulk-progress-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.bulk-progress-title {
  margin: 0;
  font: 700 14px/1.15 "IBM Plex Sans", sans-serif;
  color: #0d4d62;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-progress-meta {
  margin: 0;
  font: 500 12px/1.15 "IBM Plex Sans", sans-serif;
  color: #3f5f6e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-progress-cancel {
  border: 1px solid rgba(11, 79, 100, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #0a5a72;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
  padding: 8px 10px;
  min-height: 34px;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease,
    box-shadow 0.16s ease;
}

.bulk-progress-cancel:hover:not(:disabled) {
  border-color: rgba(11, 79, 100, 0.44);
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(12, 53, 66, 0.18);
}

.bulk-progress-cancel:active:not(:disabled) {
  transform: translateY(0);
  background: rgba(238, 248, 251, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.bulk-progress-cancel:focus-visible {
  outline: 2px solid rgba(0, 117, 143, 0.32);
  outline-offset: 1px;
}

.bulk-progress-cancel:disabled {
  opacity: 0.72;
  cursor: default;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.autoplay-quota-panel {
  margin-top: 12px;
  padding: 12px;
}

.autoplay-quota-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.autoplay-limit-control {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.autoplay-limit-control > span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.autoplay-limit-control input {
  width: 120px;
  min-height: 36px;
}

.autoplay-quota-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.autoplay-quota-card {
  border: 1px solid rgba(18, 39, 51, 0.17);
  border-radius: 12px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.86);
  display: grid;
  gap: 6px;
}

.autoplay-quota-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.autoplay-quota-cabinet {
  font: 600 13px/1.2 "IBM Plex Sans", sans-serif;
  color: #234050;
}

.autoplay-quota-value {
  font: 700 14px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  color: #1f3b4a;
}

.autoplay-quota-rail {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(20, 39, 50, 0.12);
}

.autoplay-quota-rail > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #32a38f, #127d74);
}

.autoplay-quota-card.is-warning .autoplay-quota-rail > span {
  background: linear-gradient(90deg, #e2a04a, #c87f20);
}

.autoplay-quota-card.is-over .autoplay-quota-rail > span {
  background: linear-gradient(90deg, #dd6b58, #b64a39);
}

.autoplay-quota-card.is-over {
  border-color: rgba(191, 62, 44, 0.42);
  background: rgba(191, 62, 44, 0.08);
}

.autoplay-quota-meta {
  margin: 0;
  font-size: 11px;
  color: #5a6a74;
  line-height: 1.3;
}

.autoplay-quota-footer {
  display: grid;
  gap: 6px;
}

.autoplay-quota-limit-field {
  display: grid;
  gap: 3px;
}

.autoplay-quota-limit-field > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a6a74;
}

.autoplay-quota-limit-field input {
  min-height: 28px;
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 12px;
}

.autoplay-quota-empty {
  border: 1px dashed rgba(20, 39, 50, 0.2);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  color: var(--muted);
}

.table-panel {
  margin-top: 12px;
  padding: 12px;
}

.table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.rows-limit-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rows-limit-control > span {
  line-height: 1;
}

.rows-limit-control .rows-limit-select {
  min-width: 84px;
  height: 30px;
  padding: 4px 30px 4px 10px;
  border-radius: 8px;
  font: 600 11px/1 "IBM Plex Sans", sans-serif;
  background-color: rgba(255, 255, 255, 0.94);
  width: auto;
  text-transform: none;
  letter-spacing: normal;
  background-position: right 9px center;
  background-size: 13px 13px;
}

.table-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-info {
  min-width: 126px;
  text-align: center;
  color: #385262;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
}

.page-btn {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(18, 39, 51, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #233f4e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease, transform 0.1s ease,
    box-shadow 0.16s ease;
}

.page-btn .ui-icon {
  width: 16px;
  height: 16px;
}

.page-btn:hover:not(:disabled) {
  border-color: rgba(0, 117, 143, 0.56);
  background: rgba(0, 117, 143, 0.1);
  color: #0b5568;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(17, 36, 45, 0.14);
}

.page-btn:active:not(:disabled) {
  transform: translateY(0);
  background: rgba(0, 117, 143, 0.16);
}

.page-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.table-wrap {
  width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  border-radius: 10px;
  border: 1px solid rgba(20, 36, 48, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}

.col-actions {
  width: 4%;
}

.col-number {
  width: 3%;
}

.col-nmid {
  width: 6%;
}

.col-cabinet {
  width: 7%;
}

.col-name {
  width: 18%;
}

.col-product-info {
  width: 11%;
}

.col-checks {
  width: 13%;
}

.col-listing {
  width: 36%;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(160deg, #f2f7f8, #eaf1f3);
  border-bottom: 1px solid rgba(15, 30, 38, 0.16);
  border-right: 1px solid rgba(15, 30, 38, 0.08);
  font: 600 12px/1.2 "IBM Plex Sans", sans-serif;
  letter-spacing: 0.02em;
  text-align: left;
  padding: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filters-row th {
  top: 34px;
  z-index: 2;
  background: #edf3f5;
  padding: 6px;
  overflow: visible;
}

.filter-input,
.filter-select {
  font-size: 12px;
  padding: 5px 8px;
  min-height: 30px;
  border-radius: 8px;
}

.filter-select {
  padding-right: 30px;
  background-position: right 8px center;
  background-size: 12px 12px;
}

tbody td {
  border-bottom: 1px solid rgba(15, 30, 38, 0.11);
  border-right: 1px solid rgba(15, 30, 38, 0.06);
  padding: 8px;
  vertical-align: top;
  font-size: 13px;
  min-width: 0;
  position: relative;
  overflow: visible;
  word-break: break-word;
}

tbody tr {
  position: relative;
}

tbody tr:hover {
  background: rgba(0, 117, 143, 0.045);
  z-index: 5;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 30px 10px;
}

.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.wb-link {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.wb-link:hover {
  text-decoration: underline;
}

.wb-link-icon {
  margin-top: 4px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(0, 117, 143, 0.3);
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.wb-link-icon:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(0, 117, 143, 0.68);
  box-shadow: 0 6px 14px rgba(17, 36, 45, 0.18);
}

.article-code-wrap {
  margin-top: 4px;
  display: flex;
  min-width: 0;
}

.article-code-chip {
  max-width: 100%;
  background: rgba(236, 244, 247, 0.92);
  color: #244756;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-compact {
  padding: 2px 6px;
  font-size: 10px;
}

.pill-ok {
  background: rgba(34, 131, 111, 0.14);
  color: #12614e;
}

.pill-no {
  background: rgba(191, 62, 44, 0.13);
  color: #8d2b1f;
}

.pill-na {
  background: rgba(106, 117, 124, 0.16);
  color: #4b575d;
}

.pill-info {
  border: 1px solid rgba(31, 60, 75, 0.2);
  background: rgba(236, 244, 248, 0.92);
  color: #2b4a59;
}

.rec-pill {
  border: 1px dashed rgba(18, 97, 78, 0.4);
  cursor: pointer;
  gap: 6px;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.rec-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(18, 97, 78, 0.18);
}

.rec-pill:focus-visible {
  outline: 2px solid rgba(0, 117, 143, 0.35);
  outline-offset: 2px;
}

.rec-pill-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.rec-pill-hint {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}

.rec-pill-compact {
  gap: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

.rec-pill-mini {
  font-size: 9px;
  letter-spacing: 0.03em;
  opacity: 0.82;
}

.stock-cell {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.stock-note {
  color: var(--muted);
  font-size: 11px;
}

.price-cell {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.price-old {
  color: var(--muted);
  font-size: 11px;
  text-decoration: line-through;
}

.actions-col {
  width: 48px;
}

.checks-col {
  white-space: nowrap;
}

.actions-cell {
  min-width: 0;
}

.listing-col {
  min-width: 0;
}

.cell-text {
  min-width: 0;
}

.product-meta-cell {
  min-width: 0;
}

.product-info-cell {
  min-width: 0;
  padding: 6px;
}

.product-meta-content {
  display: grid;
  gap: 5px;
  align-content: start;
  min-width: 0;
}

.product-name-clip {
  -webkit-line-clamp: 2;
}

.product-meta-line {
  display: flex;
  min-width: 0;
}

.product-meta-chip {
  display: inline-flex;
  max-width: 100%;
  appearance: none;
  border: 1px solid rgba(31, 60, 75, 0.22);
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  cursor: default;
  margin: 0;
  border-radius: 999px;
  padding: 2px 8px;
  font: 600 11px/1.2 "IBM Plex Sans", sans-serif;
  color: #2d4b5a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-meta-chip-brand {
  color: #234555;
  background: rgba(236, 244, 247, 0.92);
}

.product-meta-chip-colors {
  cursor: pointer;
  border-style: dashed;
  color: #0b5568;
  background: rgba(0, 117, 143, 0.1);
}

.product-meta-chip-colors:hover {
  border-color: rgba(0, 117, 143, 0.56);
  background: rgba(0, 117, 143, 0.16);
}

.product-meta-chip-colors:focus-visible {
  outline: 2px solid rgba(0, 117, 143, 0.35);
  outline-offset: 1px;
}

.product-meta-chip-muted {
  opacity: 0.74;
}

.product-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.product-info-item {
  min-width: 0;
  border: 1px solid rgba(20, 39, 50, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 4px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.product-info-label {
  min-width: 0;
  font: 600 10px/1.1 "IBM Plex Sans", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #50606a;
  white-space: nowrap;
}

.product-info-value {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.price-info-wrap {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.product-price-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  height: 12px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

.product-price-trend-up {
  color: #d1453b;
}

.product-price-trend-down {
  color: #1f9860;
}

.product-info-old {
  color: var(--muted);
  font-size: 10px;
  text-decoration: line-through;
}

.product-info-cell .pill-info {
  border: 0;
  background: rgba(191, 208, 217, 0.52);
  color: #2e4a58;
}

.product-info-cell .pill-info .mono {
  font-size: 10px;
  line-height: 1;
}

.product-info-cell .pill-info .stock-note {
  font-size: 10px;
  line-height: 1;
}

.product-info-colors-btn {
  appearance: none;
  cursor: pointer;
  white-space: nowrap;
  gap: 4px;
}

.product-info-colors-btn-muted {
  opacity: 0.74;
}

.cell-clip {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  line-height: 1.32;
}

.listing-cell {
  min-width: 0;
  height: 204px;
}

.checks-cell {
  padding: 6px;
}

.checks-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.check-item {
  min-width: 0;
  border: 1px solid rgba(20, 39, 50, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 4px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.check-label {
  min-width: 0;
  font: 600 10px/1.1 "IBM Plex Sans", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #50606a;
  white-space: nowrap;
}

.check-value {
  min-width: 0;
  display: inline-flex;
  justify-content: flex-end;
}

.checks-filter-popover-wrap {
  position: relative;
}

.checks-filter-toggle {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(20, 39, 50, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: #294756;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
}

.checks-filter-toggle-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.checks-filter-main-icon {
  width: 13px;
  height: 13px;
}

.checks-filter-toggle.is-active {
  border-color: rgba(0, 117, 143, 0.55);
  background: rgba(0, 117, 143, 0.12);
  color: #0c586c;
}

.checks-filter-toggle-icon {
  width: 14px;
  height: 14px;
}

.checks-filter-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(390px, calc(100vw - 60px));
  border: 1px solid rgba(20, 39, 50, 0.2);
  border-radius: 14px;
  background: rgba(244, 249, 251, 0.98);
  padding: 8px;
  box-shadow: 0 16px 32px rgba(8, 24, 32, 0.24);
  z-index: 36;
}

.checks-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.checks-filter-item {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.checks-filter-item > span {
  font: 600 9px/1.1 "IBM Plex Sans", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a6973;
}

.checks-filter-item-wide {
  grid-column: span 2;
}

.checks-filter-grid .filter-select,
.checks-filter-grid .filter-input {
  min-height: 24px;
  padding: 3px 6px;
  font-size: 11px;
  border-radius: 7px;
}

.checks-filter-grid .filter-select {
  padding-right: 25px;
  background-position: right 6px center;
  background-size: 11px 11px;
}

.mono-compact {
  font-size: 11px;
}

.cell-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.actions-divider {
  width: 22px;
  height: 1px;
  border-radius: 999px;
  background: rgba(16, 35, 46, 0.24);
  margin: 2px 0;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(18, 31, 40, 0.2);
  background: rgba(255, 255, 255, 0.96);
  color: #2e4a59;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn-refresh {
  color: #0c6a82;
  border-color: rgba(0, 117, 143, 0.35);
}

.icon-btn-history {
  color: #375e6d;
  border-color: rgba(62, 96, 132, 0.35);
}

.icon-btn-remove {
  color: #9a2f1f;
  border-color: rgba(191, 62, 44, 0.35);
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(17, 36, 45, 0.18);
}

.icon-btn:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.icon-btn-refresh:hover {
  border-color: rgba(0, 117, 143, 0.72);
}

.icon-btn-refresh:active {
  background: rgba(0, 117, 143, 0.12);
}

.icon-btn-history:hover {
  border-color: rgba(62, 96, 132, 0.7);
}

.icon-btn-history:active {
  background: rgba(62, 96, 132, 0.12);
}

.icon-btn-remove:hover {
  border-color: rgba(191, 62, 44, 0.72);
}

.icon-btn-remove:active {
  background: rgba(191, 62, 44, 0.12);
}

.status-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(18, 31, 40, 0.2);
  background: rgba(255, 255, 255, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.status-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-icon-ok {
  color: #125d4b;
  border-color: rgba(34, 131, 111, 0.45);
  background: rgba(34, 131, 111, 0.14);
}

.status-icon-loading {
  color: #7e4f06;
  border-color: rgba(173, 111, 26, 0.48);
  background: rgba(173, 111, 26, 0.14);
}

.status-icon-error {
  color: #8b2d21;
  border-color: rgba(191, 62, 44, 0.52);
  background: rgba(191, 62, 44, 0.14);
}

.status-icon-idle {
  color: #4d5c64;
  border-color: rgba(79, 93, 103, 0.4);
  background: rgba(79, 93, 103, 0.14);
}

.status-icon-queued {
  color: #0f5e82;
  border-color: rgba(13, 116, 162, 0.4);
  background: rgba(13, 116, 162, 0.12);
}

.status-icon-spin {
  animation: status-spin 1s linear infinite;
}

.status-icon-btn {
  appearance: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.status-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(17, 36, 45, 0.18);
}

.status-icon-btn:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

.slides-wrap {
  width: 100%;
  height: 100%;
  min-height: 166px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 4px;
  overflow: visible;
}

.slides-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 3px;
  align-content: start;
}

.slide-item {
  min-width: 0;
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: start;
}

.slides-wrap .slide-label {
  position: absolute;
  top: 2px;
  left: 50%;
  width: calc(var(--listing-thumb-max) - 4px);
  max-width: calc(100% - 4px);
  transform: translateX(-50%);
  z-index: 2;
  font-size: 7px;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.98);
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(16, 35, 46, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.slides-wrap .slide-thumb {
  display: block;
  width: min(100%, var(--listing-thumb-max));
  aspect-ratio: 3 / 4;
  border-radius: 5px;
  border: 1px solid rgba(18, 31, 40, 0.18);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  z-index: 1;
}

.slides-wrap .slide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slides-wrap .slide-thumb:hover {
  border-color: rgba(0, 117, 143, 0.75);
  box-shadow: 0 8px 15px rgba(8, 24, 32, 0.28);
  z-index: 2;
}

.slide-item-placeholder {
  width: min(100%, var(--listing-thumb-max));
  aspect-ratio: 3 / 4;
  border-radius: 5px;
  border: 1px dashed rgba(32, 53, 67, 0.14);
  background: rgba(255, 255, 255, 0.36);
  justify-self: center;
}

.slides-total {
  margin: 0;
  font-size: 10px;
  line-height: 1.2;
}

.slide-hover-zoom {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 99999;
  border-radius: 10px;
  border: 1px solid rgba(0, 117, 143, 0.68);
  background: #fff;
  box-shadow: 0 20px 34px rgba(8, 24, 32, 0.4);
  overflow: hidden;
  opacity: 0;
  transform: translate3d(-9999px, -9999px, 0);
  transition: opacity 0.1s ease;
}

.slide-hover-zoom.is-visible {
  opacity: 1;
}

.slide-hover-zoom img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.recommendations-modal {
  position: fixed;
  inset: 0;
  z-index: 31;
}

.rich-modal {
  z-index: 32;
}

.limits-modal {
  z-index: 33;
}

.row-history-modal {
  z-index: 34;
}

.problems-chart-modal {
  z-index: 35;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 15, 24, 0.7);
}

.preview-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  width: min(95vw, 980px);
  max-height: 92vh;
  display: grid;
  gap: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.modal-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.modal-head .preview-close,
.modal-head .preview-refresh {
  margin-bottom: 0;
}

.recommendations-top {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.preview-stage {
  position: relative;
  background: #f2f5f6;
  border: 1px solid rgba(17, 33, 42, 0.14);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(66vh, 640px);
  overflow: hidden;
}

.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(17, 33, 42, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #2f4653;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.1s ease,
    box-shadow 0.16s ease;
}

.preview-nav .ui-icon {
  width: 18px;
  height: 18px;
}

.preview-nav:hover:not(:disabled) {
  border-color: rgba(0, 117, 143, 0.6);
  background: rgba(255, 255, 255, 0.98);
  color: #0b5568;
  transform: translateY(-50%) scale(1.03);
  box-shadow: 0 10px 22px rgba(12, 41, 52, 0.2);
}

.preview-nav:active:not(:disabled) {
  transform: translateY(-50%) scale(0.99);
  background: rgba(231, 243, 248, 0.98);
}

.preview-nav-prev {
  left: 10px;
}

.preview-nav-next {
  right: 10px;
}

.preview-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.preview-thumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 0 10px 2px 0;
  scroll-padding-inline: 10px;
}

.preview-thumb {
  border: 1px solid rgba(17, 33, 42, 0.2);
  border-radius: 8px;
  padding: 0;
  width: 64px;
  min-width: 64px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.16s ease, transform 0.1s ease;
}

.preview-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumb.is-active {
  border-color: rgba(0, 117, 143, 0.82);
  box-shadow: 0 0 0 2px rgba(0, 117, 143, 0.22);
}

.preview-thumb:hover:not(.is-active) {
  border-color: rgba(0, 117, 143, 0.56);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(17, 36, 45, 0.16);
}

.preview-thumb:active {
  transform: translateY(0);
}

.recommendations-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  width: min(94vw, 920px);
  max-height: 84vh;
  overflow: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
}

.recommendations-card h3 {
  margin: 0;
  font: 700 24px/1.1 "Space Grotesk", "IBM Plex Sans", sans-serif;
}

#recommendationsSubtle {
  margin: 0 0 var(--overlay-note-gap);
}

.recommendations-content {
  display: grid;
  gap: var(--overlay-note-gap);
}

.rich-card {
  width: min(95vw, 980px);
  height: min(92vh, 860px);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.rich-top {
  margin-bottom: 0;
}

.rich-top .preview-close {
  margin-bottom: 0;
}

#richCaption {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.rich-content {
  min-height: 0;
  overflow: hidden;
}

.rich-viewer-wrap {
  display: grid;
  gap: 0;
  min-height: 0;
  height: 100%;
}

.rich-viewer {
  display: grid;
  grid-template-columns: minmax(132px, 182px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: 0;
  height: 100%;
}

.rich-strip {
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.rich-strip-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(23, 48, 64, 0.22);
  border-radius: 12px;
  background: #fff;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.rich-strip-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
}

.rich-strip-item:hover {
  border-color: rgba(0, 117, 143, 0.65);
}

.rich-strip-item.is-active {
  border-color: rgba(0, 117, 143, 0.92);
  box-shadow: 0 0 0 2px rgba(0, 117, 143, 0.25);
}

.rich-strip-index {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 999px;
  padding: 2px 6px;
  font: 600 10px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  color: #fff;
  background: rgba(12, 40, 54, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rich-stage-pane {
  display: grid;
  gap: 0;
  min-width: 0;
  border-left: 1px solid rgba(21, 44, 58, 0.22);
  padding-left: 12px;
  min-height: 0;
}

.rich-stage-stream {
  height: 100%;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid rgba(32, 53, 67, 0.22);
  background: #fff;
  overflow: auto;
  overflow-x: hidden;
}

.rich-stage-item {
  margin: 0;
  padding: 0;
  border: 0;
}

.rich-stage-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #fff;
}

.rich-snippets {
  display: grid;
  gap: 6px;
}

.rich-snippet {
  margin: 0;
  padding: 8px 9px;
  border-radius: 9px;
  border: 1px solid rgba(22, 56, 78, 0.16);
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  color: #213746;
}

.limits-card {
  width: min(94vw, 980px);
}

.overlay-note,
.limits-note,
.recommendation-summary {
  margin: 6px 0 var(--overlay-note-gap);
  border: 1px solid rgba(22, 56, 78, 0.16);
  border-radius: 10px;
  padding: 7px 10px;
  background: rgba(233, 244, 248, 0.6);
  color: #2d4756;
  font-size: var(--overlay-note-font-size);
  line-height: 1.4;
  max-width: none;
}

.recommendations-content > .overlay-note,
.recommendations-content > .recommendation-summary,
.problems-chart-content > .overlay-note,
.problems-chart-content > .recommendation-summary {
  margin-top: 0;
  margin-bottom: 0;
}

.sellers-card {
  width: min(92vw, 820px);
}

.row-history-card {
  width: min(92vw, 960px);
}

.row-history-filter-toggle.is-active {
  border-color: rgba(0, 117, 143, 0.62);
  background: rgba(213, 236, 244, 0.96);
  color: #074d61;
}

.row-history-content {
  display: grid;
  gap: 10px;
}

.row-history-list {
  display: grid;
  gap: 8px;
}

.row-history-item {
  border: 1px solid rgba(22, 56, 78, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 9px 10px;
  display: grid;
  gap: 6px;
}

.row-history-item.is-error {
  border-color: rgba(191, 62, 44, 0.34);
  background: rgba(253, 239, 235, 0.9);
}

.row-history-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.row-history-time {
  font: 600 11px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  color: #2a4757;
}

.row-history-meta {
  min-width: 0;
  color: #516773;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-history-status {
  border-radius: 999px;
  border: 1px solid rgba(20, 39, 50, 0.2);
  background: rgba(20, 39, 50, 0.08);
  color: #2f4b5a;
  padding: 2px 7px;
  font: 600 10px/1 "IBM Plex Sans", sans-serif;
  text-transform: uppercase;
}

.row-history-item.is-error .row-history-status {
  border-color: rgba(191, 62, 44, 0.34);
  background: rgba(191, 62, 44, 0.12);
  color: #8c2d21;
}

.row-history-changes {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
  color: #233d4b;
  font-size: 12px;
}

.row-history-no-changes {
  color: #576b76;
  font-size: 12px;
}

.row-history-error {
  border-radius: 8px;
  border: 1px solid rgba(191, 62, 44, 0.24);
  background: rgba(191, 62, 44, 0.08);
  color: #8c2d21;
  padding: 7px 8px;
  font: 500 12px/1.35 "IBM Plex Sans", sans-serif;
}

.problems-chart-card {
  width: min(94vw, 1180px);
}

.problems-chart-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 8px;
}

.problems-chart-cabinet-field {
  min-width: 220px;
  max-width: 340px;
}

.problems-chart-content {
  display: grid;
  gap: var(--overlay-note-gap);
}

.problems-chart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}

.problems-chart-summary span {
  font-size: 11px;
  color: #334f5e;
}

.problems-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.problems-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(22, 56, 78, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  color: #274050;
  font: 500 11px/1.2 "IBM Plex Sans", sans-serif;
}

.problems-chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--series-color, #0b738a);
}

.problems-chart-legend-item strong {
  font-weight: 700;
  color: #1d3646;
}

.problems-chart-legend-delta {
  color: #5f7482;
}

.problems-chart-stage {
  border: 1px solid rgba(22, 56, 78, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
  overflow: auto;
}

.problems-chart-svg {
  width: max(100%, 900px);
  height: auto;
  display: block;
}

.problems-chart-grid-row line {
  stroke: rgba(34, 66, 88, 0.12);
  stroke-width: 1;
}

.problems-chart-grid-row text {
  font: 500 10px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  fill: #5e7482;
  text-anchor: end;
}

.problems-chart-axis-x {
  font: 500 10px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  fill: #5e7482;
  text-anchor: middle;
}

.problems-chart-axis-x-time {
  font: 500 9px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  fill: #8193a0;
  text-anchor: middle;
}

.problems-chart-area {
  fill: rgba(0, 117, 143, 0.14);
}

.problems-chart-line {
  fill: none;
  stroke: var(--series-color, #0b738a);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.problems-chart-point {
  fill: var(--series-color, #0b738a);
  stroke: #ffffff;
  stroke-width: 1.7;
  cursor: pointer;
  transition: stroke-width 0.12s ease, filter 0.12s ease;
}

.problems-chart-point:hover {
  stroke-width: 2.6;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--series-color, #0b738a) 45%, #ffffff));
}

.sellers-content {
  display: grid;
  gap: 12px;
}

.seller-settings-list {
  display: grid;
  gap: 8px;
}

.seller-settings-row {
  border: 1px solid rgba(22, 56, 78, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.seller-settings-row-main {
  min-width: 0;
}

.seller-settings-cabinet {
  margin: 0;
  font: 600 14px/1.2 "IBM Plex Sans", sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-settings-id {
  margin: 2px 0 0;
  color: #4e6674;
}

.seller-settings-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.seller-settings-link {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.seller-settings-link:hover {
  text-decoration: underline;
}

.seller-settings-remove-btn {
  min-height: 32px;
}

.seller-settings-reserved-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 8px;
  border: 1px dashed rgba(31, 60, 75, 0.24);
  background: rgba(233, 244, 248, 0.58);
  color: #4f6674;
  padding: 6px 10px;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
}

.seller-settings-form {
  border: 1px solid rgba(22, 56, 78, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.seller-settings-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.limits-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.limits-section {
  border: 1px solid rgba(22, 56, 78, 0.16);
  border-radius: 11px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  gap: 8px;
}

.limits-section.is-preferred {
  border-color: rgba(0, 117, 143, 0.42);
  box-shadow: 0 0 0 2px rgba(0, 117, 143, 0.08) inset;
}

.limits-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.limits-section-head h4 {
  margin: 0;
  font: 700 16px/1.2 "IBM Plex Sans", sans-serif;
  color: #1e3d4e;
}

.limits-global-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #4e6674;
}

.limits-global-field > span {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.limits-global-field input {
  width: 68px;
  min-height: 30px;
  border-radius: 8px;
  padding: 4px 7px;
}

.limits-cabinet-list {
  display: grid;
  gap: 6px;
}

.limits-cabinet-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto auto 68px;
  align-items: center;
  gap: 8px;
  border-radius: 9px;
  background: rgba(20, 39, 50, 0.08);
  padding: 6px 8px;
  font-size: 11px;
  color: #2a4555;
}

.limits-cabinet-row.is-over {
  background: rgba(191, 62, 44, 0.14);
  color: #7f2e24;
}

.limits-cabinet-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.limits-cabinet-usage,
.limits-cabinet-fill {
  font: 600 11px/1 "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.limits-cabinet-row input {
  min-height: 30px;
  border-radius: 8px;
  padding: 4px 7px;
}

.recommendation-empty {
  border: 1px dashed rgba(38, 59, 74, 0.28);
  border-radius: 10px;
  padding: 10px;
  color: var(--muted);
  background: rgba(234, 242, 245, 0.45);
}

.recommendation-summary-ids {
  line-height: 1.45;
  word-break: break-word;
}

.recommendation-ids {
  border: 1px solid rgba(22, 56, 78, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  color: #203541;
  line-height: 1.45;
  word-break: break-word;
}

.recommendation-sources {
  display: grid;
  gap: 8px;
}

.recommendation-source {
  border: 1px solid rgba(22, 56, 78, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.88);
  display: grid;
  gap: 4px;
}

.recommendation-source-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.recommendation-source-count {
  min-width: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  text-align: center;
  background: rgba(23, 55, 73, 0.12);
  color: #203541;
  font: 600 11px/1 "IBM Plex Sans", sans-serif;
}

.recommendation-source-ids {
  font-size: 11px;
  line-height: 1.35;
  word-break: break-word;
}

.color-variants-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.color-variant-card {
  border: 1px solid rgba(32, 53, 67, 0.14);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.color-variant-cover {
  display: block;
  background: #f4f7f8;
  border-bottom: 1px solid rgba(32, 53, 67, 0.12);
}

.color-variant-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.color-variant-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 128px;
  color: var(--muted);
  font-size: 12px;
}

.color-variant-main {
  padding: 4px 5px;
  display: grid;
  gap: 2px;
}

.color-variant-title {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  text-decoration: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.color-variant-title:hover {
  text-decoration: underline;
}

.color-variant-id {
  font-size: 10px;
  line-height: 1.15;
  color: #4e6674;
}

.color-variant-meta {
  margin-top: 0;
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-variant-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.color-variant-add-btn {
  margin-top: 3px;
  justify-self: start;
  min-height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(18, 102, 124, 0.36);
  background: rgba(230, 246, 251, 0.9);
  color: #0f5f75;
  padding: 2px 8px;
  font: 700 10px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.color-variant-add-btn:hover {
  border-color: rgba(10, 90, 112, 0.55);
  background: rgba(218, 241, 248, 0.98);
  color: #0a5569;
}

.color-variant-add-btn:active {
  background: rgba(203, 234, 244, 0.98);
  color: #07495a;
}

.color-variant-stat {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(31, 60, 75, 0.18);
  background: rgba(238, 246, 249, 0.85);
  padding: 1px 6px;
  font: 600 9px/1.1 "IBM Plex Sans", sans-serif;
  color: #2d4b5a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommendation-item {
  border: 1px solid rgba(32, 53, 67, 0.12);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.recommendation-title {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.recommendation-meta {
  color: var(--muted);
  font-size: 12px;
}

.recommendation-slides {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-top: 8px;
}

.recommendation-slides img {
  width: 62px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(22, 36, 46, 0.18);
}

.preview-stage > #previewImage {
  width: 100%;
  max-height: min(66vh, 640px);
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.preview-close {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: rgba(0, 117, 143, 0.14);
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.1s ease,
    box-shadow 0.16s ease;
}

.preview-refresh {
  border: 1px solid rgba(0, 117, 143, 0.28);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #0b5568;
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.1s ease,
    box-shadow 0.16s ease;
}

.preview-close:hover:not(:disabled) {
  background: rgba(0, 117, 143, 0.22);
  color: #08465a;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(12, 58, 73, 0.18);
}

.preview-close:active:not(:disabled) {
  background: rgba(0, 117, 143, 0.28);
  transform: translateY(0);
}

.preview-refresh:hover:not(:disabled) {
  border-color: rgba(0, 117, 143, 0.56);
  background: rgba(232, 244, 248, 0.95);
  color: #0a5569;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(12, 58, 73, 0.14);
}

.preview-refresh:active:not(:disabled) {
  transform: translateY(0);
  background: rgba(219, 238, 244, 0.95);
}

.preview-close:focus-visible,
.preview-refresh:focus-visible,
.preview-nav:focus-visible {
  outline: 2px solid rgba(0, 117, 143, 0.34);
  outline-offset: 1px;
}

.preview-refresh:disabled {
  opacity: 0.6;
  cursor: default;
}

.preview-top .preview-close {
  margin-bottom: 0;
}

.preview-top .preview-refresh,
.recommendations-top .preview-close,
.recommendations-top .preview-refresh {
  margin-bottom: 0;
}

#previewCaption {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: enter 0.45s ease forwards;
}

.delay-1 {
  animation-delay: 0.08s;
}

.delay-2 {
  animation-delay: 0.16s;
}

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1260px) {
  :root {
    --listing-thumb-max: 42px;
  }

  .hero {
    flex-direction: column;
  }

  .global-filters-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .global-filters-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .global-head-article-filter {
    min-width: 220px;
    max-width: 380px;
  }

  .global-columns-filters {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .global-filters-body {
    grid-template-columns: 1fr;
  }

  .controls-head {
    flex-direction: column;
  }

  .btn-row-top {
    justify-content: flex-start;
  }

  .autoplay-quota-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-meta {
    min-width: auto;
    width: 100%;
  }

  .agreement-topline {
    grid-template-columns: 1fr;
  }

  .agreement-block-head {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .agreement-seller-settings {
    justify-content: flex-start;
  }

  .agreement-total {
    grid-template-columns: minmax(122px, auto) minmax(0, 1fr);
  }

  .agreement-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .col-listing {
    width: 28%;
  }

  .checks-grid {
    grid-template-columns: 1fr;
  }

  .checks-filter-grid {
    grid-template-columns: 1fr;
  }

  .checks-filter-item-wide {
    grid-column: span 1;
  }

  .checks-filter-popover {
    width: min(320px, calc(100vw - 40px));
  }

  .presets-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .rich-viewer {
    grid-template-columns: minmax(118px, 156px) minmax(0, 1fr);
    gap: 10px;
  }

  .color-variants-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .color-variants-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --listing-thumb-max: 36px;
  }

  body {
    padding: 10px;
  }

  h1 {
    font-size: 29px;
  }

  .global-filters-frame {
    top: 6px;
    padding: 8px;
  }

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

  .global-head-article-filter {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  .compact-grid .btn {
    width: 100%;
  }

  .limits-content {
    grid-template-columns: 1fr;
  }

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

  .limits-cabinet-usage,
  .limits-cabinet-fill {
    grid-column: 1 / -1;
  }

  .limits-cabinet-row input {
    justify-self: end;
  }

  .seller-settings-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .seller-settings-row-actions {
    width: 100%;
    justify-content: space-between;
  }

  .row-history-head {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .problems-chart-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .problems-chart-cabinet-field {
    min-width: 0;
    max-width: none;
  }

  .slides-wrap .slide-label {
    font-size: 8px;
  }

  .checks-grid {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .checks-filter-grid {
    grid-template-columns: 1fr;
  }

  .agreement-block-head h2 {
    font-size: 24px;
  }

  .agreement-seller-settings {
    width: 100%;
  }

  .agreement-total-value {
    font-size: 46px;
  }

  .agreement-total {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .agreement-total-meta-list-main {
    justify-content: flex-start;
  }

  .agreement-breakdown-head {
    display: grid;
    gap: 4px;
  }

  .agreement-breakdown-meta {
    justify-content: flex-start;
  }

  .agreement-breakdown-actions {
    justify-content: flex-start;
  }

  .agreement-breakdown-cabinet-filters {
    justify-content: flex-start;
  }

  .agreement-problem-cabinets-head,
  .agreement-problem-cabinet-item {
    grid-template-columns: minmax(0, 1fr) minmax(26px, auto) auto minmax(26px, auto);
  }

  .agreement-cards {
    grid-template-columns: 1fr;
  }

  .agreement-card-actions {
    gap: 6px;
  }

  .table-panel {
    padding: 8px;
  }

  .table-tools {
    justify-content: flex-start;
  }

  .table-pagination {
    width: 100%;
    justify-content: flex-start;
  }

  .bulk-progress-toast {
    right: 10px;
    bottom: 10px;
    width: min(360px, calc(100vw - 20px));
  }

  .bulk-progress-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .bulk-progress-cancel {
    grid-column: 1 / -1;
    width: 100%;
  }

  thead th,
  tbody td {
    font-size: 11px;
    padding: 5px;
  }

  .listing-cell {
    height: 160px;
  }

  .slides-wrap {
    min-height: 126px;
  }

  .preview-card {
    width: 96vw;
    padding: 10px;
    gap: 8px;
  }

  .rich-card {
    width: 96vw;
    height: min(92vh, 860px);
    padding: 10px;
    gap: 8px;
  }

  .preview-stage {
    min-height: min(56vh, 480px);
  }

  .preview-nav {
    width: 36px;
    height: 36px;
    font-size: 28px;
  }

  .rich-viewer {
    grid-template-columns: minmax(90px, 112px) minmax(0, 1fr);
    gap: 8px;
  }

  .rich-stage-pane {
    padding-left: 8px;
  }

  .rich-strip {
    height: 100%;
    max-height: none;
    gap: 6px;
  }

  .rich-stage-stream {
    height: 100%;
    min-height: 0;
  }
}
