:root {
  --bg: #f7f1f2;
  --bg-accent: radial-gradient(circle at top left, rgba(180, 35, 24, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 25%),
    linear-gradient(180deg, #fff8f8 0%, #f7f1f2 48%, #efe3e5 100%);
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-muted: #f4f7fb;
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --primary: #b42318;
  --danger: #d92d20;
  --danger-soft: rgba(217, 45, 32, 0.1);
  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.1);
  --warning: #b45309;
  --shadow-lg: 0 24px 60px rgba(89, 22, 27, 0.14);
  --shadow-md: 0 16px 36px rgba(89, 22, 27, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --font-family: "Segoe UI", "SF Pro Display", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-family);
  color: var(--text);
  background: var(--bg-accent);
}

body {
  min-width: 1024px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.topbar,
.panel,
.stats-card,
.modal-card {
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
  box-shadow: var(--shadow-lg);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--text-muted);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.85rem;
}

.topbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.search-field,
.select-field,
.field {
  display: grid;
  gap: 7px;
}

.search-field span,
.select-field span,
.field span,
.section-label,
.panel-hint,
.helper-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.search-field input,
.select-field select,
.field input,
.field select,
.field textarea {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.94);
  padding: 12px 14px;
  min-height: 44px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field input {
  width: 360px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(180, 35, 24, 0.45);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.stats-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
}

.stats-card h2 {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--text-soft);
}

.stats-card strong {
  display: block;
  margin: 0;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stats-card small {
  display: block;
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--text-muted);
}

.workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
}

.sidebar,
.content-area {
  display: grid;
  gap: 20px;
  align-content: start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0;
}

.panel-body {
  padding: 18px 20px 20px;
}

.toolbar-panel {
  padding: 18px 20px;
  position: relative;
  z-index: 40;
  overflow: visible;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  overflow: visible;
}

.segmented-control {
  display: inline-flex;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.segment {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  padding: 11px 20px;
  border-radius: 999px;
}

.segment.active {
  background: linear-gradient(135deg, #7f1d1d, #b42318);
  color: #fff;
}

.toolbar-actions,
.inline-actions,
.chip-row,
.matrix-controls,
.matrix-legend,
.taxonomy-actions,
.product-headline,
.modal-header,
.image-list {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  border: 0;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 600;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #b42318, #d92d20);
}

.secondary-button {
  color: #7a271a;
  background: rgba(180, 35, 24, 0.08);
}

.ghost-button {
  color: var(--text-soft);
  background: transparent;
}

.danger-button {
  color: var(--danger);
  background: var(--danger-soft);
}

.toolbar-menu {
  position: relative;
}

.toolbar-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toolbar-menu-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.75;
}

.toolbar-menu.is-open .toolbar-menu-trigger {
  background: rgba(180, 35, 24, 0.12);
  color: #7a271a;
}

.toolbar-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    var(--surface);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
}

.toolbar-menu-action {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.toolbar-menu-action:hover,
.toolbar-menu-action:focus-visible {
  background: rgba(180, 35, 24, 0.08);
  color: #7a271a;
}

.toolbar-menu-action:disabled {
  background: transparent;
  color: var(--text-muted);
  opacity: 0.56;
  cursor: not-allowed;
}

@media (max-width: 860px) {
  .toolbar-menu-panel {
    left: 0;
    right: auto;
    min-width: min(240px, calc(100vw - 32px));
  }
}

.mini-button {
  border: 0;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
}

.content-panel {
  min-height: 700px;
  overflow: visible;
}

.section-stack,
.filter-stack,
.form-stack,
.taxonomy-stack,
.details-grid {
  display: grid;
  gap: 16px;
}

.section-stack {
  padding: 20px;
}

.section-card,
.matrix-frame,
.table-frame,
.dropzone,
.taxonomy-item,
.info-card,
.mini-product-card,
.legend-chip,
.image-thumb,
.attribute-row {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
}

.section-card,
.matrix-frame,
.table-frame,
.taxonomy-item,
.info-card {
  padding: 16px;
}

.filter-group,
.axis-group {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-pill,
.legend-chip,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-soft);
}

.range-grid,
.grid-2,
.grid-3 {
  display: grid;
  gap: 12px;
}

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

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

.table-frame {
  overflow: auto;
}

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

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 250, 252, 0.96);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.sortable {
  cursor: pointer;
}

.table-badge,
.brand-badge-chip,
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.table-badge {
  background: rgba(180, 35, 24, 0.1);
  color: var(--primary);
}

.status-badge.status-own {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.status-rival {
  background: rgba(180, 83, 9, 0.1);
  color: var(--warning);
}

.bulk-actions {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.matrix-controls {
  justify-content: space-between;
  margin-bottom: 14px;
}

.matrix-host {
  display: grid;
  gap: 14px;
}

.matrix-shell {
  position: relative;
  height: 820px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.92));
}

.matrix-host:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 18px;
  background: linear-gradient(180deg, #f7f1f2, #efe3e5);
  box-sizing: border-box;
}

.matrix-host:fullscreen .matrix-shell {
  height: calc(100vh - 116px);
}

.matrix-shell.grab {
  cursor: grab;
}

.matrix-shell.grabbing {
  cursor: grabbing;
}

.matrix-stage {
  position: absolute;
  inset: 0;
}

.matrix-board {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.matrix-host,
.matrix-shell,
.matrix-stage,
.matrix-board,
.matrix-axis-top,
.matrix-axis-side,
.matrix-cells,
.matrix-cell,
.cell-head,
.cell-items,
.mini-product-card,
.mini-product-main,
.matrix-more-badge,
.legend-chip {
  user-select: none;
  -webkit-user-select: none;
}

.matrix-axis-top {
  display: grid;
  gap: 12px;
  margin-left: 210px;
}

.matrix-axis-top .axis-chip,
.matrix-axis-side .axis-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 12px;
  text-align: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.86rem;
  color: var(--text-soft);
}

.matrix-grid-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.matrix-axis-side {
  display: grid;
  gap: 12px;
  width: 198px;
}

.matrix-cells {
  display: grid;
  gap: 12px;
}

.matrix-cell {
  min-height: 170px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.86);
}

.matrix-cell.cell-empty,
.matrix-cell.cell-light {
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.82), rgba(240, 253, 244, 0.9));
}

.matrix-cell.cell-dense {
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.85), rgba(255, 241, 242, 0.9));
}

.cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cell-title {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.cell-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cell-items {
  display: grid;
  gap: 8px;
}

.matrix-more-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.mini-product-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px;
  align-items: center;
}

.mini-product-main {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.mini-product-card strong {
  font-size: 0.92rem;
  display: block;
}

.mini-product-card small {
  color: inherit;
  opacity: 0.9;
}

.mini-product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.18);
}

.mini-product-thumb-fallback {
  display: grid;
  place-items: center;
  font-weight: 700;
}

.mini-product-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.link-icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-size: 1rem;
  font-weight: 700;
}

.table-link-button,
.detail-link-button,
.offer-link-button {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

.mini-product-copy strong,
.mini-product-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  padding: 28px;
  z-index: 1400;
  overflow: auto;
}

.modal-card {
  width: min(1060px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 36px 90px rgba(15, 23, 42, 0.28);
}

.modal-header,
.modal-body,
.modal-footer {
  padding: 20px 24px;
}

.modal-header,
.modal-footer {
  justify-content: space-between;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 0;
}

.modal-body {
  display: grid;
  gap: 20px;
}

.axis-modal-card {
  width: min(760px, calc(100vw - 48px));
}

.product-editor-card {
  width: min(1140px, calc(100vw - 40px));
}

.product-editor-body {
  gap: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.72), rgba(255, 255, 255, 0.98));
}

.editor-section {
  padding: 0;
  overflow: hidden;
}

.editor-section .panel-heading {
  padding-bottom: 0;
}

.compact-grid {
  gap: 10px;
}

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

.editor-columns-wide {
  align-items: start;
}

.series-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.series-inline-field {
  margin: 0;
}

.compact-dropzone {
  min-height: 116px;
}

.compact-image-list {
  align-items: stretch;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 16px;
  border-style: dashed;
  text-align: center;
}

.dropzone.dragover {
  border-color: rgba(21, 94, 239, 0.4);
}

.image-thumb {
  position: relative;
  width: 140px;
  overflow: hidden;
}

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

.thumb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
}

.attribute-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  padding: 10px;
}

.offer-row {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 1fr 1.2fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.offer-row input {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.94);
  padding: 10px 12px;
  min-height: 42px;
}

.matching-section {
  display: grid;
  gap: 14px;
}

.matching-section.is-disabled {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  background: rgba(248, 250, 252, 0.92);
}

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

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

.matching-placeholder {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
}

.matching-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.94);
}

.matching-option input {
  margin-top: 4px;
}

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

.matching-copy small {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.taxonomy-item {
  display: grid;
  gap: 12px;
}

.taxonomy-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.info-card h3 {
  margin-bottom: 8px;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
}

.detail-row strong {
  color: var(--text);
}

.link-value {
  max-width: 420px;
  overflow-wrap: anywhere;
  text-align: right;
}

.product-images {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.product-images img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.comments-section {
  padding-top: 6px;
}

.comments-list {
  display: grid;
  gap: 12px;
}

.offers-table {
  display: grid;
  gap: 10px;
}

.offers-table-head,
.offers-table-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) 0.8fr 1fr 80px;
  gap: 12px;
  align-items: center;
}

.offers-table-head {
  padding: 0 2px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.offers-table-row {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.92);
}

.offers-table-store {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.offers-table-store strong,
.offers-table-store .offers-table-meta {
  min-width: 0;
}

.offers-table-store strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offers-table-meta {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offers-history {
  margin-top: 4px;
}

.offers-history summary {
  cursor: pointer;
  color: var(--primary);
  font-size: 0.72rem;
  line-height: 1.2;
  list-style: none;
}

.offers-history summary::-webkit-details-marker {
  display: none;
}

.offers-history-list {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(59, 130, 246, 0.2);
}

.offers-history-chart {
  display: grid;
  gap: 6px;
}

.offers-history-chart svg {
  width: 100%;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
}

.offers-history-chart polyline {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offers-history-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.offers-history-deltas span {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 600;
}

.offers-history-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.88);
}

.offers-history-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.offers-history-price-row strong,
.offers-history-price-row span,
.offers-history-item small {
  min-width: 0;
}

.offers-history-price-row strong {
  font-size: 0.76rem;
  color: var(--text);
}

.offers-history-price-row span {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offers-history-item small {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offers-history-more {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.catalog-import-card {
  width: min(1240px, calc(100vw - 32px));
}

.catalog-import-review-list {
  display: grid;
  gap: 12px;
  max-height: min(64vh, 760px);
  overflow: auto;
  padding-right: 4px;
}

.catalog-import-item {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  min-width: 0;
}

.catalog-import-item.is-warning {
  border-color: rgba(217, 45, 32, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 248, 0.98));
}

.catalog-import-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.catalog-import-item-toggle,
.catalog-import-change-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.catalog-import-item-toggle > span,
.catalog-import-change-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.catalog-import-item-toggle strong,
.catalog-import-item-toggle small,
.catalog-import-change-copy strong,
.catalog-import-change-copy span {
  min-width: 0;
}

.catalog-import-item-toggle small {
  color: var(--text-muted);
}

.catalog-import-warning-list {
  display: grid;
  gap: 6px;
}

.catalog-import-warning {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(217, 45, 32, 0.14);
  background: rgba(254, 242, 242, 0.9);
  color: #9f1239;
  font-size: 0.74rem;
  line-height: 1.35;
}

.catalog-import-change-list {
  display: grid;
  gap: 8px;
}

.catalog-import-change {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
}

.catalog-import-change.is-warning {
  border-color: rgba(217, 45, 32, 0.18);
  background: rgba(255, 247, 237, 0.96);
}

.catalog-import-change-values {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.catalog-import-change-arrow {
  color: var(--text-muted);
}

.catalog-import-delta {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(217, 45, 32, 0.12);
  color: #9f1239;
  font-size: 0.72rem;
  font-weight: 600;
}

.catalog-import-decision {
  min-width: 124px;
  height: 30px;
  padding: 4px 10px;
  border-radius: 10px;
}

.catalog-import-empty,
.catalog-import-more {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(59, 130, 246, 0.24);
  color: var(--text-muted);
  background: rgba(248, 251, 255, 0.94);
}

.product-price-history {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.product-price-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-price-history-head strong {
  font-size: 0.82rem;
}

.product-price-history-head span {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text);
}

.product-price-history svg {
  width: 100%;
  height: 62px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
}

.product-price-history polyline {
  fill: none;
  stroke: #0f766e;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-price-history-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-price-history-deltas span {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 600;
}

.comment-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.92);
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.comment-head strong {
  color: var(--text);
  font-size: 0.92rem;
}

.comment-card p {
  white-space: pre-wrap;
  color: var(--text-soft);
}

.comment-form {
  display: grid;
  gap: 14px;
}

.comment-form > .grid-2.compact-grid {
  display: none !important;
}

.comments-empty {
  min-height: 120px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
  color: var(--text-muted);
}

.comparison-board {
  display: grid;
  gap: 14px;
}

.comparison-lane {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow: var(--shadow-md);
}

.comparison-lane-header,
.comparison-card-head,
.comparison-own-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 12px;
}

.comparison-own-card,
.comparison-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.94);
}

.comparison-competitors,
.comparison-cards,
.comparison-copy {
  display: grid;
  gap: 8px;
}

.comparison-cards {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 8px;
  align-items: start;
}

.comparison-image,
.comparison-thumb,
.comparison-image-fallback,
.comparison-thumb-fallback {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(135deg, rgba(21, 94, 239, 0.16), rgba(15, 23, 42, 0.08));
}

.comparison-thumb,
.comparison-thumb-fallback {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.comparison-image-fallback,
.comparison-thumb-fallback {
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-weight: 700;
}

.comparison-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.comparison-delta-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.comparison-delta-up {
  background: var(--success-soft);
  color: var(--success);
}

.comparison-delta-down {
  background: var(--danger-soft);
  color: var(--danger);
}

.comparison-delta-neutral {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-soft);
}

.comparison-copy {
  min-width: 0;
}

.comparison-copy strong {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.comparison-copy span {
  font-size: 0.76rem;
  line-height: 1.25;
  color: var(--text-muted);
}

.comparison-card {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
}

.comparison-card-head {
  display: contents;
}

.comparison-card .comparison-copy {
  gap: 4px;
}

.comparison-card-meta {
  grid-column: 2;
}

.comparison-card-meta > span:first-child:not(.table-badge),
.comparison-card-meta > .table-badge + span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.comparison-card .inline-actions {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: center;
  gap: 6px;
}

.comparison-card .mini-button {
  min-height: 30px;
  padding: 0 10px;
}

.comparison-card .link-icon-button {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

@media (max-width: 900px) {
  .comparison-cards {
    grid-template-columns: 1fr;
  }

  .comparison-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .comparison-card .inline-actions {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
  }
}

.section-caption {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.compact-field {
  gap: 6px;
}

.compact-field input,
.compact-field select,
.compact-field textarea {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
}

.compact-secondary-button,
.compact-ghost-button,
.compact-danger-button {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 14px;
}

.icon-button {
  min-width: 40px;
  padding: 0;
  font-size: 1.1rem;
}

.base-model-badge {
  background: rgba(127, 29, 29, 0.12);
  color: #7f1d1d;
}

.table-status-stack {
  display: grid;
  gap: 8px;
}

.templates-manager-card {
  width: min(1160px, calc(100vw - 40px));
}

.templates-manager-body,
.brand-manager-grid,
.template-section,
.template-section-head,
.editor-hero-grid,
.offer-editor-grid,
.offer-editor-actions,
.compact-inline-form,
.brand-manager-copy,
.brand-manager-actions,
.details-hero,
.details-hero-copy {
  display: grid;
  gap: 14px;
}

.editor-hero-grid {
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
}

.templates-manager-body {
  gap: 18px;
}

.template-section-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.template-row,
.spec-row,
.offer-editor-card,
.brand-manager-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.96);
  padding: 14px;
}

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

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

.offer-editor-actions {
  justify-items: end;
}

.compact-inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.compact-inline-form-wide {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.brand-manager-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.brand-manager-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.brand-manager-media {
  display: grid;
  place-items: center;
}

.brand-manager-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.brand-manager-logo-fallback,
.mini-product-thumb-fallback,
.comparison-image-fallback,
.comparison-thumb-fallback,
.details-hero-image-fallback,
.image-preview-main-fallback {
  display: grid;
  place-items: center;
  padding: 8px;
  text-align: center;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.brand-manager-actions {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  align-items: center;
}

.editor-media-section .panel-body {
  gap: 12px;
}

.image-preview-layout,
.image-preview-primary,
.image-preview-thumbs,
.image-preview-empty {
  display: grid;
  gap: 12px;
}

.image-preview-main,
.details-hero-image {
  width: 100%;
  min-height: 240px;
  max-height: 300px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

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

.image-preview-thumbs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-preview-thumb-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.92);
}

.image-preview-thumb {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
}

.image-preview-empty {
  justify-items: stretch;
}

.compact-empty {
  min-height: 80px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.84);
}

.details-modal-card {
  width: min(980px, calc(100vw - 40px));
}

.details-hero {
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: start;
}

.details-hero-copy {
  align-content: start;
}

.details-hero-image {
  min-height: 260px;
}

.details-hero-image-fallback {
  min-height: 260px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.92);
  color: var(--text-soft);
}

.mini-product-thumb-fallback {
  font-size: 0.7rem;
}

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 30;
}

.toast {
  min-width: 260px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
}

.toast.success {
  background: linear-gradient(135deg, #166534, #15803d);
}

.toast.error {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.toast.info {
  background: linear-gradient(135deg, #0f172a, #334155);
}

.field,
.spec-row-grid > *,
.template-row-grid > *,
.offer-editor-grid > *,
.editor-hero-grid > *,
.editor-columns > *,
.details-hero > *,
.brand-manager-card > * {
  min-width: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
}

.section-card,
.info-card,
.taxonomy-item {
  border-color: rgba(180, 35, 24, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 248, 0.94));
}

.editor-section .panel-heading {
  padding: 18px 18px 0;
  background: linear-gradient(180deg, rgba(180, 35, 24, 0.05), rgba(180, 35, 24, 0));
  border-bottom: 1px solid rgba(180, 35, 24, 0.08);
}

.editor-section .panel-body {
  padding-top: 16px;
}

.product-editor-card {
  width: min(1240px, calc(100vw - 32px));
}

.product-editor-body {
  gap: 14px;
}

.editor-hero-grid {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
}

.editor-media-section .panel-body {
  gap: 12px;
}

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

.checkbox-card {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 78px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(180, 35, 24, 0.14);
  background: linear-gradient(180deg, rgba(180, 35, 24, 0.06), rgba(255, 255, 255, 0.96));
}

.checkbox-card input {
  margin: 0;
  accent-color: var(--primary);
}

.checkbox-card span {
  font-weight: 600;
  color: var(--text);
}

.checkbox-card small {
  color: var(--text-muted);
  line-height: 1.35;
}

.offer-editor-card,
.spec-row,
.template-row,
.brand-manager-card {
  border-color: rgba(180, 35, 24, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 244, 244, 0.96));
  box-shadow: 0 10px 20px rgba(127, 29, 29, 0.06);
}

.offer-editor-grid {
  gap: 10px 12px;
}

.offer-editor-actions {
  justify-items: start;
}

.spec-toolbar {
  align-items: end;
}

.icon-button {
  width: 40px;
}

.dropzone {
  border-color: rgba(180, 35, 24, 0.18);
  background: linear-gradient(180deg, rgba(255, 251, 251, 0.98), rgba(252, 244, 244, 0.94));
}

.dropzone.dragover {
  border-color: rgba(180, 35, 24, 0.42);
  background: rgba(180, 35, 24, 0.06);
}

.image-preview-main,
.details-hero-image {
  min-height: 220px;
  max-height: 340px;
}

.image-preview-thumb {
  height: 84px;
}

.brand-manager-logo-fallback,
.mini-product-thumb-fallback,
.comparison-image-fallback,
.comparison-thumb-fallback,
.details-hero-image-fallback,
.image-preview-main-fallback {
  background: linear-gradient(135deg, rgba(180, 35, 24, 0.12), rgba(180, 35, 24, 0.04));
  color: #7a271a;
  border: 1px solid rgba(180, 35, 24, 0.14);
}

@media (max-width: 1360px) {
  .workspace {
    grid-template-columns: 300px minmax(0, 1fr);
  }

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

  .search-field input {
    width: 250px;
  }

  .editor-columns,
  .editor-hero-grid,
  .comparison-grid,
  .matching-grid {
    grid-template-columns: 1fr;
  }

  .details-hero,
  .brand-manager-card,
  .template-row-grid,
  .spec-row-grid,
  .offer-editor-grid,
  .editor-media-link-row,
  .compact-inline-form,
  .compact-inline-form-wide,
  .template-section-head {
    grid-template-columns: 1fr;
  }
}

:root {
  --bg: #eef3f9;
  --bg-accent: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(180, 35, 24, 0.1), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f9 48%, #e6edf7 100%);
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-muted: #eef4ff;
  --border: rgba(15, 23, 42, 0.09);
  --primary: #2563eb;
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.1);
  --shadow-lg: 0 26px 64px rgba(15, 23, 42, 0.12);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.brand-logo {
  display: block;
  width: 132px;
  max-width: 100%;
  max-height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(37, 99, 235, 0.08));
}

.topbar {
  border-color: rgba(37, 99, 235, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 255, 0.82));
}

.toolbar-panel,
.panel,
.stats-card,
.modal-card {
  border-color: rgba(37, 99, 235, 0.08);
}

.search-field input,
.select-field select,
.field input,
.field select,
.field textarea {
  border-color: rgba(37, 99, 235, 0.12);
  background: rgba(248, 251, 255, 0.96);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.primary-button {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.secondary-button {
  color: #1e3a8a;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(180, 35, 24, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.ghost-button {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.danger-button {
  color: var(--danger);
  background: linear-gradient(180deg, rgba(180, 35, 24, 0.12), rgba(180, 35, 24, 0.06));
  border: 1px solid rgba(180, 35, 24, 0.12);
}

.table-badge {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.pill,
.legend-chip {
  background: rgba(37, 99, 235, 0.08);
  color: #1e3a8a;
  border: 1px solid rgba(37, 99, 235, 0.08);
}

.pill-danger,
.legend-chip-dense {
  background: rgba(180, 35, 24, 0.1);
  color: #9f1239;
  border-color: rgba(180, 35, 24, 0.12);
}

.pill-success,
.legend-chip-open {
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
  border-color: rgba(22, 163, 74, 0.12);
}

.section-card,
.info-card,
.taxonomy-item {
  border-color: rgba(37, 99, 235, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.95));
}

.editor-section .panel-heading {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.05), rgba(180, 35, 24, 0.02));
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

.checkbox-card {
  border-color: rgba(37, 99, 235, 0.14);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.05), rgba(255, 255, 255, 0.98));
}

.offer-editor-card,
.spec-row,
.template-row,
.brand-manager-card {
  border-color: rgba(37, 99, 235, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 255, 0.96));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.editor-hero-grid-compact {
  grid-template-columns: 336px minmax(0, 1fr);
}

.editor-columns-balanced {
  align-items: start;
}

.brand-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-manager-copy {
  align-content: start;
}

.brand-manager-logo {
  background: rgba(255, 255, 255, 0.98);
}

.product-editor-card {
  width: min(1220px, calc(100vw - 28px));
}

.matrix-workspace {
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.96));
}

.matrix-board-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.matrix-board-copy {
  display: grid;
  gap: 10px;
}

.matrix-board-copy h3 {
  font-size: 1.2rem;
}

.matrix-metrics,
.matrix-status-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.matrix-status-row {
  margin-bottom: 14px;
}

.matrix-shell-redesigned {
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(180, 35, 24, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.97), rgba(237, 244, 252, 0.95));
}

.matrix-axis-top {
  margin-left: 198px;
  gap: 14px;
}

.matrix-grid-row {
  gap: 14px;
  margin-top: 14px;
}

.matrix-axis-side {
  width: 184px;
  gap: 14px;
}

.matrix-cells {
  gap: 14px;
}

.matrix-axis-top .axis-chip,
.matrix-axis-side .axis-chip {
  min-height: 76px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.95));
  border: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  text-align: left;
  align-content: center;
  justify-content: flex-start;
}

.axis-chip small {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.axis-chip strong {
  display: block;
  color: var(--text);
  line-height: 1.25;
}

.matrix-cell {
  min-height: 228px;
  padding: 14px;
  display: grid;
  gap: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.95));
  border: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.04);
}

.matrix-cell.cell-open {
  background: linear-gradient(180deg, rgba(239, 253, 245, 0.98), rgba(239, 250, 255, 0.94));
  border-color: rgba(22, 163, 74, 0.16);
}

.matrix-cell.cell-balanced {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.95));
}

.matrix-cell.cell-dense {
  background: linear-gradient(180deg, rgba(255, 245, 246, 0.98), rgba(255, 249, 250, 0.94));
  border-color: rgba(180, 35, 24, 0.16);
}

.cell-head {
  align-items: flex-start;
}

.cell-caption {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cell-caption small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cell-caption strong {
  font-size: 0.92rem;
  color: var(--text);
}

.cell-count {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-soft);
  font-weight: 700;
}

.matrix-empty-hint {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(37, 99, 235, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-soft);
}

.matrix-empty-hint strong {
  color: var(--text);
}

.compact-matrix-card {
  position: relative;
  overflow: hidden;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px;
  align-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 255, 0.97));
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  color: var(--text) !important;
}

.compact-matrix-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent);
}

.mini-product-visual,
.mini-product-main,
.mini-product-side {
  position: relative;
  z-index: 1;
}

.mini-product-thumb,
.mini-product-thumb-fallback {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.95);
}

.mini-product-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mini-product-main {
  min-width: 0;
}

.mini-product-meta strong,
.mini-product-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-product-topline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-product-brand-chip,
.mini-product-state {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
}

.mini-product-brand-chip {
  background: var(--card-accent-soft);
  color: var(--text-soft);
}

.mini-product-state {
  background: rgba(180, 35, 24, 0.1);
  color: #9f1239;
}

.mini-product-code {
  color: var(--text-muted);
}

.mini-product-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.mini-product-price {
  font-size: 0.8rem;
  color: var(--text);
}

.mini-product-link {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.matrix-more-badge {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.excel-import-card {
  width: min(1280px, calc(100vw - 28px));
}

.excel-import-body {
  gap: 16px;
}

.excel-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 16px;
}

.excel-preview-panel,
.excel-preview-wrap {
  min-width: 0;
}

.excel-preview-wrap {
  overflow: auto;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
}

.excel-preview-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
}

.excel-preview-table th,
.excel-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-align: left;
  vertical-align: top;
}

.excel-preview-table thead th {
  position: sticky;
  top: 0;
  background: rgba(245, 249, 255, 0.98);
  color: var(--text-soft);
  z-index: 1;
}

.excel-preview-table td {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-mapping-grid {
  display: grid;
  gap: 14px;
  align-content: start;
}

.excel-mapping-section {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.95));
}

@media (max-width: 1360px) {
  .editor-hero-grid-compact,
  .excel-import-grid {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: 116px;
  }
}

.matrix-workspace-compact {
  padding: 14px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 249, 255, 0.96));
}

.matrix-toolbar-dock {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr) auto;
  gap: 12px 14px;
  align-items: start;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.94));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.matrix-toolbar-copy,
.matrix-toolbar-summary,
.matrix-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.matrix-toolbar-copy {
  display: grid;
  gap: 6px;
  align-content: start;
}

.matrix-toolbar-copy h3 {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.matrix-toolbar-summary,
.matrix-toolbar-actions {
  align-content: center;
}

.matrix-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-soft);
  font-size: 0.82rem;
  white-space: nowrap;
}

.matrix-summary-pill strong {
  color: var(--text);
  font-size: 0.9rem;
}

.matrix-summary-pill-danger {
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.12);
}

.matrix-summary-pill-success {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.12);
}

.matrix-board-shell {
  display: grid;
  gap: 10px;
}

.matrix-board-guide {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 2px;
}

.matrix-shell-redesigned {
  position: relative;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.34) 1px, transparent 0) 0 0 / 16px 16px,
    radial-gradient(circle at 72% 50%, rgba(37, 99, 235, 0.08), transparent 30%),
    radial-gradient(circle at 25% 22%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(239, 245, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 22px 40px rgba(15, 23, 42, 0.06);
}

.matrix-shell-redesigned::before,
.matrix-shell-redesigned::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.matrix-shell-redesigned::before {
  inset: 18px 20px auto auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent 68%);
  filter: blur(10px);
  opacity: 0.85;
}

.matrix-shell-redesigned::after {
  inset: auto auto 28px 26px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 35, 24, 0.08), transparent 68%);
  filter: blur(10px);
  opacity: 0.8;
}

.matrix-shell-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.matrix-stage {
  z-index: 1;
}

.matrix-decor {
  position: absolute;
  display: block;
  opacity: 0.65;
}

.matrix-decor-card {
  right: 72px;
  border-radius: 28px;
  border: 1px solid rgba(191, 219, 254, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(219, 234, 254, 0.08));
  box-shadow: 0 24px 44px rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(10px);
}

.matrix-decor-card-a {
  top: 164px;
  width: 160px;
  height: 190px;
  transform: perspective(600px) rotateY(-18deg) rotateX(8deg);
}

.matrix-decor-card-b {
  top: 220px;
  right: 156px;
  width: 112px;
  height: 132px;
  transform: perspective(600px) rotateY(-24deg) rotateX(10deg);
}

.matrix-decor-node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.28);
  box-shadow: 0 0 0 8px rgba(191, 219, 254, 0.16);
}

.matrix-decor-node-a {
  top: 314px;
  right: 188px;
}

.matrix-decor-node-b {
  top: 388px;
  right: 102px;
}

.matrix-axis-top {
  margin-left: 182px;
  gap: 12px;
}

.matrix-axis-side {
  width: 170px;
  gap: 12px;
}

.matrix-grid-row,
.matrix-cells {
  gap: 12px;
}

.axis-chip {
  position: relative;
  overflow: hidden;
}

.axis-chip-top {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(86, 93, 107, 0.96), rgba(76, 85, 99, 0.92));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.axis-chip-top small {
  color: rgba(226, 232, 240, 0.76);
}

.axis-chip-top strong {
  color: #f8fafc;
  font-size: 0.96rem;
}

.axis-chip-copy {
  min-width: 0;
}

.axis-chip-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}

.axis-chip-bars span {
  display: block;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.9), rgba(148, 163, 184, 0.72));
}

.axis-chip-bars span:nth-child(1) {
  height: 22px;
}

.axis-chip-bars span:nth-child(2) {
  height: 30px;
}

.axis-chip-bars span:nth-child(3) {
  height: 18px;
}

.axis-chip-side {
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(96, 165, 250, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.08);
}

.axis-chip-side::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 10px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.84), rgba(37, 99, 235, 0.24));
}

.axis-chip-side small {
  padding-left: 10px;
}

.axis-chip-side strong {
  padding-left: 10px;
  font-size: 0.98rem;
}

.matrix-cell {
  position: relative;
  overflow: hidden;
  min-height: 214px;
  padding: 12px;
  gap: 10px;
  border-radius: 24px;
  border: 1px solid rgba(191, 219, 254, 0.5);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.06);
}

.matrix-cell.cell-open {
  background: linear-gradient(180deg, rgba(226, 240, 253, 0.96), rgba(235, 246, 255, 0.94));
  border-color: rgba(147, 197, 253, 0.58);
}

.matrix-cell.cell-balanced {
  background: linear-gradient(180deg, rgba(233, 242, 252, 0.97), rgba(244, 249, 255, 0.94));
  border-color: rgba(191, 219, 254, 0.55);
}

.matrix-cell.cell-dense {
  background: linear-gradient(180deg, rgba(255, 247, 248, 0.98), rgba(255, 243, 245, 0.95));
  border-color: rgba(252, 165, 165, 0.48);
}

.matrix-cell-glow {
  position: absolute;
  inset: auto -24px -38px auto;
  width: 138px;
  height: 138px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72), transparent 70%);
  opacity: 0.72;
  pointer-events: none;
}

.cell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.cell-caption strong {
  font-size: 0.95rem;
}

.cell-count {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text-soft);
  box-shadow: none;
}

.cell-count-open {
  background: rgba(191, 219, 254, 0.48);
  border-color: rgba(147, 197, 253, 0.44);
  color: #1d4ed8;
}

.cell-count-balanced {
  background: rgba(203, 213, 225, 0.42);
  border-color: rgba(148, 163, 184, 0.24);
}

.cell-count-dense {
  background: rgba(254, 205, 211, 0.62);
  border-color: rgba(248, 113, 113, 0.26);
  color: #b42318;
}

.cell-items {
  position: relative;
}

.matrix-card-stack {
  display: grid;
  gap: 10px;
}

.matrix-empty-hint {
  position: relative;
  min-height: 92px;
  align-content: center;
  justify-items: start;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.38));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.matrix-empty-hint::before {
  content: "";
  position: absolute;
  inset: 50% 18px auto auto;
  width: 84px;
  height: 84px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 6px solid rgba(191, 219, 254, 0.34);
  opacity: 0.5;
}

.matrix-empty-hint strong {
  font-size: 1rem;
}

.matrix-empty-hint small {
  max-width: 180px;
  line-height: 1.35;
}

.compact-matrix-card {
  position: relative;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 72px;
  padding: 9px 10px 9px 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 255, 0.98));
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.compact-matrix-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

.compact-matrix-card::before {
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--card-accent), rgba(255, 255, 255, 0.92));
}

.mini-product-visual {
  display: grid;
  place-items: center;
}

.mini-product-thumb,
.mini-product-thumb-fallback {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.mini-product-main {
  text-align: left;
}

.mini-product-meta {
  gap: 3px;
}

.mini-product-brand-chip,
.mini-product-state {
  font-size: 0.65rem;
  padding: 3px 7px;
}

.mini-product-brand-chip {
  background: var(--card-accent-soft);
  color: var(--text-soft);
}

.mini-product-state {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.mini-product-meta strong {
  font-size: 0.9rem;
  color: var(--text);
}

.mini-product-code {
  color: var(--text-muted);
}

.mini-product-side {
  gap: 7px;
}

.mini-product-price {
  font-size: 0.88rem;
  font-weight: 700;
}

.mini-product-link {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.matrix-more-badge {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text-soft);
  font-size: 0.8rem;
}

.matrix-host:fullscreen {
  background: linear-gradient(180deg, #f4f8fd, #ebf2fa);
}

.matrix-host:fullscreen .matrix-shell-redesigned {
  height: calc(100vh - 196px);
}

@media (max-width: 1440px) {
  .matrix-toolbar-dock {
    grid-template-columns: 1fr;
  }

  .matrix-shell-decor {
    opacity: 0.38;
  }
}

.matrix-workspace-monochrome {
  padding: 12px;
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(250, 250, 251, 0.99), rgba(242, 243, 245, 0.97));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.matrix-toolbar-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  gap: 12px 16px;
  align-items: start;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 247, 248, 0.9));
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.05);
}

.matrix-toolbar-main,
.matrix-toolbar-side {
  display: grid;
  gap: 10px;
}

.matrix-toolbar-copy {
  display: grid;
  gap: 4px;
}

.matrix-toolbar-copy h3 {
  font-size: 1.06rem;
  letter-spacing: -0.02em;
}

.matrix-toolbar-kpis,
.matrix-toolbar-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.matrix-kpi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(17, 24, 39, 0.04);
  color: #4b5563;
  font-size: 0.82rem;
  white-space: nowrap;
}

.matrix-kpi strong {
  color: #111827;
  font-size: 0.9rem;
}

.matrix-kpi-open {
  background: rgba(17, 24, 39, 0.03);
}

.matrix-kpi-dense {
  background: rgba(17, 24, 39, 0.08);
}

.matrix-workspace-monochrome .legend-chip {
  background: rgba(17, 24, 39, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #4b5563;
}

.matrix-workspace-monochrome .legend-chip-open {
  background: rgba(255, 255, 255, 0.72);
  color: #374151;
}

.matrix-workspace-monochrome .legend-chip-dense {
  background: rgba(17, 24, 39, 0.1);
  color: #111827;
}

.matrix-board-shell {
  display: grid;
  gap: 10px;
}

.matrix-board-guide {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 2px;
}

.matrix-shell-monochrome {
  border-radius: 30px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background:
    radial-gradient(circle at 1px 1px, rgba(156, 163, 175, 0.22) 1px, transparent 0) 0 0 / 16px 16px,
    linear-gradient(180deg, rgba(247, 247, 248, 0.98), rgba(239, 240, 242, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 24px 42px rgba(15, 23, 42, 0.06);
}

.matrix-workspace-monochrome .matrix-axis-top {
  margin-left: 168px;
  gap: 10px;
}

.matrix-workspace-monochrome .matrix-axis-side {
  width: 158px;
  gap: 10px;
}

.matrix-workspace-monochrome .matrix-grid-row,
.matrix-workspace-monochrome .matrix-cells {
  gap: 10px;
}

.matrix-workspace-monochrome .axis-chip {
  position: relative;
  overflow: hidden;
}

.matrix-workspace-monochrome .axis-chip-top {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(75, 85, 99, 0.96), rgba(55, 65, 81, 0.94));
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.matrix-workspace-monochrome .axis-chip-top small {
  color: rgba(229, 231, 235, 0.7);
}

.matrix-workspace-monochrome .axis-chip-top strong {
  color: #f9fafb;
  font-size: 0.94rem;
}

.matrix-workspace-monochrome .axis-chip-copy {
  min-width: 0;
}

.matrix-workspace-monochrome .axis-chip-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}

.matrix-workspace-monochrome .axis-chip-bars span {
  display: block;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(229, 231, 235, 0.88), rgba(156, 163, 175, 0.7));
}

.matrix-workspace-monochrome .axis-chip-bars span:nth-child(1) {
  height: 20px;
}

.matrix-workspace-monochrome .axis-chip-bars span:nth-child(2) {
  height: 28px;
}

.matrix-workspace-monochrome .axis-chip-bars span:nth-child(3) {
  height: 16px;
}

.matrix-workspace-monochrome .axis-chip-side {
  min-height: 90px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 248, 249, 0.95));
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.05);
}

.matrix-workspace-monochrome .axis-chip-side::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(75, 85, 99, 0.85), rgba(156, 163, 175, 0.28));
}

.matrix-workspace-monochrome .axis-chip-side small,
.matrix-workspace-monochrome .axis-chip-side strong {
  padding-left: 10px;
}

.matrix-workspace-monochrome .axis-chip-side strong {
  font-size: 0.96rem;
}

.matrix-workspace-monochrome .matrix-cell {
  min-height: 208px;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(244, 245, 247, 0.98), rgba(238, 239, 241, 0.96));
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.05);
}

.matrix-workspace-monochrome .matrix-cell.cell-open {
  background: linear-gradient(180deg, rgba(248, 249, 250, 0.99), rgba(242, 243, 245, 0.96));
}

.matrix-workspace-monochrome .matrix-cell.cell-balanced {
  background: linear-gradient(180deg, rgba(240, 242, 244, 0.98), rgba(235, 236, 239, 0.96));
}

.matrix-workspace-monochrome .matrix-cell.cell-dense {
  background: linear-gradient(180deg, rgba(230, 232, 235, 0.99), rgba(223, 226, 230, 0.96));
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.matrix-workspace-monochrome .cell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.matrix-workspace-monochrome .cell-caption small {
  color: #6b7280;
}

.matrix-workspace-monochrome .cell-caption strong {
  font-size: 0.94rem;
  color: #111827;
}

.matrix-workspace-monochrome .cell-count {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.7);
  color: #374151;
}

.matrix-workspace-monochrome .cell-count-open {
  background: rgba(255, 255, 255, 0.84);
}

.matrix-workspace-monochrome .cell-count-balanced {
  background: rgba(229, 231, 235, 0.82);
}

.matrix-workspace-monochrome .cell-count-dense {
  background: rgba(209, 213, 219, 0.9);
  color: #111827;
}

.matrix-card-stack {
  display: grid;
  gap: 10px;
}

.matrix-workspace-monochrome .matrix-empty-hint {
  min-height: 96px;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(107, 114, 128, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(248, 248, 249, 0.46));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.matrix-workspace-monochrome .matrix-empty-hint strong {
  color: #111827;
  font-size: 0.98rem;
}

.matrix-workspace-monochrome .matrix-empty-hint small {
  max-width: 178px;
  color: #4b5563;
  line-height: 1.35;
}

.compact-matrix-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 72px;
  padding: 10px 10px 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(55, 65, 81, 0.74), rgba(31, 41, 55, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 22px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
  color: #f9fafb;
}

.compact-matrix-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(148, 163, 184, 0.28));
}

.compact-matrix-card:hover {
  transform: translateY(-1px);
}

.compact-matrix-card .mini-product-visual {
  display: grid;
  place-items: center;
}

.compact-matrix-card .mini-product-thumb,
.compact-matrix-card .mini-product-thumb-fallback {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 24, 39, 0.34);
}

.compact-matrix-card .mini-product-main {
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.compact-matrix-card .mini-product-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compact-matrix-card .mini-product-topline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.compact-matrix-card .mini-product-brand-chip,
.compact-matrix-card .mini-product-state {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 600;
}

.compact-matrix-card .mini-product-brand-chip {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(243, 244, 246, 0.92);
}

.compact-matrix-card .mini-product-state {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(229, 231, 235, 0.84);
}

.compact-matrix-card .mini-product-meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f9fafb;
  font-size: 0.9rem;
}

.compact-matrix-card .mini-product-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(209, 213, 219, 0.72);
}

.compact-matrix-card .mini-product-side {
  display: grid;
  gap: 7px;
  justify-items: end;
}

.compact-matrix-card .mini-product-price {
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
}

.compact-matrix-card .mini-product-link {
  background: rgba(255, 255, 255, 0.08);
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.matrix-workspace-monochrome .matrix-more-badge {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.64);
  color: #4b5563;
}

.matrix-host.matrix-workspace-monochrome:fullscreen {
  background: linear-gradient(180deg, #f6f7f8, #eef0f2);
}

.matrix-host.matrix-workspace-monochrome:fullscreen .matrix-shell-monochrome {
  height: calc(100vh - 188px);
}

@media (max-width: 1440px) {
  .matrix-toolbar-panel {
    grid-template-columns: 1fr;
  }
}

.matrix-workspace-monochrome {
  padding: 10px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 248, 249, 0.98), rgba(241, 242, 244, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.matrix-workspace-monochrome .matrix-toolbar-panel {
  gap: 10px 14px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 246, 247, 0.92));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.matrix-workspace-monochrome .matrix-toolbar-main,
.matrix-workspace-monochrome .matrix-toolbar-side,
.matrix-workspace-monochrome .matrix-toolbar-copy {
  gap: 8px;
}

.matrix-workspace-monochrome .matrix-toolbar-copy h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.matrix-workspace-monochrome .matrix-toolbar-kpis,
.matrix-workspace-monochrome .matrix-toolbar-meta,
.matrix-workspace-monochrome .inline-actions,
.matrix-workspace-monochrome .matrix-board-guide {
  gap: 8px;
}

.matrix-workspace-monochrome .matrix-kpi,
.matrix-workspace-monochrome .legend-chip {
  padding: 7px 10px;
  font-size: 0.76rem;
}

.matrix-workspace-monochrome .matrix-kpi strong {
  font-size: 0.84rem;
}

.matrix-workspace-monochrome .matrix-shell-monochrome {
  height: 1060px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 1px 1px, rgba(156, 163, 175, 0.15) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(180deg, rgba(245, 245, 246, 0.98), rgba(238, 239, 241, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 18px 34px rgba(15, 23, 42, 0.05);
}

.matrix-workspace-monochrome .matrix-axis-top {
  margin-left: 160px;
  gap: 10px;
}

.matrix-workspace-monochrome .matrix-axis-side {
  width: 150px;
  gap: 10px;
}

.matrix-workspace-monochrome .axis-chip-top {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 18px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.matrix-workspace-monochrome .axis-chip-top strong {
  font-size: 0.88rem;
}

.matrix-workspace-monochrome .axis-chip-side {
  min-height: 84px;
  padding: 12px;
  border-radius: 20px;
}

.matrix-workspace-monochrome .axis-chip-side strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.matrix-workspace-monochrome .matrix-cell {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-height: 196px;
  padding: 10px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: linear-gradient(180deg, rgba(244, 245, 246, 0.98), rgba(239, 240, 242, 0.96));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.045);
}

.matrix-workspace-monochrome .matrix-cell::after {
  content: "";
  position: absolute;
  inset: auto -18% -30% auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.55;
  filter: blur(26px);
}

.matrix-workspace-monochrome .matrix-cell.cell-open {
  border-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(248, 249, 250, 0.99), rgba(243, 244, 246, 0.98));
}

.matrix-workspace-monochrome .matrix-cell.cell-open::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(226, 232, 240, 0.08) 70%);
}

.matrix-workspace-monochrome .matrix-cell.cell-balanced {
  border-color: rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(242, 243, 245, 0.98), rgba(236, 238, 240, 0.96));
}

.matrix-workspace-monochrome .matrix-cell.cell-balanced::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.42), rgba(203, 213, 225, 0.08) 72%);
}

.matrix-workspace-monochrome .matrix-cell.cell-dense {
  border-color: rgba(107, 114, 128, 0.18);
  background: linear-gradient(180deg, rgba(236, 237, 239, 0.98), rgba(229, 231, 235, 0.97));
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.06);
}

.matrix-workspace-monochrome .matrix-cell.cell-dense::after {
  background: radial-gradient(circle, rgba(209, 213, 219, 0.34), rgba(107, 114, 128, 0.06) 72%);
}

.matrix-workspace-monochrome .cell-head {
  gap: 8px;
  margin-bottom: 0;
}

.matrix-workspace-monochrome .cell-caption {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.matrix-workspace-monochrome .cell-caption small {
  font-size: 0.68rem;
}

.matrix-workspace-monochrome .cell-caption strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.matrix-workspace-monochrome .cell-count {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  font-size: 0.74rem;
}

.matrix-workspace-monochrome .cell-items {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
}

.matrix-card-stack {
  gap: 8px;
}

.matrix-workspace-monochrome .matrix-empty-hint {
  min-height: 84px;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(248, 248, 249, 0.44));
}

.matrix-workspace-monochrome .matrix-empty-hint strong {
  font-size: 0.9rem;
}

.matrix-workspace-monochrome .matrix-empty-hint small {
  max-width: 170px;
  font-size: 0.74rem;
  line-height: 1.35;
}

.compact-matrix-card {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 60px;
  padding: 8px 8px 8px 10px;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 18px rgba(15, 23, 42, 0.14);
}

.compact-matrix-card::before {
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(148, 163, 184, 0.16));
}

.compact-matrix-card .mini-product-thumb,
.compact-matrix-card .mini-product-thumb-fallback {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.compact-matrix-card .mini-product-main,
.compact-matrix-card .mini-product-meta {
  min-width: 0;
}

.compact-matrix-card .mini-product-meta {
  gap: 2px;
}

.compact-matrix-card .mini-product-topline {
  gap: 5px;
}

.compact-matrix-card .mini-product-brand-chip,
.compact-matrix-card .mini-product-state {
  padding: 2px 6px;
  font-size: 0.58rem;
}

.compact-matrix-card .mini-product-meta strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  text-overflow: clip;
  font-size: 0.76rem;
  line-height: 1.2;
}

.compact-matrix-card .mini-product-code {
  font-size: 0.62rem;
  line-height: 1.2;
}

.compact-matrix-card .mini-product-side {
  gap: 6px;
  align-content: start;
}

.compact-matrix-card .mini-product-price {
  font-size: 0.74rem;
  line-height: 1.1;
  text-align: right;
}

.compact-matrix-card .mini-product-link {
  width: 26px;
  min-width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 9px;
}

.matrix-workspace-monochrome .matrix-more-badge {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 0.72rem;
}

.matrix-host.matrix-workspace-monochrome:fullscreen .matrix-shell-monochrome {
  height: calc(100vh - 172px);
}

@media (max-width: 1440px) {
  .matrix-workspace-monochrome .matrix-shell-monochrome {
    height: 980px;
  }
}

:root {
  --bg: #f6f8fb;
  --bg-accent: radial-gradient(circle at top left, rgba(66, 133, 244, 0.05), transparent 24%),
    radial-gradient(circle at top right, rgba(52, 168, 83, 0.035), transparent 18%),
    linear-gradient(180deg, #fbfcfe 0%, #f5f7fa 44%, #eef2f7 100%);
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-muted: #f1f3f4;
  --border: rgba(60, 64, 67, 0.12);
  --text: #202124;
  --text-soft: #3c4043;
  --text-muted: #5f6368;
  --primary: #6e84a3;
  --danger: #c26464;
  --danger-soft: rgba(194, 100, 100, 0.1);
  --success: #6f9c83;
  --success-soft: rgba(111, 156, 131, 0.12);
  --warning: #b28e5d;
  --shadow-lg: 0 18px 40px rgba(60, 64, 67, 0.12);
  --shadow-md: 0 10px 24px rgba(60, 64, 67, 0.08);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

html,
body {
  background: var(--bg-accent);
}

.app-shell {
  padding: 24px;
}

.topbar,
.panel,
.stats-card,
.modal-card {
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84));
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
  box-shadow: var(--shadow-lg);
}

.brand-badge {
  background: linear-gradient(135deg, #6e84a3, #8399b8);
}

.search-field input,
.select-field select,
.field input,
.field select,
.field textarea {
  border-color: rgba(60, 64, 67, 0.14);
  background: rgba(255, 255, 255, 0.98);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(110, 132, 163, 0.42);
  box-shadow: 0 0 0 4px rgba(110, 132, 163, 0.12);
}

.segmented-control {
  background: #eef2f5;
  border-color: rgba(60, 64, 67, 0.1);
}

.segment {
  color: var(--text-soft);
}

.segment.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  border: 1px solid transparent;
  font-weight: 600;
}

.primary-button {
  color: #fff;
  border-color: rgba(110, 132, 163, 0.24);
  background: linear-gradient(180deg, #7b91af, #6e84a3);
  box-shadow: 0 8px 18px rgba(110, 132, 163, 0.18);
}

.secondary-button {
  color: var(--text-soft);
  border-color: rgba(60, 64, 67, 0.12);
  background: rgba(255, 255, 255, 0.94);
}

.ghost-button {
  color: var(--text-soft);
  border-color: rgba(60, 64, 67, 0.08);
  background: rgba(255, 255, 255, 0.58);
}

.danger-button {
  color: var(--danger);
  border-color: rgba(194, 100, 100, 0.16);
  background: rgba(194, 100, 100, 0.08);
}

.matrix-workspace-google {
  padding: 10px;
  border-radius: 24px;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background: linear-gradient(180deg, rgba(251, 252, 254, 0.98), rgba(244, 247, 250, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.matrix-workspace-google .matrix-toolbar-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  gap: 10px 14px;
  align-items: start;
  margin-bottom: 10px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 249, 250, 0.94));
  box-shadow: 0 8px 20px rgba(60, 64, 67, 0.06);
}

.matrix-workspace-google .matrix-toolbar-main,
.matrix-workspace-google .matrix-toolbar-side,
.matrix-workspace-google .matrix-toolbar-copy {
  display: grid;
  gap: 8px;
}

.matrix-workspace-google .matrix-toolbar-copy h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.matrix-workspace-google .matrix-toolbar-kpis,
.matrix-workspace-google .matrix-toolbar-meta,
.matrix-workspace-google .inline-actions,
.matrix-workspace-google .matrix-board-guide {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.matrix-workspace-google .matrix-kpi,
.matrix-workspace-google .legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-soft);
  font-size: 0.76rem;
}

.matrix-workspace-google .matrix-kpi strong {
  color: var(--text);
  font-size: 0.84rem;
}

.matrix-workspace-google .legend-chip-open {
  background: rgba(232, 245, 233, 0.72);
  border-color: rgba(111, 156, 131, 0.18);
}

.matrix-workspace-google .legend-chip-dense {
  background: rgba(241, 243, 244, 0.92);
}

.matrix-workspace-google .matrix-board-shell {
  display: grid;
  gap: 10px;
}

.matrix-shell-google {
  position: relative;
  height: 1080px;
  overflow: auto;
  padding: 12px;
  border-radius: 26px;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background:
    radial-gradient(circle at 1px 1px, rgba(189, 193, 198, 0.18) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(180deg, rgba(250, 251, 252, 0.98), rgba(243, 246, 249, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 16px 30px rgba(60, 64, 67, 0.06);
  scrollbar-color: rgba(95, 99, 104, 0.28) transparent;
}

.matrix-shell-google.grab {
  cursor: default;
}

.matrix-shell-google.grabbing {
  cursor: grabbing;
}

.matrix-board-google {
  position: relative;
  display: grid;
  gap: var(--matrix-gap, 12px);
  align-content: start;
  grid-auto-rows: minmax(var(--matrix-cell-height, 178px), auto);
  min-width: max-content;
  padding-bottom: 2px;
}

.matrix-corner-chip {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 6;
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: var(--matrix-header-height, 66px);
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(60, 64, 67, 0.08);
}

.matrix-corner-copy {
  display: grid;
  gap: 4px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.matrix-board-google .axis-chip-top,
.matrix-board-google .axis-chip-side-sticky {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(60, 64, 67, 0.06);
}

.matrix-board-google .axis-chip-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: var(--matrix-header-height, 66px);
  padding: 12px 14px;
  border-radius: 20px;
}

.matrix-board-google .axis-chip-copy {
  min-width: 0;
}

.matrix-board-google .axis-chip-top small,
.matrix-board-google .axis-chip-side-sticky small {
  display: block;
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.matrix-board-google .axis-chip-top strong,
.matrix-board-google .axis-chip-side-sticky strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.18;
}

.matrix-board-google .axis-chip-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 24px;
}

.matrix-board-google .axis-chip-bars span {
  display: block;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(95, 99, 104, 0.68), rgba(189, 193, 198, 0.9));
}

.matrix-board-google .axis-chip-bars span:nth-child(1) {
  height: 14px;
}

.matrix-board-google .axis-chip-bars span:nth-child(2) {
  height: 22px;
}

.matrix-board-google .axis-chip-bars span:nth-child(3) {
  height: 18px;
}

.matrix-board-google .axis-chip-side-sticky {
  position: sticky;
  left: 0;
  z-index: 4;
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: var(--matrix-cell-height, 178px);
  padding: 14px 14px 14px 18px;
  border-radius: 22px;
}

.matrix-board-google .axis-chip-side-sticky::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(95, 99, 104, 0.6), rgba(189, 193, 198, 0.3));
}

.matrix-board-google .axis-chip-side-sticky small,
.matrix-board-google .axis-chip-side-sticky strong {
  padding-left: 10px;
}

.matrix-workspace-google .matrix-cell {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-height: var(--matrix-cell-height, 178px);
  padding: 10px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 6px 18px rgba(60, 64, 67, 0.05);
}

.matrix-workspace-google .matrix-cell::after {
  content: "";
  position: absolute;
  inset: auto -24px -34px auto;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.34;
  pointer-events: none;
}

.matrix-workspace-google .matrix-cell.cell-open {
  background: linear-gradient(180deg, rgba(244, 251, 246, 0.98), rgba(236, 246, 239, 0.94));
  border-color: rgba(111, 156, 131, 0.18);
}

.matrix-workspace-google .matrix-cell.cell-open::after {
  background: radial-gradient(circle, rgba(226, 239, 228, 0.85), rgba(226, 239, 228, 0) 72%);
}

.matrix-workspace-google .matrix-cell.cell-balanced {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
}

.matrix-workspace-google .matrix-cell.cell-balanced::after {
  background: radial-gradient(circle, rgba(234, 241, 248, 0.55), rgba(234, 241, 248, 0) 72%);
}

.matrix-workspace-google .matrix-cell.cell-dense {
  background: linear-gradient(180deg, rgba(244, 246, 248, 0.96), rgba(236, 239, 243, 0.95));
  border-color: rgba(60, 64, 67, 0.1);
}

.matrix-workspace-google .matrix-cell.cell-dense::after {
  background: radial-gradient(circle, rgba(214, 221, 230, 0.6), rgba(214, 221, 230, 0) 72%);
}

.matrix-workspace-google .cell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.matrix-workspace-google .cell-caption {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.matrix-workspace-google .cell-caption small {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.matrix-workspace-google .cell-caption strong {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.18;
}

.matrix-workspace-google .cell-count {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-soft);
  font-size: 0.72rem;
}

.matrix-workspace-google .cell-items,
.matrix-workspace-google .matrix-card-stack {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
}

.matrix-workspace-google .matrix-empty-hint {
  min-height: 84px;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 14px;
  border-radius: 18px;
  border: 1px dashed rgba(111, 156, 131, 0.18);
  background: rgba(255, 255, 255, 0.52);
}

.matrix-workspace-google .matrix-empty-hint strong {
  font-size: 0.9rem;
  color: var(--text);
}

.matrix-workspace-google .matrix-empty-hint small {
  max-width: 170px;
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.35;
}

.matrix-workspace-google .matrix-more-badge {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-soft);
  font-size: 0.72rem;
}

.matrix-workspace-google .matrix-product-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 58px;
  padding: 8px 8px 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(110, 132, 163, 0.12);
  background: linear-gradient(180deg, rgba(243, 247, 252, 0.98), rgba(236, 242, 249, 0.95));
  box-shadow: 0 4px 12px rgba(110, 132, 163, 0.08);
  color: var(--text);
}

.matrix-workspace-google .matrix-product-card::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(110, 132, 163, 0.66), rgba(167, 185, 205, 0.24));
}

.matrix-workspace-google .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-product-card .mini-product-thumb-fallback {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(60, 64, 67, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.matrix-workspace-google .matrix-product-card .mini-product-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-topline {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.matrix-workspace-google .matrix-product-card .mini-product-brand-chip,
.matrix-workspace-google .matrix-product-card .mini-product-state {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 600;
}

.matrix-workspace-google .matrix-product-card .mini-product-brand-chip {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-soft);
}

.matrix-workspace-google .matrix-product-card .mini-product-state {
  background: rgba(110, 132, 163, 0.12);
  color: #5f738d;
}

.matrix-workspace-google .matrix-product-card .mini-product-main {
  min-width: 0;
  color: inherit;
}

.matrix-workspace-google .matrix-product-card .mini-product-meta strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.18;
}

.matrix-workspace-google .matrix-product-card .mini-product-code {
  color: var(--text-muted);
  font-size: 0.62rem;
  line-height: 1.2;
}

.matrix-workspace-google .matrix-product-card .mini-product-side {
  display: grid;
  gap: 6px;
  justify-items: end;
  align-content: start;
}

.matrix-workspace-google .matrix-product-card .mini-product-price {
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.1;
  text-align: right;
}

.matrix-workspace-google .matrix-product-card .mini-product-link {
  width: 26px;
  min-width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(60, 64, 67, 0.1);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text-soft);
}

.matrix-host.matrix-workspace-google:fullscreen {
  background: linear-gradient(180deg, #fbfcfe, #eef2f7);
}

.matrix-host.matrix-workspace-google:fullscreen .matrix-shell-google {
  height: calc(100vh - 172px);
}

@media (max-width: 1440px) {
  .matrix-workspace-google .matrix-toolbar-panel {
    grid-template-columns: 1fr;
  }

  .matrix-shell-google {
    height: 980px;
  }
}

:root {
  --bg: #f5f6f7;
  --bg-accent: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 52%, #eef1f4 100%);
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-muted: #f3f4f5;
  --border: rgba(60, 64, 67, 0.12);
  --text: #202124;
  --text-soft: #3c4043;
  --text-muted: #5f6368;
  --primary: #5f6368;
  --danger: #b76a6a;
  --danger-soft: rgba(183, 106, 106, 0.1);
  --success: #6c8a72;
  --success-soft: rgba(108, 138, 114, 0.1);
  --warning: #9b845f;
  --shadow-lg: 0 10px 24px rgba(60, 64, 67, 0.08);
  --shadow-md: 0 4px 14px rgba(60, 64, 67, 0.05);
}

.topbar,
.panel,
.stats-card,
.modal-card {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
}

.topbar {
  box-shadow: var(--shadow-lg);
}

.primary-button {
  border-color: rgba(95, 99, 104, 0.18);
  background: #5f6368;
  box-shadow: none;
}

.secondary-button,
.ghost-button {
  color: var(--text-soft);
  border-color: rgba(60, 64, 67, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

.segment.active {
  box-shadow: none;
}

.matrix-workspace-google {
  padding: 8px;
  border-radius: 18px;
  border-color: rgba(60, 64, 67, 0.08);
  background: #f7f8f9;
  box-shadow: none;
}

.matrix-workspace-google .matrix-toolbar-panel {
  gap: 8px 12px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: none;
}

.matrix-workspace-google .matrix-toolbar-copy h3 {
  font-size: 0.96rem;
}

.matrix-workspace-google .matrix-toolbar-kpis,
.matrix-workspace-google .matrix-toolbar-meta,
.matrix-workspace-google .inline-actions,
.matrix-workspace-google .matrix-board-guide {
  gap: 6px;
}

.matrix-workspace-google .matrix-kpi,
.matrix-workspace-google .legend-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.72rem;
}

.matrix-workspace-google .legend-chip-open {
  background: #f8fbf8;
  border-color: rgba(108, 138, 114, 0.18);
}

.matrix-workspace-google .legend-chip-dense {
  background: #f3f4f5;
}

.matrix-shell-google {
  height: 1040px;
  padding: 8px;
  border-radius: 18px;
  border-color: rgba(60, 64, 67, 0.08);
  background: #f7f8f9;
  box-shadow: none;
  overscroll-behavior: contain;
}

.matrix-board-google {
  transform: none !important;
  grid-auto-rows: auto;
  will-change: auto;
}

.matrix-corner-chip {
  gap: 4px;
  min-height: var(--matrix-header-height, 48px);
  padding: 8px 10px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

.matrix-corner-chip small {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.matrix-corner-copy {
  gap: 2px;
  font-size: 0.68rem;
}

.matrix-board-google .axis-chip-top,
.matrix-board-google .axis-chip-side-sticky {
  border-color: rgba(60, 64, 67, 0.08);
  background: #ffffff;
  box-shadow: none;
}

.matrix-board-google .axis-chip-top {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  min-height: var(--matrix-header-height, 48px);
  padding: 8px 10px;
  border-radius: 14px;
}

.matrix-board-google .axis-chip-bars {
  display: none;
}

.matrix-board-google .axis-chip-top small,
.matrix-board-google .axis-chip-side-sticky small {
  margin-bottom: 1px;
  font-size: 0.62rem;
}

.matrix-board-google .axis-chip-top strong,
.matrix-board-google .axis-chip-side-sticky strong {
  font-size: 0.78rem;
  line-height: 1.15;
}

.matrix-board-google .axis-chip-side-sticky {
  gap: 1px;
  min-height: var(--matrix-cell-height, 156px);
  padding: 8px 10px 8px 12px;
  border-radius: 14px;
}

.matrix-board-google .axis-chip-side-sticky::before {
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #d3d7dc;
}

.matrix-board-google .axis-chip-side-sticky small,
.matrix-board-google .axis-chip-side-sticky strong {
  padding-left: 8px;
}

.matrix-workspace-google .matrix-cell {
  gap: 6px;
  min-height: var(--matrix-cell-height, 156px);
  padding: 8px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

.matrix-workspace-google .matrix-cell::after {
  display: none;
}

.matrix-workspace-google .matrix-cell.cell-open {
  background: #f9fcf9;
  border-color: rgba(108, 138, 114, 0.16);
}

.matrix-workspace-google .matrix-cell.cell-balanced {
  background: #ffffff;
}

.matrix-workspace-google .matrix-cell.cell-dense {
  background: #f5f6f7;
  border-color: rgba(60, 64, 67, 0.1);
}

.matrix-workspace-google .cell-caption small {
  font-size: 0.62rem;
}

.matrix-workspace-google .cell-caption strong {
  font-size: 0.78rem;
}

.matrix-workspace-google .cell-count {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: #f3f4f5;
  font-size: 0.68rem;
}

.matrix-workspace-google .matrix-empty-hint {
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(249, 252, 249, 0.9);
}

.matrix-workspace-google .matrix-empty-hint strong {
  font-size: 0.82rem;
}

.matrix-workspace-google .matrix-empty-hint small {
  font-size: 0.68rem;
  line-height: 1.28;
}

.matrix-workspace-google .matrix-more-badge {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.68rem;
}

.matrix-workspace-google .matrix-product-card {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 6px;
  min-height: 52px;
  padding: 6px 6px 6px 8px;
  border-radius: 12px;
  border-color: rgba(60, 64, 67, 0.1);
  background: #ffffff;
  box-shadow: none;
}

.matrix-workspace-google .matrix-product-card::before {
  inset: 6px auto 6px 0;
  width: 2px;
  background: #d3d7dc;
}

.matrix-workspace-google .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-product-card .mini-product-thumb-fallback {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.matrix-workspace-google .matrix-product-card .mini-product-brand-chip,
.matrix-workspace-google .matrix-product-card .mini-product-state {
  padding: 2px 5px;
  font-size: 0.54rem;
}

.matrix-workspace-google .matrix-product-card .mini-product-brand-chip {
  background: #f3f4f5;
}

.matrix-workspace-google .matrix-product-card .mini-product-state {
  background: #eef1f4;
  color: var(--text-muted);
}

.matrix-workspace-google .matrix-product-card .mini-product-meta strong {
  font-size: 0.7rem;
}

.matrix-workspace-google .matrix-product-card .mini-product-code {
  font-size: 0.58rem;
}

.matrix-workspace-google .matrix-product-card .mini-product-price {
  font-size: 0.7rem;
}

.matrix-workspace-google .matrix-product-card .mini-product-link {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #f8f9fa;
}

.matrix-host.matrix-workspace-google:fullscreen .matrix-shell-google {
  height: calc(100vh - 156px);
}

@media (max-width: 1440px) {
  .matrix-shell-google {
    height: 940px;
  }
}

.matrix-corner-chip {
  min-height: auto;
  padding: 4px 8px;
  border-radius: 10px;
}

.matrix-corner-chip small {
  display: none;
}

.matrix-corner-copy {
  gap: 0;
  font-size: 0.62rem;
  line-height: 1.15;
}

.matrix-board-google .axis-chip-top {
  min-height: var(--matrix-header-height, 28px);
  padding: 5px 8px;
  border-radius: 10px;
  align-content: center;
}

.matrix-board-google .axis-chip-top small {
  display: none;
}

.matrix-board-google .axis-chip-top strong {
  font-size: 0.74rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-workspace-google .legend-chip-dense {
  background: #faf1f1;
  border-color: rgba(183, 106, 106, 0.16);
  color: #7b5555;
}

.matrix-workspace-google .matrix-cell.cell-dense {
  background: #fbf4f4;
  border-color: rgba(183, 106, 106, 0.16);
}

.matrix-workspace-google .cell-count-dense {
  background: #f6eaea;
  border-color: rgba(183, 106, 106, 0.18);
  color: #7b5555;
}

body.matrix-fullscreen-lock {
  overflow: hidden;
}

body.matrix-fullscreen-lock .content-area {
  overflow: visible;
}

body.matrix-fullscreen-lock #content-panel {
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#content-panel.matrix-panel-unframed {
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.matrix-fullscreen-viewport {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  padding: 12px;
  background: rgba(245, 246, 247, 0.98);
}

.matrix-fullscreen-viewport .matrix-host.matrix-pseudo-fullscreen {
  position: relative;
  inset: auto;
  z-index: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px;
  border-radius: 0;
  background: #f5f6f7;
  box-shadow: none;
}

.matrix-fullscreen-viewport .matrix-host.matrix-pseudo-fullscreen .matrix-shell-google {
  height: calc(100vh - 148px);
}

.matrix-workspace-google .matrix-product-card {
  align-items: start;
  border-color: rgba(60, 64, 67, 0.12);
  background: #ffffff;
}

.matrix-workspace-google .matrix-product-card .mini-product-main {
  min-width: 0;
  display: grid;
  gap: max(3px, calc(var(--matrix-card-gap, 6px) - 2px));
  align-content: start;
  text-align: left;
}

.matrix-workspace-google .matrix-product-card .mini-product-meta {
  display: grid;
  gap: max(2px, calc(var(--matrix-card-gap, 6px) - 3px));
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}

.matrix-workspace-google .matrix-product-card .mini-product-chip-row {
  min-width: 0;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.matrix-workspace-google .matrix-product-card .mini-product-brand-chip,
.matrix-workspace-google .matrix-product-card .mini-product-state {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-workspace-google .matrix-product-card .mini-product-price-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
  color: var(--text);
  font-size: var(--matrix-card-price-size, 0.7rem);
  line-height: 1.08;
  font-weight: 700;
}

.matrix-workspace-google .matrix-product-card .mini-product-meta strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  word-break: break-word;
  font-size: var(--matrix-card-title-size, 0.7rem);
  line-height: 1.18;
}

.matrix-workspace-google .matrix-product-card .mini-product-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

.matrix-workspace-google .matrix-product-card .mini-product-side {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 4px;
}

.matrix-workspace-google .matrix-product-card .mini-product-link {
  align-self: start;
}

.matrix-workspace-google .matrix-product-card-compact {
  grid-template-columns: max(26px, calc(var(--matrix-card-thumb, 30px) - 2px)) minmax(0, 1fr) auto;
  min-height: max(40px, calc(var(--matrix-card-min-height, 52px) - 8px));
  background: #f8f9fa;
  border-color: rgba(60, 64, 67, 0.08);
}

.matrix-workspace-google .matrix-product-card-compact .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-compact .mini-product-thumb-fallback {
  width: max(26px, calc(var(--matrix-card-thumb, 30px) - 2px));
  height: max(26px, calc(var(--matrix-card-thumb, 30px) - 2px));
}

.matrix-workspace-google .matrix-product-card-compact .mini-product-main {
  align-self: center;
  gap: 2px;
}

.matrix-workspace-google .matrix-product-card-compact .mini-product-meta strong {
  -webkit-line-clamp: 1;
  font-size: calc(var(--matrix-card-title-size, 0.7rem) - 0.02rem);
  line-height: 1.15;
}

.matrix-workspace-google .matrix-product-card-compact .mini-product-code {
  font-size: calc(var(--matrix-card-code-size, 0.58rem) - 0.01rem);
}

.matrix-workspace-google .matrix-product-card-compact .mini-product-side {
  align-self: center;
}

.matrix-workspace-google .matrix-product-card-compact .mini-product-price {
  font-size: calc(var(--matrix-card-price-size, 0.7rem) - 0.02rem);
  line-height: 1.05;
}

.matrix-board-google .axis-chip-top {
  min-height: var(--matrix-header-height, 28px);
  padding: max(4px, var(--matrix-card-padding-y, 6px)) max(6px, var(--matrix-card-padding-x, 8px));
}

.matrix-board-google .axis-chip-top strong,
.matrix-board-google .axis-chip-side-sticky strong {
  font-size: var(--matrix-axis-title-size, 0.74rem);
  line-height: 1.08;
}

.matrix-board-google .axis-chip-top small,
.matrix-board-google .axis-chip-side-sticky small {
  font-size: var(--matrix-axis-meta-size, 0.62rem);
}

.matrix-board-google .axis-chip-side-sticky {
  padding: max(6px, var(--matrix-card-padding-y, 6px)) max(8px, var(--matrix-card-padding-x, 8px)) max(6px, var(--matrix-card-padding-y, 6px)) calc(max(8px, var(--matrix-card-padding-x, 8px)) + 4px);
}

.matrix-workspace-google .cell-caption small {
  font-size: var(--matrix-cell-meta-size, 0.62rem);
}

.matrix-workspace-google .cell-caption strong {
  font-size: var(--matrix-cell-title-size, 0.78rem);
  line-height: 1.12;
}

.matrix-workspace-google .cell-count {
  min-width: var(--matrix-count-size, 24px);
  height: var(--matrix-count-size, 24px);
  padding: 0 max(5px, calc(var(--matrix-card-padding-x, 8px) - 2px));
  font-size: calc(var(--matrix-cell-meta-size, 0.62rem) + 0.04rem);
}

.matrix-workspace-google .matrix-card-stack {
  gap: max(5px, calc(var(--matrix-card-gap, 6px) - 1px));
}

.matrix-workspace-google .matrix-empty-hint {
  min-height: calc(var(--matrix-card-min-height, 52px) + 18px);
  padding: max(8px, calc(var(--matrix-card-padding-y, 6px) + 4px)) max(10px, calc(var(--matrix-card-padding-x, 8px) + 2px));
}

.matrix-workspace-google .matrix-empty-hint strong {
  font-size: calc(var(--matrix-card-title-size, 0.7rem) + 0.1rem);
}

.matrix-workspace-google .matrix-empty-hint small {
  font-size: calc(var(--matrix-card-code-size, 0.58rem) + 0.04rem);
}

.matrix-workspace-google .matrix-more-badge {
  min-height: calc(var(--matrix-count-size, 24px) - 2px);
  font-size: var(--matrix-card-code-size, 0.58rem);
}

.matrix-workspace-google .matrix-product-card {
  grid-template-columns: var(--matrix-card-thumb, 30px) minmax(0, 1fr) auto;
  gap: var(--matrix-card-gap, 6px);
  min-height: var(--matrix-card-min-height, 52px);
  padding: var(--matrix-card-padding-y, 6px) var(--matrix-card-padding-x, 8px) var(--matrix-card-padding-y, 6px) var(--matrix-card-padding-x, 8px);
}

.matrix-workspace-google .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-product-card .mini-product-thumb-fallback {
  width: var(--matrix-card-thumb, 30px);
  height: var(--matrix-card-thumb, 30px);
}

.matrix-workspace-google .matrix-product-card .mini-product-topline {
  gap: max(4px, calc(var(--matrix-card-gap, 6px) - 1px));
}

.matrix-workspace-google .matrix-product-card .mini-product-brand-chip,
.matrix-workspace-google .matrix-product-card .mini-product-state {
  font-size: var(--matrix-card-chip-size, 0.54rem);
  padding: 2px max(4px, calc(var(--matrix-card-padding-x, 8px) - 3px));
}

.matrix-workspace-google .matrix-product-card .mini-product-meta strong {
  font-size: var(--matrix-card-title-size, 0.7rem);
  line-height: 1.14;
}

.matrix-workspace-google .matrix-product-card .mini-product-code {
  font-size: var(--matrix-card-code-size, 0.58rem);
  line-height: 1.15;
}

.matrix-workspace-google .matrix-product-card .mini-product-price {
  font-size: var(--matrix-card-price-size, 0.7rem);
  line-height: 1.08;
}

.matrix-workspace-google .matrix-product-card .mini-product-link {
  width: max(22px, calc(var(--matrix-card-thumb, 30px) - 6px));
  min-width: max(22px, calc(var(--matrix-card-thumb, 30px) - 6px));
  height: max(22px, calc(var(--matrix-card-thumb, 30px) - 6px));
}

.details-hero {
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 18px;
}

.details-hero-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 14px;
  min-width: 0;
}

.details-media-card {
  min-width: 0;
  border: 1px solid rgba(60, 64, 67, 0.12);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.details-media-card-product {
  min-height: 260px;
  background: #f8f9fa;
}

.details-media-card-product .details-hero-image,
.details-media-card-product .details-hero-image-fallback {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: contain;
}

.details-media-card-brand {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 14px;
}

.details-brand-logo-wrap {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 18px;
  background: #f8f9fa;
}

.details-brand-logo-image {
  display: block;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}

.details-brand-logo-label {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.matrix-workspace-google .matrix-product-card,
.matrix-workspace-google .matrix-product-card-compact {
  grid-template-columns: var(--matrix-card-thumb, 30px) minmax(0, 1fr) auto;
  align-items: start;
  gap: max(6px, var(--matrix-card-gap, 6px));
  padding: max(6px, var(--matrix-card-padding-y, 6px)) max(8px, var(--matrix-card-padding-x, 8px));
  min-height: max(52px, var(--matrix-card-min-height, 52px));
  border-radius: 14px;
  border: 1px solid rgba(60, 64, 67, 0.12);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.matrix-workspace-google .matrix-product-card-compact {
  min-height: max(46px, calc(var(--matrix-card-min-height, 52px) - 6px));
  background: #fbfbfb;
}

.matrix-workspace-google .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-product-card .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-product-card-compact .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-compact .mini-product-thumb-fallback {
  width: var(--matrix-card-thumb, 30px);
  height: var(--matrix-card-thumb, 30px);
  border-radius: 10px;
}

.matrix-workspace-google .matrix-product-card .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-product-card-compact .mini-product-thumb-fallback {
  font-size: calc(var(--matrix-card-code-size, 0.58rem) + 0.08rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.matrix-workspace-google .matrix-product-card .mini-product-main,
.matrix-workspace-google .matrix-product-card-compact .mini-product-main {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.matrix-workspace-google .matrix-product-card .mini-product-meta,
.matrix-workspace-google .matrix-product-card-compact .mini-product-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-chip-row,
.matrix-workspace-google .matrix-product-card-compact .mini-product-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-brand-chip,
.matrix-workspace-google .matrix-product-card .mini-product-state,
.matrix-workspace-google .matrix-product-card-compact .mini-product-brand-chip,
.matrix-workspace-google .matrix-product-card-compact .mini-product-state {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--matrix-card-chip-size, 0.54rem);
  padding: 2px 6px;
}

.matrix-workspace-google .matrix-product-card .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-compact .mini-product-title-link {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  font-size: var(--matrix-card-title-size, 0.72rem);
  line-height: 1.2;
  font-weight: 600;
  color: #202124;
  word-break: break-word;
}

.matrix-workspace-google .matrix-product-card-compact .mini-product-title-link {
  -webkit-line-clamp: 1;
}

.matrix-workspace-google .matrix-product-card .mini-product-footer-row,
.matrix-workspace-google .matrix-product-card-compact .mini-product-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-code,
.matrix-workspace-google .matrix-product-card-compact .mini-product-code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: var(--matrix-card-code-size, 0.58rem);
  line-height: 1.12;
}

.matrix-workspace-google .matrix-product-card .mini-product-price,
.matrix-workspace-google .matrix-product-card-compact .mini-product-price {
  flex: none;
  white-space: nowrap;
  color: #202124;
  font-size: var(--matrix-card-price-size, 0.68rem);
  line-height: 1;
  font-weight: 700;
}

.matrix-workspace-google .matrix-product-card .mini-product-side,
.matrix-workspace-google .matrix-product-card-compact .mini-product-side {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.matrix-workspace-google .matrix-product-card .mini-product-link,
.matrix-workspace-google .matrix-product-card-compact .mini-product-link {
  width: max(22px, calc(var(--matrix-card-thumb, 30px) - 6px));
  min-width: max(22px, calc(var(--matrix-card-thumb, 30px) - 6px));
  height: max(22px, calc(var(--matrix-card-thumb, 30px) - 6px));
  border: 1px solid rgba(60, 64, 67, 0.12);
  background: #fff;
}

.matrix-workspace-google .mini-product-main:hover .mini-product-title-link {
  text-decoration: underline;
}

.matrix-workspace-google .matrix-more-badge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(60, 64, 67, 0.12);
  background: #fff;
  color: var(--text-soft);
}

@media (max-width: 960px) {
  .details-hero {
    grid-template-columns: 1fr;
  }

  .details-hero-visuals {
    grid-template-columns: 1fr;
  }
}

.table-thumb-cell {
  width: 72px;
}

.table-thumb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.table-product-thumb,
.table-product-thumb-fallback {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(60, 64, 67, 0.12);
  background: #fff;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.table-product-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8c1d18;
}

.table-brand-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(60, 64, 67, 0.12);
  background: #fff;
}

.table-brand-logo {
  display: block;
  max-width: 64px;
  max-height: 22px;
  object-fit: contain;
}

.table-name-stack {
  display: grid;
  gap: 4px;
}

.matrix-workspace-google .matrix-cell.is-expanded {
  box-shadow: inset 0 0 0 1px rgba(60, 64, 67, 0.08);
}

.matrix-workspace-google .matrix-card-stack {
  align-content: start;
  gap: max(6px, calc(var(--matrix-card-gap, 6px) - 1px));
}

.matrix-workspace-google .matrix-more-toggle {
  cursor: pointer;
  justify-content: center;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.matrix-workspace-google .matrix-more-toggle:hover {
  background: #f6f7f8;
  border-color: rgba(60, 64, 67, 0.2);
  color: var(--text);
}

.matrix-workspace-google .matrix-product-card,
.matrix-workspace-google .matrix-product-card-compact {
  align-items: center;
}

.matrix-workspace-google .matrix-product-card .mini-product-main,
.matrix-workspace-google .matrix-product-card-compact .mini-product-main {
  gap: 3px;
}

.matrix-workspace-google .matrix-product-card .mini-product-meta,
.matrix-workspace-google .matrix-product-card-compact .mini-product-meta {
  gap: 3px;
}

.matrix-workspace-google .matrix-product-card .mini-product-footer-row,
.matrix-workspace-google .matrix-product-card-compact .mini-product-footer-row {
  justify-content: flex-start;
  gap: 6px;
}

.matrix-workspace-google .matrix-product-card .mini-product-price,
.matrix-workspace-google .matrix-product-card-compact .mini-product-price {
  display: inline-flex;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.matrix-workspace-google .matrix-product-card-brand-axis .mini-product-main,
.matrix-workspace-google .matrix-product-card-brand-axis .mini-product-meta,
.matrix-workspace-google .matrix-product-card-brand-axis.matrix-product-card-compact .mini-product-main,
.matrix-workspace-google .matrix-product-card-brand-axis.matrix-product-card-compact .mini-product-meta {
  gap: 2px;
}

.matrix-workspace-google .matrix-product-card-brand-axis .mini-product-title-link {
  -webkit-line-clamp: 2;
}

.matrix-workspace-google .matrix-product-card-brand-axis.matrix-product-card-compact .mini-product-title-link {
  -webkit-line-clamp: 2;
  line-height: 1.16;
}

.matrix-workspace-google .matrix-product-card-chipless .mini-product-footer-row,
.matrix-workspace-google .matrix-product-card-brand-axis .mini-product-footer-row {
  margin-top: 1px;
}

.matrix-workspace-google .matrix-cell.is-expanded .matrix-card-stack {
  gap: max(8px, calc(var(--matrix-card-gap, 6px) + 1px));
}

.matrix-workspace-google .matrix-cell.is-expanded .matrix-product-card-compact {
  min-height: max(52px, calc(var(--matrix-card-min-height, 52px) + 2px));
  background: #ffffff;
}

.matrix-workspace-google .matrix-cell.is-expanded .matrix-product-card-compact .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-brand-axis.matrix-product-card-compact .mini-product-title-link {
  -webkit-line-clamp: 2;
  line-height: 1.16;
}

.matrix-workspace-google .matrix-product-card-brand-axis .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-chipless .mini-product-title-link {
  font-size: calc(var(--matrix-card-title-size, 0.72rem) + 0.03rem);
  line-height: 1.16;
}

.matrix-workspace-google .matrix-product-card-chipless .mini-product-footer-row {
  display: block;
}

.matrix-workspace-google .matrix-product-card-chipless .mini-product-price {
  margin-top: 1px;
}

.matrix-workspace-google .matrix-product-card .mini-product-price,
.matrix-workspace-google .matrix-product-card-compact .mini-product-price {
  letter-spacing: -0.01em;
}

.matrix-workspace-google .matrix-corner-chip,
.matrix-board-google .axis-chip-top,
.matrix-board-google .axis-chip-side-sticky {
  border-color: rgba(42, 51, 63, 0.34);
  background: linear-gradient(180deg, #8995a6, #758194);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.16);
}

.matrix-workspace-google .matrix-corner-chip,
.matrix-workspace-google .matrix-corner-copy span,
.matrix-board-google .axis-chip-top strong,
.matrix-board-google .axis-chip-side-sticky strong {
  color: #ffffff;
}

.matrix-board-google .axis-chip-top small,
.matrix-board-google .axis-chip-side-sticky small,
.matrix-workspace-google .matrix-corner-copy {
  color: rgba(255, 255, 255, 0.82);
}

.matrix-board-google .axis-chip-bars span {
  background: rgba(255, 255, 255, 0.42);
}

.matrix-board-google .axis-chip-side-sticky::before {
  background: rgba(255, 255, 255, 0.16);
}

.details-modal-card {
  width: min(1120px, calc(100vw - 32px));
}

.details-modal-card .modal-body {
  gap: 16px;
}

.details-hero {
  grid-template-columns: minmax(0, 272px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.details-hero-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 12px;
  align-items: stretch;
}

.details-media-card-product {
  min-height: 232px;
  aspect-ratio: 1 / 1;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.details-media-card-product .details-hero-image,
.details-media-card-product .details-hero-image-fallback {
  width: 100%;
  min-height: 0;
  height: 100%;
  border-radius: 18px;
  object-fit: contain;
}

.details-media-strip {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.details-media-thumb {
  min-height: 72px;
  border: 1px solid rgba(60, 64, 67, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.details-media-thumb-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.details-media-thumb-fallback {
  color: #8c1d18;
  font-size: 0.82rem;
  font-weight: 700;
}

.details-hero-copy {
  gap: 14px;
}

.details-brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(60, 64, 67, 0.12);
  background: #fff;
}

.details-brand-chip-image {
  display: block;
  max-width: 92px;
  max-height: 18px;
  object-fit: contain;
}

.details-modal-card .editor-section .panel-heading {
  justify-content: center;
  text-align: center;
}

.details-modal-card .editor-section .panel-heading > div {
  justify-items: center;
}

.details-modal-card .editor-section .panel-heading h3,
.details-modal-card .editor-section .panel-heading .helper-text {
  text-align: center;
}

.details-modal-card .product-headline {
  align-items: center;
  gap: 8px;
}

@media (max-width: 860px) {
  .details-hero {
    grid-template-columns: 1fr;
  }

  .details-hero-visuals {
    grid-template-columns: minmax(0, 1fr);
  }

  .details-media-strip {
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  }
}

.panel-heading,
.modal-header {
  align-items: center;
}

.panel-heading > div,
.modal-header > div {
  display: grid;
  align-content: center;
  min-height: 40px;
}

.search-field span,
.select-field span,
.field span {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
}

th,
.excel-preview-table thead th {
  vertical-align: middle;
  line-height: 1.2;
}

.details-hero {
  grid-template-columns: minmax(0, 336px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.details-hero-visuals {
  grid-template-columns: minmax(0, 248px) 72px;
  gap: 16px;
  align-items: center;
}

.details-media-card-product {
  min-height: 248px;
  aspect-ratio: 1 / 1;
  padding: 16px;
}

.details-media-card-product .details-hero-image,
.details-media-card-product .details-hero-image-fallback {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: contain;
}

.details-media-strip {
  grid-template-rows: repeat(2, 72px);
  gap: 12px;
  align-content: center;
}

.details-media-thumb {
  min-height: 72px;
  height: 72px;
  padding: 10px;
}

.details-hero-copy {
  gap: 16px;
  padding-left: 6px;
}

.section-card .panel-heading,
.editor-section .panel-heading {
  min-height: 76px;
  padding: 16px 18px;
  align-items: center;
}

.section-card .panel-heading > div,
.editor-section .panel-heading > div {
  display: grid;
  align-content: center;
  min-height: 44px;
}

.details-modal-card .editor-section .panel-heading,
.details-modal-card .section-card .panel-heading {
  justify-content: center;
  text-align: center;
}

.details-modal-card .editor-section .panel-heading > div,
.details-modal-card .section-card .panel-heading > div {
  justify-items: center;
}

.brand-manager-modal-card {
  width: min(1180px, calc(100vw - 32px));
}

.brand-manager-table-panel {
  padding-top: 8px;
}

.brand-table-wrap {
  overflow: auto;
  border: 1px solid rgba(60, 64, 67, 0.1);
  border-radius: 18px;
  background: #fff;
}

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

.brand-manager-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 250, 252, 0.96);
  vertical-align: middle;
}

.brand-manager-table td {
  vertical-align: middle;
  padding: 12px;
}

.brand-table-logo-cell {
  width: 110px;
}

.brand-table-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 1px solid rgba(60, 64, 67, 0.1);
  background: #fff;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.brand-table-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8c1d18;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-table-name-field {
  min-width: 240px;
}

.brand-table-name-field span {
  display: inline-flex;
  align-items: center;
}

.brand-table-actions-cell {
  width: 1%;
  white-space: nowrap;
}

.brand-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .brand-manager-table {
    min-width: 760px;
  }
}

.brand-manager-table th,
.brand-manager-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.brand-manager-table tbody tr + tr {
  border-top: 1px solid rgba(60, 64, 67, 0.08);
}

.brand-table-logo-cell {
  width: 92px;
}

.brand-table-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.brand-table-name-cell {
  min-width: 240px;
}

.brand-table-name-input {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(60, 64, 67, 0.16);
  background: #fff;
  color: #202124;
  font: inherit;
}

.brand-table-name-input:focus {
  outline: none;
  border-color: rgba(26, 115, 232, 0.4);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.brand-table-actions {
  flex-wrap: nowrap;
}

.brand-table-actions .compact-secondary-button,
.brand-table-actions .compact-ghost-button,
.brand-table-actions .compact-danger-button {
  min-height: 36px;
  padding: 0 14px;
}

.matching-section {
  display: grid;
  gap: 14px;
}

.matching-table-wrap {
  border: 1px solid rgba(60, 64, 67, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
}

.matching-table-head,
.matching-table-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.55fr) 116px 126px;
  align-items: center;
  gap: 8px;
}

.matching-table-head {
  padding: 12px 16px;
  background: rgba(248, 249, 250, 0.96);
  border-bottom: 1px solid rgba(60, 64, 67, 0.1);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.matching-table-scroll {
  max-height: 320px;
  overflow: auto;
}

.matching-table-body {
  display: grid;
}

.matching-table-row {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(60, 64, 67, 0.08);
  cursor: pointer;
  transition: background-color 160ms ease;
}

.matching-table-row:last-child {
  border-bottom: 0;
}

.matching-table-row:hover {
  background: rgba(248, 249, 250, 0.72);
}

.matching-table-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.matching-table-check input {
  margin: 0;
}

.matching-table-product {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-left: -2px;
}

.matching-product-thumb,
.matching-product-thumb-fallback {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(60, 64, 67, 0.12);
  background: #fff;
  object-fit: contain;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.matching-product-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  text-align: center;
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
}

.matching-table-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.matching-table-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.98rem;
  line-height: 1.25;
}

.matching-table-meta {
  color: var(--text-muted);
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matching-table-price {
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  padding-right: 8px;
}

.matching-table-state {
  color: var(--text-soft);
  font-size: 0.82rem;
  text-align: left;
}

.matching-table-row:has(input:checked) {
  background: rgba(232, 240, 254, 0.48);
}

.matching-table-row:has(input:checked) .matching-table-state {
  color: #1a73e8;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .matching-table-head,
  .matching-table-row {
    grid-template-columns: 56px minmax(0, 1.5fr) 104px;
  }

  .matching-table-head span:last-child,
  .matching-table-row .matching-table-state {
    display: none;
  }
}

@media (max-width: 720px) {
  .matching-table-head {
    display: none;
  }

  .matching-table-row {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
  }

  .matching-table-product {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .matching-product-thumb,
  .matching-product-thumb-fallback {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .matching-table-price {
    grid-column: 2;
    padding-left: 58px;
  }
}

.series-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(236px, 0.72fr);
  gap: 12px;
  align-items: start;
}

.series-settings-fields {
  display: grid;
  gap: 12px;
}

.checkbox-card-inline {
  min-height: 0;
  gap: 8px;
  align-content: start;
  justify-items: start;
}

.checkbox-card-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.checkbox-card-head span {
  font-weight: 600;
  color: var(--text);
}

.checkbox-card-base {
  padding-block: 11px;
}

.checkbox-card-base small {
  font-size: 0.78rem;
}

.product-style-tools {
  display: grid;
  gap: 14px;
}

.product-style-preview-wrap {
  display: grid;
}

.product-style-preview-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--product-border, rgba(37, 99, 235, 0.16));
  background: linear-gradient(135deg, var(--product-accent-soft, rgba(37, 99, 235, 0.12)), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 12px 24px rgba(15, 23, 42, 0.06);
}

.product-style-preview-head,
.product-style-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.product-style-preview-badge,
.product-style-preview-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.product-style-preview-badge {
  background: var(--product-accent-strong, #2563eb);
  color: var(--product-text, #ffffff);
  border: 1px solid var(--product-border, transparent);
}

.product-style-preview-state {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-soft);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.product-style-preview-title {
  font-size: 1rem;
  line-height: 1.25;
  color: var(--text);
}

.product-style-preview-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.product-style-preview-meta strong {
  color: var(--text);
  font-size: 0.95rem;
}

.product-style-badge {
  background: linear-gradient(180deg, var(--product-accent-soft, rgba(37, 99, 235, 0.1)), rgba(255, 255, 255, 0.96));
  border-color: var(--product-border, rgba(60, 64, 67, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 4px 10px rgba(15, 23, 42, 0.05);
}

.product-style-badge .table-brand-logo,
.product-style-badge .details-brand-chip-image {
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.08));
}

.details-hero-copy-styled {
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid var(--product-border, rgba(37, 99, 235, 0.16));
  background: linear-gradient(180deg, var(--product-accent-soft, rgba(37, 99, 235, 0.1)), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.matrix-workspace-google .product-style-card {
  border-color: var(--product-border, rgba(60, 64, 67, 0.12));
  background: linear-gradient(180deg, var(--product-accent-soft, rgba(37, 99, 235, 0.1)), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 18px rgba(15, 23, 42, 0.06);
}

.matrix-workspace-google .product-style-card::before {
  background: linear-gradient(180deg, var(--product-accent, #2563eb), var(--product-border, #1d4ed8));
  opacity: 1;
}

.matrix-workspace-google .product-style-card .mini-product-thumb,
.matrix-workspace-google .product-style-card .mini-product-thumb-fallback {
  border-color: var(--product-border, rgba(60, 64, 67, 0.12));
  background: rgba(255, 255, 255, 0.84);
}

.matrix-workspace-google .product-style-card .mini-product-brand-chip,
.matrix-workspace-google .product-style-card .mini-product-state {
  background: var(--product-accent-strong, #2563eb);
  color: var(--product-text, #ffffff);
  border: 1px solid var(--product-border, transparent);
}

.matrix-workspace-google .product-style-card .mini-product-link,
.matrix-workspace-google .product-style-card .mini-product-link:hover {
  border-color: var(--product-border, rgba(60, 64, 67, 0.12));
  color: var(--product-accent, #2563eb);
  background: rgba(255, 255, 255, 0.86);
}

@media (max-width: 980px) {
  .series-settings-grid {
    grid-template-columns: 1fr;
  }
}

.table-frame tbody td {
  vertical-align: middle;
}

.table-thumb-cell {
  width: 88px;
}

.table-thumb-button {
  width: 58px;
  height: 58px;
  line-height: 0;
}

.table-product-thumb,
.table-product-thumb-fallback {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}

.table-product-thumb {
  padding: 4px;
  background: linear-gradient(180deg, #ffffff, #fbfbfc);
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
}

.table-brand-logo-badge {
  min-width: 84px;
  min-height: 38px;
  padding: 5px 12px;
}

.table-brand-logo {
  max-width: 70px;
  max-height: 24px;
  object-fit: contain;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
}

.table-frame tbody td .brand-badge-chip {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 0.84rem;
}

.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-card-stack,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .cell-items {
  gap: max(5px, calc(var(--matrix-card-gap, 6px) - 1px));
}

.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-card-stack,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .cell-items {
  gap: 4px;
}

.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-more-badge {
  min-height: 24px;
  padding-inline: 8px;
  font-size: 0.68rem;
}

.matrix-workspace-google .matrix-product-card-regular {
  grid-template-columns: max(32px, var(--matrix-card-thumb, 34px)) minmax(0, 1fr) auto;
  min-height: max(54px, var(--matrix-card-min-height, 56px));
  padding:
    var(--matrix-card-padding-y, 6px)
    var(--matrix-card-padding-x, 8px)
    var(--matrix-card-padding-y, 6px)
    calc(var(--matrix-card-padding-x, 8px) + 2px);
}

.matrix-workspace-google .matrix-product-card-tight {
  grid-template-columns: max(28px, calc(var(--matrix-card-thumb, 34px) - 2px)) minmax(0, 1fr) auto;
  min-height: max(48px, calc(var(--matrix-card-min-height, 56px) - 4px));
  gap: max(5px, calc(var(--matrix-card-gap, 6px) - 1px));
  padding:
    max(5px, calc(var(--matrix-card-padding-y, 6px) - 1px))
    max(6px, calc(var(--matrix-card-padding-x, 8px) - 1px))
    max(5px, calc(var(--matrix-card-padding-y, 6px) - 1px))
    max(8px, var(--matrix-card-padding-x, 8px));
}

.matrix-workspace-google .matrix-product-card-dense {
  grid-template-columns: max(24px, calc(var(--matrix-card-thumb, 34px) - 6px)) minmax(0, 1fr) auto;
  min-height: max(42px, calc(var(--matrix-card-min-height, 56px) - 10px));
  gap: 5px;
  padding: 4px 5px 4px 7px;
  border-radius: 13px;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-tight .mini-product-thumb-fallback {
  width: max(28px, calc(var(--matrix-card-thumb, 34px) - 2px));
  height: max(28px, calc(var(--matrix-card-thumb, 34px) - 2px));
  border-radius: 9px;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-dense .mini-product-thumb-fallback {
  width: max(24px, calc(var(--matrix-card-thumb, 34px) - 6px));
  height: max(24px, calc(var(--matrix-card-thumb, 34px) - 6px));
  border-radius: 8px;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-main,
.matrix-workspace-google .matrix-product-card-tight .mini-product-meta {
  gap: 2px;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-main,
.matrix-workspace-google .matrix-product-card-dense .mini-product-meta {
  gap: 1px;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-chip-row {
  gap: 4px;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-chip-row {
  display: none;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-brand-chip,
.matrix-workspace-google .matrix-product-card-tight .mini-product-state {
  padding: 1px 5px;
  font-size: calc(var(--matrix-card-chip-size, 0.58rem) - 0.01rem);
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-title-link {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  font-size: calc(var(--matrix-card-title-size, 0.74rem) - 0.03rem);
  line-height: 1.12;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-title-link {
  font-size: calc(var(--matrix-card-title-size, 0.74rem) - 0.01rem);
  line-height: 1.14;
}

.matrix-workspace-google .matrix-product-card-inline-footer .mini-product-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card-inline-footer .mini-product-price {
  margin-left: auto;
  flex: none;
  white-space: nowrap;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-link {
  width: 22px;
  min-width: 22px;
  height: 22px;
  border-radius: 8px;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-link {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-side {
  gap: 4px;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-price,
.matrix-workspace-google .matrix-product-card-tight .mini-product-price {
  font-size: calc(var(--matrix-card-price-size, 0.72rem) - 0.01rem);
}

.matrix-workspace-google .matrix-product-inline-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.matrix-workspace-google .matrix-product-inline-brand {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(var(--matrix-card-chip-size, 0.58rem) + 0.02rem);
  color: var(--text-soft);
}

.matrix-workspace-google .matrix-product-inline-flag {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(110, 132, 163, 0.12);
  color: #5f738d;
  font-size: calc(var(--matrix-card-chip-size, 0.58rem) + 0.01rem);
  font-weight: 700;
  white-space: nowrap;
}

.matrix-board-google.matrix-board-load-medium .axis-chip-top,
.matrix-board-google.matrix-board-load-medium .axis-chip-side-sticky,
.matrix-board-google.matrix-board-load-high .axis-chip-top,
.matrix-board-google.matrix-board-load-high .axis-chip-side-sticky,
.matrix-workspace-google .matrix-board-load-medium .matrix-corner-chip,
.matrix-workspace-google .matrix-board-load-high .matrix-corner-chip {
  background: #ecedf0;
  background-image: none;
}

.matrix-board-google.matrix-board-load-high .axis-chip-top,
.matrix-board-google.matrix-board-load-high .axis-chip-side-sticky,
.matrix-workspace-google .matrix-board-load-high .matrix-corner-chip {
  border-color: #cbd5e1;
  box-shadow: none;
}

.matrix-workspace-google .matrix-cell {
  grid-template-rows: auto auto;
  overflow: hidden;
}

.matrix-workspace-google .matrix-card-stack {
  gap: max(6px, var(--matrix-card-gap, 6px));
}

.matrix-workspace-google .matrix-product-card,
.matrix-workspace-google .matrix-product-card-regular,
.matrix-workspace-google .matrix-product-card-tight,
.matrix-workspace-google .matrix-product-card-dense {
  display: grid;
  align-items: center;
  grid-template-columns: max(34px, calc(var(--matrix-card-thumb, 34px) * 1.2)) minmax(0, 1fr);
  gap: max(7px, var(--matrix-card-gap, 6px));
  min-height: max(48px, var(--matrix-card-min-height, 56px));
  padding:
    max(7px, var(--matrix-card-padding-y, 6px))
    max(8px, var(--matrix-card-padding-x, 8px))
    max(7px, var(--matrix-card-padding-y, 6px))
    max(10px, calc(var(--matrix-card-padding-x, 8px) + 2px));
  border-radius: 14px;
  border: 1px solid rgba(67, 78, 92, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.96));
  box-shadow: 0 1px 0 rgba(67, 78, 92, 0.08);
}

.matrix-workspace-google .matrix-product-card::before,
.matrix-workspace-google .matrix-product-card-regular::before,
.matrix-workspace-google .matrix-product-card-tight::before,
.matrix-workspace-google .matrix-product-card-dense::before {
  inset: 7px auto 7px 0;
  width: 3px;
  border-radius: 999px;
}

.matrix-workspace-google .matrix-product-card-tight,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-product-card {
  grid-template-columns: max(31px, calc((var(--matrix-card-thumb, 34px) - 3px) * 1.2)) minmax(0, 1fr);
  gap: 6px;
  min-height: max(44px, calc(var(--matrix-card-min-height, 56px) - 6px));
  padding: 6px 7px 6px 9px;
}

.matrix-workspace-google .matrix-product-card-dense,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-product-card {
  grid-template-columns: max(29px, calc((var(--matrix-card-thumb, 34px) - 6px) * 1.2)) minmax(0, 1fr);
  gap: 5px;
  min-height: max(40px, calc(var(--matrix-card-min-height, 56px) - 12px));
  padding: 5px 6px 5px 8px;
  border-radius: 12px;
}

.matrix-workspace-google .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-product-card .mini-product-thumb-fallback {
  width: max(34px, calc(var(--matrix-card-thumb, 34px) * 1.2));
  height: max(34px, calc(var(--matrix-card-thumb, 34px) * 1.2));
  border-radius: 10px;
  padding: 2px;
  object-fit: contain;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-tight .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-product-card .mini-product-thumb-fallback {
  width: max(31px, calc((var(--matrix-card-thumb, 34px) - 3px) * 1.2));
  height: max(31px, calc((var(--matrix-card-thumb, 34px) - 3px) * 1.2));
  border-radius: 9px;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-dense .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-product-card .mini-product-thumb-fallback {
  width: max(29px, calc((var(--matrix-card-thumb, 34px) - 6px) * 1.2));
  height: max(29px, calc((var(--matrix-card-thumb, 34px) - 6px) * 1.2));
  border-radius: 8px;
}

.matrix-workspace-google .matrix-product-card .mini-product-main {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 0;
  gap: 0;
  text-align: left;
  color: inherit;
}

.matrix-workspace-google .matrix-product-card .mini-product-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-regular .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-tight .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-dense .mini-product-title-link {
  display: block;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  font-size: calc(var(--matrix-card-title-size, 0.74rem) + 0.05rem);
  font-weight: 700;
  line-height: 1.14;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-title-link,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-product-card .mini-product-title-link {
  font-size: calc(var(--matrix-card-title-size, 0.74rem) + 0.01rem);
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-title-link,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-product-card .mini-product-title-link {
  font-size: calc(var(--matrix-card-title-size, 0.74rem) - 0.02rem);
  line-height: 1.12;
}

.matrix-workspace-google .matrix-product-card .mini-product-footer-row {
  display: grid;
  gap: 1px;
  margin-top: 1px;
}

.matrix-workspace-google .matrix-product-card .mini-product-price-source {
  display: block;
  font-size: calc(var(--matrix-card-price-size, 0.72rem) - 0.12rem);
  line-height: 1.1;
  color: var(--text-muted);
}

.matrix-workspace-google .matrix-product-card .mini-product-price {
  display: inline-block;
  font-size: calc(var(--matrix-card-price-size, 0.72rem) + 0.01rem);
  line-height: 1.12;
  text-align: left;
  white-space: normal;
  font-weight: 700;
}

.matrix-workspace-google .matrix-product-card .mini-product-price.is-missing {
  color: #8b949e;
  font-weight: 600;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-price,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-product-card .mini-product-price {
  font-size: var(--matrix-card-price-size, 0.72rem);
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-price,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-product-card .mini-product-price {
  font-size: calc(var(--matrix-card-price-size, 0.72rem) - 0.01rem);
}

.matrix-workspace-google .matrix-product-card .mini-product-chip-row,
.matrix-workspace-google .matrix-product-card .mini-product-side,
.matrix-workspace-google .matrix-product-card .mini-product-link,
.matrix-workspace-google .matrix-product-card .mini-product-brand-chip,
.matrix-workspace-google .matrix-product-card .mini-product-state,
.matrix-workspace-google .matrix-product-inline-meta,
.matrix-workspace-google .matrix-product-inline-brand,
.matrix-workspace-google .matrix-product-inline-flag {
  display: none !important;
}

.matrix-workspace-google .matrix-toolbar-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.matrix-workspace-google .matrix-toolbar-select {
  display: grid;
  gap: 4px;
  min-width: min(260px, 100%);
}

.matrix-workspace-google .matrix-toolbar-select span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.matrix-workspace-google .matrix-toolbar-select select {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(60, 64, 67, 0.14);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
}

.details-media-card-product {
  position: relative;
  overflow: hidden;
}

.details-media-brand-mark {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  max-width: calc(100% - 28px);
  pointer-events: none;
}

.details-media-brand-mark-image {
  display: block;
  max-width: 110px;
  max-height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.92));
}

.details-media-brand-mark-text {
  font-size: 0.95rem;
  line-height: 1.1;
  font-weight: 700;
  color: #5f6368;
  text-align: right;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.92);
  word-break: break-word;
}

.details-media-brand-mark {
  top: clamp(18px, 6%, 24px);
  right: clamp(18px, 7%, 28px);
  max-width: calc(100% - 56px);
}

.details-hero-visuals-main-only {
  grid-template-columns: minmax(0, 1fr);
}

.details-hero-visuals-main-only .details-media-card-product {
  min-height: 276px;
}

.comparison-board {
  gap: 12px;
}

.comparison-lane {
  gap: 10px;
  padding: 12px 14px;
}

.comparison-lane-header {
  align-items: flex-start;
  gap: 10px 16px;
}

.comparison-lane-header .inline-actions {
  gap: 6px;
}

.comparison-grid {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 10px;
}

.comparison-own-card {
  gap: 8px;
  padding: 10px;
}

.comparison-own-shell {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
}

.comparison-competitors,
.comparison-cards {
  gap: 6px;
}

.comparison-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
}

.comparison-card {
  flex: 0 1 clamp(248px, 24vw, 304px);
  width: min(100%, 304px);
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 4px 8px;
  padding: 10px;
}

.comparison-thumb,
.comparison-thumb-fallback {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.comparison-card .comparison-copy {
  gap: 2px;
}

.comparison-card .comparison-copy strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.comparison-card .comparison-copy span {
  font-size: 0.72rem;
  line-height: 1.18;
}

.comparison-card-meta {
  grid-column: 2;
  gap: 4px 8px;
  font-size: 0.72rem;
}

.comparison-card-meta > span:first-child:not(.table-badge),
.comparison-card-meta > .table-badge + span {
  font-size: 0.86rem;
  line-height: 1.1;
}

.comparison-card .inline-actions {
  grid-column: 2;
  grid-row: auto;
  justify-self: start;
  align-self: start;
  gap: 4px;
}

.comparison-card .mini-button {
  min-height: 28px;
  padding: 0 9px;
}

.comparison-card .link-icon-button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.comparison-empty {
  width: min(100%, 304px);
}

.table-frame tbody td .table-brand-logo-badge,
.table-frame tbody td .table-brand-logo-badge.product-style-badge {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.table-frame tbody td .table-brand-logo {
  max-width: 72px;
  max-height: 24px;
  filter: none;
}

.table-frame tbody td.table-brand-cell {
  text-align: center;
}

.table-frame tbody td.table-brand-cell .table-brand-logo-badge,
.table-frame tbody td.table-brand-cell .brand-badge-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.table-frame tbody td .table-brand-text-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.table-frame tbody td .table-brand-text-fallback[hidden] {
  display: none !important;
}

.table-frame tbody td .brand-badge-chip {
  min-height: 0;
  padding: 0;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.88rem;
  line-height: 1.2;
}

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

  .comparison-card,
  .comparison-empty {
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
  }
}

.brand-manager-modal-card {
  width: min(1380px, calc(100vw - 32px));
}

.brand-manager-table {
  min-width: 1180px;
}

.brand-table-style-cell {
  min-width: 320px;
  vertical-align: top;
}

.brand-style-editor {
  display: grid;
  gap: 10px;
}

.brand-style-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 8px;
}

.brand-style-color-field {
  display: grid;
  gap: 4px;
}

.brand-style-color-field span {
  font-size: 0.74rem;
  line-height: 1.2;
  color: var(--text-soft);
}

.brand-style-color-field input[type="color"] {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(60, 64, 67, 0.16);
  background: #fff;
  cursor: pointer;
}

.brand-style-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--product-border, rgba(60, 64, 67, 0.12));
  background: linear-gradient(180deg, var(--product-accent-soft, rgba(37, 99, 235, 0.1)), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 6px 14px rgba(15, 23, 42, 0.04);
}

.brand-style-preview-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--product-accent-strong, #2563eb);
  color: var(--product-text, #ffffff);
  border: 1px solid var(--product-border, transparent);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.brand-style-preview-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-style-preview-copy strong {
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--text);
}

.brand-style-preview-copy small {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--text-soft);
}

.brand-table-actions-cell {
  vertical-align: top;
}

@media (max-width: 1200px) {
  .brand-manager-table {
    min-width: 1280px;
  }
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(95, 99, 104, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: #3c4043;
  box-shadow: 0 8px 18px rgba(60, 64, 67, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.notification-bell:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(60, 64, 67, 0.12);
}

.notification-bell.is-open,
.notification-bell.has-unread {
  border-color: rgba(220, 38, 38, 0.22);
}

.notification-bell-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
}

.notification-bell-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.notification-bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}

.notifications-layer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  pointer-events: none;
}

.notifications-layer.is-open {
  pointer-events: auto;
}

.notifications-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.18);
}

.notifications-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, calc(100vw - 24px));
  height: 100%;
  padding: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.96));
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.14);
  transform: translateX(104%);
  transition: transform 0.22s ease;
  overflow: hidden;
}

.notifications-drawer,
.notifications-drawer-shell,
.notifications-drawer-header,
.notifications-drawer-body,
.notification-entry,
.notification-entry-main,
.notification-entry-head,
.notification-entry-meta {
  min-width: 0;
}

.notifications-layer.is-open .notifications-drawer {
  transform: translateX(0);
}

.notifications-drawer-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
}

.notifications-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.notifications-drawer-header h2 {
  margin-top: 4px;
}

.notifications-drawer-body {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow-y: auto;
  padding-right: 4px;
}

.notification-entry {
  display: grid;
  gap: 8px;
  padding: 14px 14px 13px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.notification-entry.is-actionable {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.notification-entry.is-actionable:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.24);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

.notification-entry-main {
  display: grid;
  gap: 8px;
}

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

.notification-entry-head strong {
  font-size: 1.02rem;
  line-height: 1.25;
  color: var(--text);
}

.notification-entry-head time {
  flex: none;
  color: var(--text-soft);
  font-size: 0.74rem;
  white-space: nowrap;
}

.notification-entry p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.4;
}

.notification-entry-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .notification-bell {
    order: 3;
  }

  .notifications-drawer {
    width: min(100vw, 100%);
    padding: 12px;
  }
}

.primary-button.is-busy,
.secondary-button.is-busy,
.ghost-button.is-busy,
.danger-button.is-busy,
.mini-button.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: progress;
  pointer-events: none;
}

.primary-button.is-busy,
.secondary-button.is-busy,
.ghost-button.is-busy,
.danger-button.is-busy {
  opacity: 0.96;
}

.button-spinner,
.activity-status-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: matrica-spin 0.7s linear infinite;
  flex: none;
}

.primary-button.is-busy .button-spinner {
  border-color: rgba(255, 255, 255, 0.9);
  border-right-color: transparent;
}

.button-busy-label {
  white-space: nowrap;
}

.activity-status-root {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  pointer-events: none;
}

.activity-status-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(95, 99, 104, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
}

.activity-status-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.activity-status-copy strong {
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--text);
}

.activity-status-copy small {
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--text-soft);
}

@keyframes matrica-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .activity-status-root {
    top: 12px;
    width: calc(100vw - 24px);
  }

  .activity-status-card {
    width: 100%;
    min-width: 0;
  }
}

.topbar-actions > .select-field {
  display: none;
}

.current-user-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: min(48vw, 520px);
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.84));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.current-user-panel.is-guest {
  border-style: dashed;
}

.current-user-display {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.current-user-display strong {
  font-size: 0.96rem;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.current-user-display small {
  font-size: 0.77rem;
  line-height: 1.25;
  color: var(--text-soft);
}

.current-user-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.current-user-actions .secondary-button,
.current-user-actions .ghost-button {
  min-height: 38px;
  padding-inline: 14px;
}

.auth-backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

.auth-modal-card,
.auth-settings-card {
  width: min(560px, calc(100vw - 28px));
}

.user-manager-modal-card {
  width: min(1120px, calc(100vw - 28px));
}

/* Dense analytical layout overrides */
:root {
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.05);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
}

html {
  font-size: 14px;
}

body {
  font-size: 0.875rem;
  line-height: 1.4;
}

.app-shell {
  padding: 16px;
}

.topbar,
.panel,
.modal-card,
.matrix-frame,
.table-frame,
.section-card,
.info-card,
.taxonomy-item,
.dropzone,
.comparison-card,
.matching-panel,
.matching-table-card {
  box-shadow: none;
  backdrop-filter: none;
}

.topbar {
  gap: 12px;
  padding: 12px 16px;
  align-items: flex-start;
}

.brand-block {
  gap: 12px;
  min-width: 0;
}

.brand-block > div,
.topbar-actions,
.stats-card,
.stats-card-head,
.stats-card-copy,
.panel-heading > div,
.toolbar-row,
.toolbar-actions,
.current-user-panel,
.current-user-display,
.current-user-actions,
.filter-accordion-toggle,
.filter-accordion-copy,
.checkbox-pill,
.legend-chip,
.matrix-toolbar-main,
.matrix-toolbar-side,
.matrix-toolbar-copy,
.matrix-toolbar-meta,
.matrix-kpi,
.matrix-corner-copy,
.axis-chip-copy,
.cell-caption,
.matrix-product-card,
.mini-product-main,
.mini-product-meta,
.mini-product-title-row,
.details-grid > *,
.comparison-grid > *,
.matching-table-head > *,
.matching-table-row > * {
  min-width: 0;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.15;
}

h2,
.matrix-toolbar-copy h3,
.panel-heading h2 {
  font-size: 1.18rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.2;
}

.eyebrow,
.section-label,
.panel-hint,
.helper-text,
.field span,
.search-field span,
.select-field span,
.stats-card small,
.mini-product-code,
.notification-entry-meta,
.notification-entry-head time {
  font-size: 0.78rem;
  line-height: 1.25;
}

.search-field,
.select-field,
.field {
  gap: 4px;
}

.search-field input,
.select-field select,
.field input,
.field select,
.field textarea,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.mini-button {
  min-height: 32px;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.875rem;
}

.field textarea {
  min-height: 72px;
}

.search-field input {
  width: min(280px, 22vw);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  font-weight: 600;
}

.secondary-button,
.ghost-button,
.toolbar-menu-trigger {
  background: #ffffff;
  border: 1px solid #dbe3ee;
  color: #334155;
}

.primary-button {
  background: #4b5563;
}

.danger-button {
  background: #fff5f5;
  color: #b42318;
}

.workspace {
  grid-template-columns: 284px minmax(0, 1fr);
  gap: 12px;
}

.sidebar,
.content-area {
  gap: 12px;
}

.panel-heading {
  gap: 8px;
  padding: 12px 12px 0;
}

.panel-body,
.section-card,
.matrix-frame,
.table-frame,
.taxonomy-item,
.info-card {
  padding: 12px;
}

.toolbar-panel {
  padding: 10px 12px;
}

.toolbar-row {
  gap: 10px;
}

.toolbar-actions,
.inline-actions,
.chip-row,
.matrix-controls,
.matrix-legend,
.taxonomy-actions,
.product-headline,
.modal-header,
.image-list {
  gap: 8px;
}

.segmented-control {
  padding: 3px;
}

.segment {
  padding: 7px 14px;
  font-size: 0.875rem;
}

.toolbar-menu-panel {
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
}

.toolbar-menu-action {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 8px;
}

.topbar-actions {
  margin-left: auto;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 8px;
}

.current-user-panel {
  min-width: 0;
  max-width: min(46vw, 480px);
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
}

.current-user-actions {
  gap: 6px;
}

.current-user-actions .secondary-button,
.current-user-actions .ghost-button {
  min-height: 30px;
  padding-inline: 10px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.stats-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

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

.stats-card-copy {
  display: grid;
  gap: 2px;
}

.stats-card h2 {
  font-size: 0.84rem;
  line-height: 1.2;
}

.stats-card strong {
  flex: none;
  font-size: 1.58rem;
  line-height: 1;
}

.stats-card small {
  display: block;
  max-width: 24ch;
  color: var(--text-muted);
}

.filter-stack,
.filter-stack-dense {
  display: grid;
  gap: 8px;
}

.filter-group-quick {
  padding: 0;
  border: 0;
}

.filter-accordion {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.filter-accordion-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.filter-accordion-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #64748b;
  border-bottom: 1.5px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
  justify-self: end;
  margin-left: 8px;
}

.filter-accordion.is-open .filter-accordion-toggle::after {
  transform: rotate(-135deg) translateY(-1px);
}

.filter-accordion-copy {
  display: grid;
  gap: 1px;
}

.filter-accordion-copy strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.filter-accordion-copy small {
  color: var(--text-muted);
}

.filter-accordion-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  max-width: 150px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-accordion-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
  border-top: 1px solid #edf2f7;
}

.filter-search-field input {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.75rem;
}

.checkbox-list,
.checkbox-list-compact {
  display: grid;
  gap: 4px;
}

.checkbox-list-compact .checkbox-pill,
.filter-stack .checkbox-pill {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.checkbox-pill input {
  margin: 0;
}

.range-grid,
.grid-2,
.grid-3 {
  gap: 8px;
}

.range-grid input[type="range"] {
  margin: 0;
}

.truncate-single {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.truncate-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.table-frame {
  overflow: auto;
}

th,
td {
  padding: 10px 8px;
  font-size: 0.8125rem;
}

.matrix-frame {
  padding: 10px;
}

.matrix-workspace-google {
  gap: 10px;
}

.matrix-workspace-google .matrix-toolbar-panel {
  padding: 10px 12px;
  gap: 8px;
}

.matrix-workspace-google .matrix-toolbar-copy {
  gap: 2px;
}

.matrix-workspace-google .matrix-toolbar-copy h3 {
  font-size: 1.08rem;
  line-height: 1.2;
}

.matrix-workspace-google .matrix-toolbar-kpis,
.matrix-workspace-google .matrix-toolbar-meta,
.matrix-workspace-google .matrix-board-guide {
  gap: 6px;
}

.matrix-workspace-google .matrix-kpi,
.matrix-workspace-google .legend-chip {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 0.78rem;
  border-radius: 999px;
}

.matrix-workspace-google .matrix-kpi strong {
  font-size: 0.88rem;
}

.matrix-workspace-google .matrix-toolbar-controls {
  gap: 6px;
}

.matrix-workspace-google .matrix-toolbar-select {
  min-width: min(220px, 100%);
}

.matrix-workspace-google .matrix-toolbar-select select {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
}

.matrix-workspace-google .matrix-board-shell {
  gap: 8px;
}

.matrix-workspace-google .matrix-corner-chip,
.matrix-board-google .axis-chip-top,
.matrix-board-google .axis-chip-side-sticky {
  border: 1px solid #e2e8f0;
  border-radius: 0;
  background: #ecedf0;
  box-shadow: none;
}

.matrix-workspace-google .matrix-corner-chip,
.matrix-board-google .axis-chip-top,
.matrix-board-google .axis-chip-side-sticky {
  position: sticky;
}

.matrix-workspace-google .matrix-corner-chip {
  top: 0;
  left: 0;
  z-index: 12;
  min-height: var(--matrix-header-height);
  padding: 0;
  border-right-color: #cbd5e1;
  border-bottom-color: #cbd5e1;
  background:
    linear-gradient(135deg, transparent 49.25%, #cbd5e1 49.5%, #cbd5e1 50.5%, transparent 50.75%),
    #ecedf0;
  color: transparent;
  font-size: 0;
}

.matrix-board-google .axis-chip-top {
  top: 0;
  z-index: 11;
  min-height: var(--matrix-header-height);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom-color: #cbd5e1;
  color: #334155;
}

.matrix-board-google .axis-chip-side-sticky {
  left: 0;
  z-index: 10;
  min-height: auto;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  align-self: stretch;
  border-right-color: #cbd5e1;
  color: #334155;
  text-align: left;
  box-shadow: 8px 0 14px rgba(148, 163, 184, 0.18);
}

.matrix-board-google .axis-chip-top strong,
.matrix-board-google .axis-chip-side-sticky strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-size: clamp(0.79rem, var(--matrix-axis-title-size), 0.84rem);
  line-height: 1.25;
  font-weight: 600;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-board-google .axis-chip-top strong {
  white-space: nowrap;
}

.matrix-board-google .axis-chip-side-sticky strong {
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.matrix-workspace-google .matrix-corner-chip small,
.matrix-workspace-google .matrix-corner-copy,
.matrix-board-google .axis-chip-top small,
.matrix-board-google .axis-chip-side-sticky small,
.matrix-board-google .axis-chip-bars {
  display: none;
}

.matrix-board-google .axis-chip-top .axis-chip-copy,
.matrix-board-google .axis-chip-side-sticky .axis-chip-copy {
  min-width: 0;
}

.matrix-board-google .axis-chip-top .axis-chip-copy {
  width: 100%;
}

.matrix-board-google .axis-chip-side-sticky::before {
  content: none;
}

.matrix-workspace-google .matrix-corner-chip,
.matrix-workspace-google .axis-chip-top,
.matrix-workspace-google .axis-chip-side,
.matrix-workspace-google .axis-chip-side-sticky,
.matrix-workspace-google .matrix-board-google .axis-chip-top,
.matrix-workspace-google .matrix-board-google .axis-chip-side-sticky {
  background: #ecedf0 !important;
  background-image: none !important;
  color: #334155 !important;
}

.matrix-workspace-google .axis-chip-top strong,
.matrix-workspace-google .axis-chip-side strong,
.matrix-workspace-google .axis-chip-side-sticky strong,
.matrix-workspace-google .matrix-board-google .axis-chip-top strong,
.matrix-workspace-google .matrix-board-google .axis-chip-side-sticky strong {
  color: #334155 !important;
}

.matrix-workspace-google .matrix-cell {
  position: relative;
  min-height: 124px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  border-left-width: 3px;
  background: #ffffff;
  box-shadow: none;
}

.matrix-workspace-google .matrix-cell.cell-open {
  background: #ffffff;
  border-left-color: #22c55e;
}

.matrix-workspace-google .matrix-cell.cell-balanced {
  background: #ffffff;
  border-left-color: #94a3b8;
}

.matrix-workspace-google .matrix-cell.cell-dense {
  background: #ffffff;
  border-left-color: #ef4444;
}

.matrix-workspace-google .cell-head {
  gap: 8px;
  margin-bottom: 6px;
}

.matrix-workspace-google .cell-caption {
  min-width: 0;
}

.matrix-workspace-google .cell-caption small,
.matrix-workspace-google .cell-caption strong {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-workspace-google .cell-caption strong {
  font-size: 0.84rem;
}

.matrix-workspace-google .cell-count {
  min-width: 20px;
  min-height: 20px;
  padding: 0 6px;
  font-size: 0.68rem;
}

.matrix-workspace-google .matrix-card-stack,
.matrix-workspace-google .cell-items {
  gap: 6px;
}

.matrix-workspace-google .matrix-product-card,
.matrix-workspace-google .matrix-product-card-regular,
.matrix-workspace-google .matrix-product-card-tight,
.matrix-workspace-google .matrix-product-card-dense,
.matrix-workspace-google .product-style-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  min-height: 48px;
  padding: 6px 8px 6px 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: none;
}

.matrix-workspace-google .matrix-product-card-tight,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-product-card {
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 42px;
  padding: 5px 7px 5px 9px;
}

.matrix-workspace-google .matrix-product-card-dense,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-product-card {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 38px;
  padding: 4px 6px 4px 8px;
}

.matrix-workspace-google .matrix-product-card::before,
.matrix-workspace-google .matrix-product-card-regular::before,
.matrix-workspace-google .matrix-product-card-tight::before,
.matrix-workspace-google .matrix-product-card-dense::before,
.matrix-workspace-google .product-style-card::before {
  inset: 5px auto 5px 0;
  width: 3px;
  border-radius: 999px;
}

.matrix-workspace-google .product-style-card {
  border-color: #e2e8f0;
  background: #ffffff;
}

.matrix-workspace-google .product-style-card .mini-product-thumb,
.matrix-workspace-google .product-style-card .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-product-card .mini-product-thumb-fallback {
  width: 36px;
  height: 36px;
  padding: 1px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-tight .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-product-card .mini-product-thumb-fallback {
  width: 32px;
  height: 32px;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-dense .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-product-card .mini-product-thumb-fallback {
  width: 28px;
  height: 28px;
}

.matrix-workspace-google .matrix-product-card .mini-product-main {
  display: grid;
  align-items: center;
  min-width: 0;
  padding: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-regular .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-tight .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-dense .mini-product-title-link {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
  line-height: 1.15;
  font-weight: 700;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-title-link,
.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-product-card .mini-product-title-link {
  font-size: 0.84rem;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-title-link,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-product-card .mini-product-title-link {
  font-size: 0.8rem;
}

.matrix-workspace-google .matrix-product-card .mini-product-code {
  display: block;
  min-width: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-workspace-google .matrix-product-card .mini-product-price {
  display: inline-flex;
  justify-self: end;
  white-space: nowrap;
  font-size: 0.92rem;
  line-height: 1;
  font-weight: 700;
  color: #0f172a;
}

.matrix-workspace-google .matrix-product-card .mini-product-price.is-missing {
  color: #94a3b8;
  font-weight: 600;
}

.matrix-workspace-google .matrix-product-card .mini-product-footer-row,
.matrix-workspace-google .matrix-product-card .mini-product-side,
.matrix-workspace-google .matrix-product-card .mini-product-link,
.matrix-workspace-google .matrix-product-card .mini-product-brand-chip,
.matrix-workspace-google .matrix-product-card .mini-product-state,
.matrix-workspace-google .matrix-product-card .mini-product-price-source,
.matrix-workspace-google .matrix-product-inline-meta,
.matrix-workspace-google .matrix-product-inline-brand,
.matrix-workspace-google .matrix-product-inline-flag {
  display: none !important;
}

.matrix-workspace-google .matrix-product-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.matrix-workspace-google .matrix-empty-hint {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed #dbe3ee;
  background: #fcfdff;
}

.matrix-workspace-google .matrix-empty-hint strong {
  font-size: 0.82rem;
}

.matrix-workspace-google .matrix-empty-hint small {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
}

.auth-modal-header {
  padding-bottom: 10px;
}

.auth-modal-body {
  display: grid;
  gap: 18px;
}

.auth-form-stack {
  display: grid;
  gap: 16px;
}

.auth-section-card {
  overflow: hidden;
}

.auth-permission-summary {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.86);
}

.auth-permission-summary strong {
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--text);
}

.auth-permission-summary p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.permission-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.permission-toggle input {
  margin-top: 2px;
}

.permission-toggle span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.permission-toggle strong {
  font-size: 0.86rem;
  line-height: 1.25;
  color: var(--text);
}

.permission-toggle small {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--text-soft);
}

.permission-toggle.is-disabled {
  opacity: 0.7;
}

.auth-user-list {
  display: grid;
  gap: 14px;
}

.auth-user-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
}

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

.auth-user-card-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.auth-user-card-head strong {
  font-size: 0.98rem;
  line-height: 1.2;
  color: var(--text);
}

.auth-user-card-head small {
  font-size: 0.8rem;
  line-height: 1.25;
  color: var(--text-soft);
}

.compact-danger-button {
  min-height: 38px;
  padding-inline: 14px;
}

.compact-empty {
  min-height: 140px;
}

.auth-inline-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  background: rgba(248, 250, 252, 0.86);
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-editor-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(239, 246, 255, 0.92);
  color: #1d4ed8;
  font-size: 0.83rem;
  line-height: 1.45;
}

.product-editor-limited .visual-style-grid,
.product-editor-limited .image-gallery-stack {
  opacity: 0.72;
}

@media (max-width: 1180px) {
  .current-user-panel {
    min-width: min(100%, 520px);
  }

  .current-user-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .current-user-panel {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .current-user-actions {
    width: 100%;
  }

  .user-manager-modal-card {
    width: min(100vw - 16px, 100%);
  }

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

.comparison-workspace {
  display: grid;
  gap: 18px;
}

.comparison-workspace-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    var(--surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
}

.comparison-workspace-toolbar-main {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  flex: 1 1 760px;
}

.comparison-toolbar-field {
  display: grid;
  gap: 6px;
  min-width: min(100%, 320px);
}

.comparison-toolbar-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.comparison-toolbar-select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font: inherit;
}

.comparison-toolbar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}

.compare-dirty-pill {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
}

.comparison-toolbar-actions {
  justify-content: flex-end;
}

.comparison-workspace-body {
  display: grid;
  gap: 18px;
  align-items: start;
}

.comparison-workspace-body.is-selector-open {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
}

.comparison-workspace-body.is-selector-closed {
  grid-template-columns: minmax(0, 1fr);
}

.comparison-selector-panel,
.comparison-stage-panel {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    var(--surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.comparison-selector-panel {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 16px;
}

.comparison-selector-head,
.comparison-stage-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.comparison-selector-head {
  align-items: center;
}

.comparison-selector-head h3,
.comparison-stage-headline h3 {
  margin: 0;
  font-size: 1rem;
}

.comparison-selector-head p,
.comparison-stage-headline p {
  margin: 4px 0 0;
}

.comparison-selector-counter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1px;
  min-width: 54px;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  align-self: center;
  text-align: center;
}

.comparison-selector-counter strong {
  font-size: 0.9rem;
  line-height: 1;
  font-weight: 700;
  color: #1d4ed8;
  display: block;
  margin: 0;
}

.comparison-selector-counter small {
  font-size: 0.56rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  display: block;
  margin: 0;
}

.comparison-selector-list {
  display: grid;
  gap: 10px;
  max-height: min(72vh, 860px);
  overflow: auto;
  padding-right: 4px;
}

.comparison-selector-search {
  display: grid;
  gap: 6px;
}

.comparison-selector-search-input {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font: inherit;
}

.comparison-picker-row {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.92);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.comparison-picker-row:hover {
  border-color: rgba(59, 130, 246, 0.24);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.comparison-picker-row.is-selected {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.comparison-picker-check {
  display: grid;
  place-items: center;
}

.comparison-picker-media {
  display: grid;
  place-items: center;
}

.comparison-picker-thumb,
.comparison-picker-thumb-fallback {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: contain;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  padding: 5px;
}

.comparison-picker-copy,
.comparison-picker-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.comparison-picker-copy strong {
  font-size: 0.9rem;
  line-height: 1.25;
  color: var(--text);
}

.comparison-picker-copy small,
.comparison-picker-meta small {
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--text-soft);
}

.comparison-picker-meta {
  justify-items: end;
  text-align: right;
}

.comparison-workspace-stage {
  min-width: 0;
}

.comparison-grid--workspace {
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  align-items: start;
}

.comparison-workspace-own-card {
  height: 100%;
}

.comparison-workspace-competitors {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.comparison-cards--workspace {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.comparison-card--workspace {
  min-height: 0;
}

.comparison-remove-button {
  min-height: 36px;
  padding-inline: 12px;
}

.comparison-inline-note {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(59, 130, 246, 0.22);
  background: rgba(239, 246, 255, 0.9);
  color: #1d4ed8;
  font-size: 0.82rem;
  line-height: 1.45;
}

.comparison-table-shell {
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
}

.comparison-table-scroll {
  overflow: auto;
}

.comparison-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.comparison-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
}

.comparison-table-sticky-head,
.comparison-table-label-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(250, 250, 252, 0.98), rgba(244, 247, 250, 0.96));
}

.comparison-table-sticky-head {
  z-index: 4;
}

.comparison-table-sticky-head-label,
.comparison-table-label-cell,
.comparison-table-section-cell {
  width: 220px;
  min-width: 220px;
}

.comparison-table-head-cell,
.comparison-table-value-cell,
.comparison-table-label-cell,
.comparison-table-section-cell,
.comparison-table-sticky-head {
  padding: 8px 12px;
  border-right: 1px solid rgba(226, 232, 240, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  vertical-align: top;
  text-align: left;
}

.comparison-table-head-cell {
  min-width: 250px;
  padding: 14px 16px;
}

.comparison-table-product-head {
  display: grid;
  gap: 12px;
}

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

.comparison-remove-inline {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1;
}

.comparison-table-head-main {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.comparison-table-head-thumb,
.comparison-table-head-thumb-fallback {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: contain;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  padding: 6px;
}

.comparison-table-head-copy,
.comparison-price-stack,
.comparison-table-actions,
.comparison-table-media-wrap {
  display: grid;
  gap: 4px;
}

.comparison-table-head-copy strong {
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--text);
}

.comparison-table-head-copy span {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--text-soft);
}

.comparison-table-section-cell {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: rgba(241, 245, 249, 0.94);
}

.comparison-table-label-cell {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.comparison-table-value-cell {
  font-size: 0.83rem;
  line-height: 1.28;
  color: var(--text);
}

.comparison-table-value-cell.is-emphasis {
  background: rgba(248, 250, 252, 0.72);
}

.comparison-table-value-cell.is-media {
  background: rgba(255, 255, 255, 0.98);
}

.comparison-table-row.is-media-row .comparison-table-label-cell,
.comparison-table-row.is-media-row .comparison-table-value-cell {
  padding-top: 14px;
  padding-bottom: 14px;
}

.comparison-table-media-wrap {
  justify-items: start;
}

.comparison-table-media,
.comparison-table-media-fallback {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: contain;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  padding: 8px;
}

.comparison-price-stack {
  align-items: start;
  gap: 3px;
}

.comparison-price-stack strong {
  font-size: 0.96rem;
}

.comparison-price-stack.is-base strong {
  color: #0f172a;
}

.comparison-table-actions {
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 8px;
}

.comparison-store-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.comparison-store-price-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.comparison-store-price-line strong {
  font-size: 0.84rem;
  line-height: 1.15;
  color: var(--text);
}

.comparison-store-price-line .comparison-delta-badge {
  padding: 2px 6px;
  font-size: 0.68rem;
}

.comparison-store-meta {
  display: block;
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comparison-table-row.is-store-row .comparison-table-label-cell,
.comparison-table-row.is-store-row .comparison-table-value-cell {
  padding-top: 7px;
  padding-bottom: 7px;
}

.comparison-table-row.is-store-row .comparison-table-label-cell {
  font-size: 0.76rem;
}

.comparison-empty-state {
  min-height: 180px;
}

@media (max-width: 1320px) {
  .comparison-workspace-body.is-selector-open {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .comparison-grid--workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .comparison-workspace-toolbar-main {
    flex-direction: column;
    align-items: stretch;
  }

  .comparison-workspace-body.is-selector-open,
  .comparison-workspace-body.is-selector-closed {
    grid-template-columns: 1fr;
  }

  .comparison-selector-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .comparison-workspace-toolbar,
  .comparison-selector-panel,
  .comparison-stage-panel {
    padding: 14px;
    border-radius: 18px;
  }

  .comparison-picker-row {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }

  .comparison-picker-meta {
    grid-column: 2 / -1;
    justify-items: start;
    text-align: left;
  }

  .comparison-table {
    min-width: 820px;
  }
}

.image-preview-action-group,
.image-preview-thumb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.image-preview-thumb-actions {
  justify-content: flex-start;
}

.image-cropper-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.52);
  z-index: 1450;
}

.image-cropper-card {
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.26);
}

.image-cropper-header,
.image-cropper-body {
  padding: 18px 22px;
}

.image-cropper-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.image-cropper-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
}

.image-cropper-stage-shell {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.image-cropper-stage {
  position: relative;
  width: min(100%, 760px);
  max-height: calc(100vh - 220px);
  user-select: none;
}

.image-cropper-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: fill;
  background: #fff;
}

.image-cropper-selection {
  position: absolute;
  border: 2px solid #2563eb;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.34);
  cursor: move;
}

.image-cropper-selection-grid {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(to right, transparent 33.333%, rgba(255,255,255,0.65) 33.333%, rgba(255,255,255,0.65) 34.333%, transparent 34.333%, transparent 66.666%, rgba(255,255,255,0.65) 66.666%, rgba(255,255,255,0.65) 67.666%, transparent 67.666%),
    linear-gradient(to bottom, transparent 33.333%, rgba(255,255,255,0.65) 33.333%, rgba(255,255,255,0.65) 34.333%, transparent 34.333%, transparent 66.666%, rgba(255,255,255,0.65) 66.666%, rgba(255,255,255,0.65) 67.666%, transparent 67.666%);
  pointer-events: none;
}

.image-cropper-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid #2563eb;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.image-cropper-handle-nw {
  top: -7px;
  left: -7px;
  cursor: nwse-resize;
}

.image-cropper-handle-ne {
  top: -7px;
  right: -7px;
  cursor: nesw-resize;
}

.image-cropper-handle-sw {
  bottom: -7px;
  left: -7px;
  cursor: nesw-resize;
}

.image-cropper-handle-se {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.image-cropper-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
}

.image-cropper-stats {
  display: grid;
  gap: 10px;
}

.image-cropper-stat {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.9);
}

.image-cropper-stat span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.image-cropper-stat strong {
  font-size: 0.94rem;
}

.image-cropper-actions {
  display: grid;
  gap: 10px;
}

@media (max-width: 860px) {
  .image-cropper-body {
    grid-template-columns: 1fr;
  }

  .image-cropper-stage {
    width: 100%;
  }
}

/* Final matrix card overrides: compact, centered, stable thumbnails */
.matrix-workspace-google .matrix-product-card,
.matrix-workspace-google .matrix-product-card-regular,
.matrix-workspace-google .matrix-product-card-tight,
.matrix-workspace-google .matrix-product-card-dense,
.matrix-workspace-google .product-style-card {
  align-items: center;
}

.matrix-workspace-google .matrix-product-card .mini-product-visual,
.matrix-workspace-google .matrix-product-card-regular .mini-product-visual,
.matrix-workspace-google .matrix-product-card-tight .mini-product-visual,
.matrix-workspace-google .matrix-product-card-dense .mini-product-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  contain: layout paint;
}

.matrix-workspace-google .matrix-product-card .mini-product-main,
.matrix-workspace-google .matrix-product-card-regular .mini-product-main,
.matrix-workspace-google .matrix-product-card-tight .mini-product-main,
.matrix-workspace-google .matrix-product-card-dense .mini-product-main {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 100%;
  width: 100%;
}

.matrix-workspace-google .matrix-product-card .mini-product-meta,
.matrix-workspace-google .matrix-product-card-regular .mini-product-meta,
.matrix-workspace-google .matrix-product-card-tight .mini-product-meta,
.matrix-workspace-google .matrix-product-card-dense .mini-product-meta {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-title-row,
.matrix-workspace-google .matrix-product-card-regular .mini-product-title-row,
.matrix-workspace-google .matrix-product-card-tight .mini-product-title-row,
.matrix-workspace-google .matrix-product-card-dense .mini-product-title-row {
  width: 100%;
  min-width: 0;
  align-items: center;
}

.matrix-workspace-google .matrix-product-card .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-regular .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-tight .mini-product-title-link,
.matrix-workspace-google .matrix-product-card-dense .mini-product-title-link,
.matrix-workspace-google .matrix-product-card .mini-product-price,
.matrix-workspace-google .matrix-product-card-regular .mini-product-price,
.matrix-workspace-google .matrix-product-card-tight .mini-product-price,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price {
  align-self: center;
}

.matrix-workspace-google .matrix-product-card .mini-product-code,
.matrix-workspace-google .matrix-product-card-regular .mini-product-code,
.matrix-workspace-google .matrix-product-card-tight .mini-product-code,
.matrix-workspace-google .matrix-product-card-dense .mini-product-code {
  display: none !important;
}

.matrix-workspace-google .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-product-card .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-product-card-regular .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-regular .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-product-card-tight .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-tight .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-product-card-dense .mini-product-thumb,
.matrix-workspace-google .matrix-product-card-dense .mini-product-thumb-fallback {
  display: block;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Final compact product editor overrides */
.product-editor-card {
  width: min(1160px, calc(100vw - 20px));
  max-height: calc(100vh - 24px);
  border-radius: 22px;
}

.product-editor-card .modal-header,
.product-editor-card .modal-body,
.product-editor-card .modal-footer {
  padding: 14px 16px;
}

.product-editor-card .modal-header {
  align-items: flex-start;
}

.product-editor-card .modal-header > div {
  min-height: 0;
}

.product-editor-card .modal-header .inline-actions {
  gap: 8px;
  align-items: center;
}

.product-editor-card .modal-header .pill {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.product-editor-card .eyebrow {
  margin-bottom: 2px;
}

.product-editor-card .product-editor-body {
  gap: 10px;
}

.product-editor-card .editor-hero-grid-compact {
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 10px;
}

.product-editor-card .editor-columns {
  gap: 10px;
}

.product-editor-card .editor-section,
.product-editor-card .section-card {
  border-radius: 16px;
}

.product-editor-card .editor-section .panel-heading {
  min-height: 0;
  padding: 10px 12px;
  gap: 6px;
}

.product-editor-card .editor-section .panel-heading > div {
  min-height: 0;
  gap: 2px;
}

.product-editor-card .editor-section .panel-heading h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.product-editor-card .editor-section .panel-heading .helper-text,
.product-editor-card .panel-hint,
.product-editor-card .editor-hero-grid .panel-body > .helper-text,
.product-editor-card .product-style-tools > .helper-text,
.product-editor-card .modal-footer > .helper-text,
.product-editor-card .image-preview-empty > .helper-text {
  display: none;
}

.product-editor-card .panel-body {
  padding: 10px 12px 12px;
}

.product-editor-card .form-stack,
.product-editor-card .product-style-tools,
.product-editor-card .matching-section,
.product-editor-card .series-settings-fields {
  gap: 10px;
}

.product-editor-card .compact-grid,
.product-editor-card .offer-editor-grid,
.product-editor-card .spec-row-grid,
.product-editor-card .compact-inline-form,
.product-editor-card .compact-inline-form-wide {
  gap: 8px 10px;
}

.product-editor-card .field span {
  margin-bottom: 4px;
  font-size: 0.76rem;
}

.product-editor-card .field input,
.product-editor-card .field select,
.product-editor-card .field textarea {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 0.875rem;
}

.product-editor-card .field textarea {
  min-height: 76px;
}

.product-editor-card .primary-button,
.product-editor-card .secondary-button,
.product-editor-card .ghost-button,
.product-editor-card .danger-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 11px;
}

.product-editor-card .mini-button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 0.8rem;
}

.product-editor-card .editor-media-section .panel-body,
.product-editor-card .image-preview-layout,
.product-editor-card .image-preview-primary,
.product-editor-card .image-preview-thumbs,
.product-editor-card .image-preview-empty {
  gap: 8px;
}

.product-editor-card .image-preview-main,
.product-editor-card .details-hero-image {
  min-height: 180px;
  max-height: 220px;
  border-radius: 16px;
}

.product-editor-card .image-preview-main-fallback {
  border-radius: 16px;
}

.product-editor-card .image-preview-primary-actions {
  gap: 8px;
}

.product-editor-card .image-preview-thumb-card {
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
}

.product-editor-card .image-preview-thumb {
  height: 72px;
  border-radius: 12px;
}

.product-editor-card .image-preview-action-group,
.product-editor-card .image-preview-thumb-actions {
  gap: 4px;
}

.product-editor-card .compact-dropzone {
  min-height: 96px;
  padding: 12px;
  border-radius: 14px;
}

.product-editor-card .compact-dropzone strong {
  font-size: 0.88rem;
}

.product-editor-card .compact-dropzone .helper-text {
  font-size: 0.76rem;
}

.product-editor-card .editor-media-link-row {
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}

.product-editor-card .series-settings-grid {
  grid-template-columns: minmax(0, 1fr) minmax(200px, 0.68fr);
  gap: 10px;
}

.product-editor-card .checkbox-card,
.product-editor-card .checkbox-card-inline {
  gap: 4px;
  padding: 9px 10px;
  border-radius: 14px;
}

.product-editor-card .checkbox-card-base {
  padding-block: 9px;
}

.product-editor-card .checkbox-card-head {
  gap: 8px;
}

.product-editor-card .checkbox-card small {
  font-size: 0.74rem;
  line-height: 1.3;
}

.product-editor-card .offer-editor-card,
.product-editor-card .spec-row {
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: none;
}

.product-editor-card .matching-table-wrap {
  border-radius: 14px;
}

.product-editor-card .product-style-preview-card {
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
}

@media (max-width: 1120px) {
  .product-editor-card .editor-hero-grid-compact,
  .product-editor-card .editor-columns,
  .product-editor-card .series-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Final product editor redesign */
.product-editor-card {
  width: min(1380px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.product-editor-card form {
  display: grid;
}

.product-editor-card .modal-header,
.product-editor-card .modal-body,
.product-editor-card .modal-footer {
  padding: 16px 20px;
}

.product-editor-card .modal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
}

.product-editor-card .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 30;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e2e8f0;
}

.product-editor-card .modal-footer > .helper-text {
  display: none;
}

.product-editor-card .product-editor-body {
  gap: 0;
  background: #ffffff;
}

.product-editor-card .product-editor-shell {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.product-editor-card .product-editor-sidebar,
.product-editor-card .product-editor-main {
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}

.product-editor-card .product-editor-main {
  min-width: 0;
}

.product-editor-card .product-editor-shell > *,
.product-editor-card .product-editor-two-column > *,
.product-editor-card .product-editor-row > *,
.product-editor-card .product-editor-extra-grid > *,
.product-editor-card .product-editor-offer-grid > *,
.product-editor-card .product-editor-spec-grid > * {
  min-width: 0;
}

.product-editor-card .product-editor-panel,
.product-editor-card .section-card,
.product-editor-card .editor-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.product-editor-card .panel-heading {
  display: none;
}

.product-editor-card .product-editor-panel-body,
.product-editor-card .editor-section .panel-body {
  display: grid;
  gap: 12px;
  padding: 0;
}

.product-editor-card .product-editor-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.product-editor-card .product-editor-section-head-inline {
  align-items: center;
}

.product-editor-card .product-editor-section-head > div,
.product-editor-card .product-editor-section-head > label,
.product-editor-card .product-editor-panel-body > * {
  min-width: 0;
}

.product-editor-card .product-editor-section-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
}

.product-editor-card .product-editor-header-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-editor-card .product-editor-header-copy h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.product-editor-card .product-editor-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-editor-card .product-editor-id-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.product-editor-card .product-editor-close {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: #475569;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.product-editor-card .product-editor-close:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.product-editor-card .eyebrow {
  margin-bottom: 0;
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.12em;
}

.product-editor-card .field,
.product-editor-card .style-color-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.product-editor-card .field span,
.product-editor-card .style-color-field > span,
.product-editor-card .toggle-field-label,
.product-editor-card .image-preview-caption,
.product-editor-card .helper-text {
  font-size: 12px;
  color: #64748b;
}

.product-editor-card .field input,
.product-editor-card .field select,
.product-editor-card .field textarea,
.product-editor-card .product-editor-list-input,
.product-editor-card .style-color-value {
  width: 100%;
  height: 36px;
  min-height: 36px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
  color: #0f172a;
  box-shadow: none;
}

.product-editor-card .field textarea {
  min-height: 76px;
  padding: 8px 10px;
}

.product-editor-card .product-editor-list-input::placeholder,
.product-editor-card .field input::placeholder,
.product-editor-card .field textarea::placeholder {
  color: #94a3b8;
}

.product-editor-card .field input:focus,
.product-editor-card .field select:focus,
.product-editor-card .field textarea:focus,
.product-editor-card .product-editor-list-input:focus,
.product-editor-card .style-color-swatch:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

.product-editor-card .primary-button,
.product-editor-card .secondary-button,
.product-editor-card .ghost-button,
.product-editor-card .danger-button,
.product-editor-card .product-editor-head-button {
  height: 36px;
  min-height: 36px;
  border-radius: 6px;
}

.product-editor-card .primary-button,
.product-editor-card .secondary-button,
.product-editor-card .ghost-button,
.product-editor-card .danger-button {
  padding: 0 12px;
}

.product-editor-card .product-editor-head-button {
  width: 32px;
  padding: 0;
  border: 1px solid #dbe3ee;
  background: #ffffff;
  color: #475569;
  font-size: 18px;
  line-height: 1;
}

.product-editor-card .product-editor-head-button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.product-editor-card .product-editor-form-grid,
.product-editor-card .product-editor-two-column,
.product-editor-card .product-editor-row,
.product-editor-card .product-editor-extra-grid {
  display: grid;
  gap: 12px;
}

.product-editor-card .product-editor-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.product-editor-card .product-editor-row-meta,
.product-editor-card .product-editor-row-taxonomy {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-editor-card .product-editor-price-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.product-editor-card .product-editor-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  white-space: nowrap;
}

.product-editor-card .toggle-field-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-editor-card .toggle-switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
}

.product-editor-card .toggle-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.product-editor-card .toggle-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 160ms ease;
}

.product-editor-card .toggle-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  transition: transform 160ms ease;
}

.product-editor-card .toggle-switch input:checked + .toggle-switch-track {
  background: #2563eb;
}

.product-editor-card .toggle-switch input:checked + .toggle-switch-track::after {
  transform: translateX(16px);
}

.product-editor-card .toggle-switch input:focus-visible + .toggle-switch-track {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.product-editor-card .product-editor-extra-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-editor-card .product-editor-inline-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px auto;
  gap: 8px;
  align-items: end;
}

.product-editor-card .product-editor-inline-tools > * {
  min-width: 0;
}

.product-editor-card .product-editor-list-stack {
  display: grid;
  gap: 0;
}

.product-editor-card .product-editor-list-row,
.product-editor-card .offer-editor-card,
.product-editor-card .spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.product-editor-card .product-editor-list-row:last-child,
.product-editor-card .offer-editor-card:last-child,
.product-editor-card .spec-row:last-child {
  border-bottom: 0;
}

.product-editor-card .product-editor-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  opacity: 0.35;
  transition: opacity 160ms ease;
}

.product-editor-card .product-editor-list-row:hover .product-editor-row-actions {
  opacity: 1;
}

.product-editor-card .product-editor-row-icon {
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  border-radius: 6px;
}

.product-editor-card .product-editor-row-icon:hover {
  background: #fff1f2;
  color: #b42318;
}

.product-editor-card .product-editor-offer-grid,
.product-editor-card .product-editor-spec-grid {
  display: grid;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.product-editor-card .product-editor-offer-grid {
  grid-template-columns: minmax(120px, 1fr) 92px minmax(112px, 0.9fr) minmax(0, 1.2fr);
}

.product-editor-card .product-editor-sidebar .product-editor-offer-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "store store"
    "price article"
    "url url";
}

.product-editor-card .offer-store-picker {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.product-editor-card .offer-store-picker > * {
  min-width: 0;
}

.product-editor-card .product-editor-sidebar .offer-store-picker {
  grid-area: store;
}

.product-editor-card .product-editor-sidebar .product-editor-offer-grid [name="offerPrice"] {
  grid-area: price;
}

.product-editor-card .product-editor-sidebar .product-editor-offer-grid [name="offerArticle"] {
  grid-area: article;
}

.product-editor-card .product-editor-sidebar .product-editor-offer-grid [name="offerUrl"] {
  grid-area: url;
}

.product-editor-card .product-editor-sidebar .product-editor-list-row,
.product-editor-card .product-editor-sidebar .offer-editor-card {
  align-items: start;
}

.product-editor-card .product-editor-sidebar .offer-editor-actions,
.product-editor-card .product-editor-sidebar .product-editor-row-actions {
  align-self: start;
  padding-top: 2px;
}

.product-editor-card .product-editor-spec-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.product-editor-card .product-editor-empty {
  min-height: 74px;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.product-editor-card .product-editor-media-body,
.product-editor-card .compact-image-list,
.product-editor-card .image-preview-layout,
.product-editor-card .image-preview-empty {
  display: grid;
  gap: 10px;
}

.product-editor-card .image-preview-stage {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.product-editor-card .image-preview-main,
.product-editor-card .image-preview-main-fallback {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.product-editor-card .image-preview-main-fallback {
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
  color: #64748b;
}

.product-editor-card .image-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-editor-card .image-preview-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-editor-card .image-preview-action-group .mini-button {
  min-height: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}

.product-editor-card .image-preview-thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-editor-card .image-thumb-tile {
  display: grid;
  gap: 4px;
  width: 44px;
}

.product-editor-card .image-thumb-select {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.product-editor-card .image-thumb-tile.is-active .image-thumb-select {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.product-editor-card .image-preview-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.product-editor-card .image-thumb-row-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.product-editor-card .image-thumb-icon {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  line-height: 1;
}

.product-editor-card .image-thumb-icon:hover {
  border-color: #cbd5e1;
  color: #0f172a;
}

.product-editor-card .product-editor-dropzone {
  min-height: 78px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}

.product-editor-card .product-editor-dropzone-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: #475569;
  font-size: 16px;
  font-weight: 700;
  flex: 0 0 auto;
}

.product-editor-card .product-editor-dropzone-copy {
  display: grid;
  gap: 2px;
}

.product-editor-card .product-editor-dropzone-copy strong {
  font-size: 13px;
  line-height: 1.2;
  color: #0f172a;
}

.product-editor-card .product-editor-dropzone-copy span {
  font-size: 12px;
  color: #64748b;
}

.product-editor-card .product-editor-linkbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.product-editor-card .matching-section {
  gap: 12px;
}

.product-editor-card .matching-section.is-disabled {
  padding: 12px;
  border: 1px dashed #dbe3e8;
  border-radius: 8px;
  background: #f8fafc;
}

.product-editor-card .matching-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product-editor-card .matching-list {
  display: grid;
  gap: 0;
}

.product-editor-card .matching-list-row {
  display: grid;
  grid-template-columns: 20px 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.product-editor-card .matching-list-row:last-child {
  border-bottom: 0;
}

.product-editor-card .matching-list-row.is-selected {
  background: rgba(37, 99, 235, 0.03);
}

.product-editor-card .matching-list-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-editor-card .matching-list-check input {
  margin: 0;
}

.product-editor-card .matching-product-thumb,
.product-editor-card .matching-product-thumb-fallback {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.product-editor-card .matching-list-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-editor-card .matching-list-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.25;
}

.product-editor-card .matching-list-meta {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-editor-card .matching-list-aside {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.product-editor-card .matching-list-price {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.product-editor-card .matching-list-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
}

.product-editor-card .matching-list-chip.is-muted {
  background: #f8fafc;
  color: #64748b;
}

.product-editor-card .product-editor-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  align-items: start;
}

.product-editor-card .style-color-control {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.product-editor-card .style-color-swatch {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}

.product-editor-card .style-color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

.product-editor-card .style-color-swatch::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.product-editor-card .style-color-value {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-editor-card .style-color-control:has(.style-color-swatch:disabled) .style-color-value {
  background: #f8fafc;
  color: #94a3b8;
}

.product-editor-card .product-style-preview-wrap {
  display: grid;
  min-width: 0;
  margin-top: 2px;
}

.product-editor-card .product-style-preview-card {
  gap: 8px;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: none;
  min-width: 0;
}

.product-editor-card .product-style-preview-head,
.product-editor-card .product-style-preview-meta {
  min-width: 0;
  flex-wrap: wrap;
}

.product-editor-card .product-style-preview-title {
  font-size: 18px;
  line-height: 1.2;
}

.product-editor-card .product-style-preview-meta {
  font-size: 12px;
}

.product-editor-card .product-editor-footer-actions {
  margin-left: auto;
}

@media (max-width: 1160px) {
  .product-editor-card .product-editor-shell {
    grid-template-columns: 272px minmax(0, 1fr);
  }

  .product-editor-card .product-editor-offer-grid {
    grid-template-columns: minmax(100px, 1fr) 88px minmax(100px, 0.9fr) minmax(0, 1fr);
  }

  .product-editor-card .product-editor-sidebar .product-editor-offer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "store store"
      "price article"
      "url url";
  }
}

@media (max-width: 1040px) {
  .product-editor-card .product-editor-shell,
  .product-editor-card .product-editor-two-column,
  .product-editor-card .product-editor-row-meta,
  .product-editor-card .product-editor-row-taxonomy,
  .product-editor-card .product-editor-extra-grid,
  .product-editor-card .product-editor-style-grid {
    grid-template-columns: 1fr;
  }

  .product-editor-card .product-editor-sidebar {
    order: 2;
  }

  .product-editor-card .product-editor-main {
    order: 1;
  }

  .product-editor-card .product-editor-price-toggle,
  .product-editor-card .product-editor-linkbar,
  .product-editor-card .product-editor-inline-tools,
  .product-editor-card .product-editor-offer-grid {
    grid-template-columns: 1fr;
  }

  .product-editor-card .product-editor-inline-toggle {
    justify-self: start;
  }

  .product-editor-card .product-editor-sidebar .product-editor-offer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "store store"
      "price article"
      "url url";
  }
}

@media (max-width: 720px) {
  .product-editor-card {
    width: min(100vw, calc(100vw - 8px));
    max-height: calc(100vh - 8px);
    border-radius: 0;
  }

  .product-editor-card .modal-header,
  .product-editor-card .modal-body,
  .product-editor-card .modal-footer {
    padding: 12px;
  }

  .product-editor-card .product-editor-header-copy h2 {
    font-size: 22px;
  }

  .product-editor-card .product-editor-header-actions {
    gap: 8px;
  }

  .product-editor-card .product-editor-sidebar .product-editor-offer-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "store"
      "price"
      "article"
      "url";
  }
}

/* Reference-driven analytical dashboard skin */
:root {
  --surface-page-contrast: #e1e8ee;
  --surface-card-contrast: #ffffff;
  --surface-muted-contrast: #ecedf0;
  --surface-soft-contrast: #f6f8fb;
  --border-contrast: #d5dee8;
  --border-contrast-strong: #c6d0db;
  --text-contrast: #0f172a;
  --text-contrast-muted: #5f6f82;
  --shadow-panel-contrast: 0 8px 22px rgba(15, 23, 42, 0.08);
  --shadow-card-contrast: 0 3px 12px rgba(15, 23, 42, 0.08);
}

body {
  background: var(--surface-page-contrast);
  color: var(--text-contrast);
}

.app-shell {
  background: transparent;
  gap: 0;
}

.topbar {
  align-items: center;
  background: var(--surface-card-contrast);
  border: 1px solid var(--border-contrast);
  border-radius: 18px;
  box-shadow: var(--shadow-panel-contrast);
  margin-bottom: 12px;
}

.brand-block {
  align-items: center;
}

.topbar .brand-block > div {
  display: flex;
  align-items: center;
  min-height: 32px;
}

.topbar .brand-block .eyebrow,
.topbar .search-field > span {
  display: none !important;
}

.eyebrow {
  color: #7a8797;
  letter-spacing: 0.12em;
}

.topbar h1 {
  color: #16212f;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-actions > * {
  align-self: center;
}

.topbar .search-field {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.topbar .search-field input {
  margin: 0;
}

.search-field input,
.select-field select,
.current-user-panel,
.notification-bell {
  background: #ffffff;
  border: 1px solid var(--border-contrast);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.current-user-panel {
  border-radius: 14px;
}

.notification-bell {
  border-radius: 12px;
}

.stats-grid {
  gap: 10px;
}

.stats-card {
  background: var(--surface-card-contrast);
  border: 1px solid var(--border-contrast);
  border-radius: 14px;
  box-shadow: var(--shadow-card-contrast);
}

.stats-card h2,
.stats-card strong {
  color: #16212f;
}

.stats-card small {
  color: var(--text-contrast-muted);
}

.workspace {
  align-items: start;
  margin: 0;
}

.sidebar > .panel,
.toolbar-panel,
.content-panel {
  background: var(--surface-card-contrast);
  border: 1px solid var(--border-contrast);
  box-shadow: var(--shadow-panel-contrast);
}

.sidebar > .panel {
  border-radius: 18px;
}

.toolbar-panel,
.content-panel {
  border-radius: 18px;
}

.panel-heading {
  padding: 14px 14px 0;
}

.panel-heading h2 {
  color: #16212f;
}

.panel-body {
  padding: 12px 14px 14px;
}

.filter-stack,
.filter-stack-dense {
  gap: 0;
}

.filter-group-quick {
  padding: 0 0 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid #dbe4ed;
}

.filter-accordion {
  border: 0;
  border-bottom: 1px solid #dbe4ed;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.filter-accordion:last-child {
  border-bottom: 0;
}

.filter-accordion-toggle {
  padding: 12px 0;
  gap: 10px;
}

.filter-accordion-copy {
  gap: 3px;
}

.filter-accordion-copy strong {
  color: #1f2a37;
  font-size: 0.88rem;
  font-weight: 700;
}

.filter-accordion-copy small {
  color: var(--text-contrast-muted);
}

.filter-accordion-meta {
  border-radius: 999px;
  border-color: #d2dbe5;
  background: var(--surface-soft-contrast);
  color: #607084;
}

.filter-accordion-body {
  gap: 8px;
  padding: 0 0 12px;
  border-top: 0;
}

.filter-search-field input {
  min-height: 30px;
  background: #f9fbfd;
  border-color: #d7e0e9;
}

.checkbox-list,
.checkbox-list-compact {
  gap: 6px;
}

.checkbox-list-compact .checkbox-pill,
.filter-stack .checkbox-pill {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid #d7e0e9;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.checkbox-list-compact .checkbox-pill:hover,
.filter-stack .checkbox-pill:hover {
  border-color: #bcc8d6;
  background: #fbfdff;
}

.checkbox-pill .truncate-single {
  color: #1f2a37;
}

.toolbar-panel {
  padding: 6px 14px;
}

.segmented-control {
  background: #eff3f7;
  border: 1px solid #d4dde7;
  border-radius: 14px;
}

.segment {
  color: #4f5f72;
  border-radius: 10px;
}

.segment.active {
  background: #ffffff;
  color: #16212f;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.secondary-button,
.ghost-button,
.toolbar-menu-trigger {
  border-color: #d4dde7;
  color: #344256;
}

.primary-button {
  background: #5c6675;
  border-color: #5c6675;
  color: #ffffff;
}

.toolbar-menu-panel {
  background: #ffffff;
  border: 1px solid #d4dde7;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.content-panel {
  overflow: hidden;
}

.matrix-workspace-google {
  gap: 12px;
}

.matrix-workspace-google .matrix-toolbar-panel {
  align-items: center;
}

.matrix-workspace-google .matrix-toolbar-side {
  align-self: center;
  align-content: center;
  justify-items: end;
}

.matrix-workspace-google .matrix-toolbar-panel {
  background: #ffffff;
  border: 1px solid #d7e0e9;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.matrix-workspace-google .matrix-toolbar-copy h3 {
  color: #16212f;
}

.matrix-workspace-google .matrix-toolbar-copy .eyebrow {
  display: none;
}

.matrix-workspace-google .matrix-toolbar-panel {
  padding: 8px 12px;
  gap: 8px;
}

.matrix-workspace-google .matrix-toolbar-copy {
  gap: 2px;
}

.matrix-workspace-google .matrix-kpi,
.matrix-workspace-google .legend-chip {
  background: #ffffff;
  border: 1px solid #d7e0e9;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  color: #425466;
  font-size: 0.72rem;
  padding: 5px 8px;
}

.matrix-workspace-google .matrix-toolbar-kpis .legend-chip-open {
  background: rgba(238, 249, 239, 0.72);
  border-color: #dbe8dc;
  color: #607465;
}

.matrix-workspace-google .matrix-toolbar-kpis .legend-chip:not(.legend-chip-open):not(.legend-chip-dense) {
  background: rgba(255, 248, 225, 0.72);
  border-color: #eee3bf;
  color: #7a6d47;
}

.matrix-workspace-google .matrix-toolbar-kpis .legend-chip-dense {
  background: rgba(255, 239, 239, 0.72);
  border-color: #f0d7d7;
  color: #8a5f5f;
}

.matrix-workspace-google .matrix-kpi strong {
  color: #16212f;
}

.matrix-workspace-google .matrix-board-shell {
  padding: 10px;
  border-radius: 16px;
  background: #fbfcfe;
  border: 1px solid #dce4ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.matrix-workspace-google .matrix-board-google {
  gap: 8px;
  background: transparent;
}

.matrix-workspace-google .matrix-corner-chip,
.matrix-workspace-google .axis-chip-top,
.matrix-workspace-google .axis-chip-side,
.matrix-workspace-google .axis-chip-side-sticky,
.matrix-workspace-google .matrix-board-google .axis-chip-top,
.matrix-workspace-google .matrix-board-google .axis-chip-side-sticky {
  background: #eceef0 !important;
  border-color: #d9dde2 !important;
  box-shadow: none !important;
}

.matrix-workspace-google .axis-chip-top,
.matrix-workspace-google .matrix-board-google .axis-chip-top {
  box-sizing: border-box;
  min-height: var(--matrix-header-height, 38px);
  height: var(--matrix-header-height, 38px);
  align-self: stretch;
  padding: 4px 10px;
  overflow: hidden;
  border-radius: 8px;
  font-weight: 700;
}

.matrix-workspace-google .matrix-corner-chip,
.matrix-workspace-google .matrix-board-google .matrix-corner-chip {
  box-sizing: border-box;
  min-height: var(--matrix-header-height, 38px);
  height: var(--matrix-header-height, 38px);
  align-self: stretch;
  border-radius: 8px;
}

.matrix-workspace-google .axis-chip-side-sticky,
.matrix-workspace-google .matrix-board-google .axis-chip-side-sticky {
  box-shadow: 6px 0 12px rgba(148, 163, 184, 0.12) !important;
  border-radius: 10px;
}

.matrix-workspace-google .axis-chip-top strong,
.matrix-workspace-google .axis-chip-side strong,
.matrix-workspace-google .axis-chip-side-sticky strong,
.matrix-workspace-google .matrix-board-google .axis-chip-top strong,
.matrix-workspace-google .matrix-board-google .axis-chip-side-sticky strong {
  color: #334155 !important;
  font-weight: 700;
}

.matrix-workspace-google .axis-chip-top small,
.matrix-workspace-google .axis-chip-side-sticky small,
.matrix-workspace-google .matrix-board-google .axis-chip-top small,
.matrix-workspace-google .matrix-board-google .axis-chip-side-sticky small {
  color: #8a97a6 !important;
}

.matrix-workspace-google .axis-chip-copy-store {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.matrix-workspace-google .matrix-axis-store-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.matrix-workspace-google .axis-chip-top .matrix-axis-store-line {
  justify-content: flex-start;
}

.matrix-workspace-google .axis-chip-side-sticky .matrix-axis-store-line {
  justify-content: flex-start;
}

.matrix-workspace-google .matrix-axis-store-logo {
  display: block;
  max-width: 26px;
  max-height: 16px;
  width: auto;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.matrix-workspace-google .matrix-axis-store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 16px;
  padding: 0 5px;
  border: 1px solid #d9dde2;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.matrix-workspace-google .axis-chip-copy-store strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-workspace-google .matrix-cell {
  border: 1px solid #e3e9f0;
  border-left-width: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.matrix-workspace-google .matrix-cell::after {
  content: none !important;
}

.matrix-workspace-google .matrix-cell.cell-open {
  background: transparent;
  border-color: #e7edf4;
}

.matrix-workspace-google .matrix-cell.cell-open:not(:has(.matrix-empty-hint)) {
  background: rgba(238, 249, 239, 0.38);
  border-color: #dbe8dc;
}

.matrix-workspace-google .matrix-cell.cell-balanced {
  background: rgba(255, 255, 255, 0.86);
}

.matrix-workspace-google .matrix-cell.cell-balanced:not(:has(.matrix-empty-hint)) {
  background: rgba(255, 248, 225, 0.36);
  border-color: #eee3bf;
}

.matrix-workspace-google .matrix-cell.cell-dense {
  background: rgba(250, 252, 255, 0.92);
  border-color: #dde5ee;
}

.matrix-workspace-google .matrix-cell.cell-dense:not(:has(.matrix-empty-hint)) {
  background: rgba(255, 239, 239, 0.34);
  border-color: #f0d7d7;
}

.matrix-workspace-google .cell-caption small {
  color: #8a97a6;
}

.matrix-workspace-google .cell-caption strong {
  color: #16212f;
}

.matrix-workspace-google .cell-count {
  border: 1px solid #d6dfe8;
  background: #ffffff;
  color: #607084;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.matrix-workspace-google .matrix-card-stack,
.matrix-workspace-google .cell-items {
  gap: 7px;
}

.matrix-workspace-google .matrix-product-card,
.matrix-workspace-google .matrix-product-card-regular,
.matrix-workspace-google .matrix-product-card-tight,
.matrix-workspace-google .matrix-product-card-dense,
.matrix-workspace-google .product-style-card,
.matrix-workspace-google .matrix-empty-hint {
  background: #ffffff;
  border: 1px solid #dde5ee;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.matrix-workspace-google .matrix-product-card:hover {
  border-color: #c9d3df;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.matrix-workspace-google .matrix-product-card::before,
.matrix-workspace-google .matrix-product-card-regular::before,
.matrix-workspace-google .matrix-product-card-tight::before,
.matrix-workspace-google .matrix-product-card-dense::before,
.matrix-workspace-google .product-style-card::before {
  width: 3px;
  inset: 6px auto 6px 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-thumb,
.matrix-workspace-google .matrix-product-card .mini-product-thumb-fallback,
.matrix-workspace-google .product-style-card .mini-product-thumb,
.matrix-workspace-google .product-style-card .mini-product-thumb-fallback {
  background: #ffffff;
  border-color: #d7e0e9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.matrix-workspace-google .matrix-product-card .mini-product-title-link,
.matrix-workspace-google .matrix-product-card .mini-product-price,
.matrix-workspace-google .product-style-card .mini-product-title-link,
.matrix-workspace-google .product-style-card .mini-product-price {
  color: #16212f;
}

.matrix-workspace-google .matrix-product-card .mini-product-code,
.matrix-workspace-google .matrix-empty-hint small {
  color: #758497;
}

.matrix-workspace-google .matrix-empty-hint {
  min-height: 72px;
  justify-items: center;
  text-align: center;
  border-style: dashed;
  border-width: 1px;
  border-color: #d9e1ea;
  background: transparent;
  box-shadow: none;
}

.matrix-workspace-google .matrix-empty-hint strong {
  color: #97a3b2;
  font-weight: 500;
}

.matrix-workspace-google .matrix-empty-hint small {
  display: none;
}

.matrix-workspace-google .matrix-cell:has(.matrix-empty-hint) .cell-head {
  justify-content: flex-end;
  min-height: 18px;
  padding-bottom: 2px;
}

.matrix-workspace-google .matrix-cell:has(.matrix-empty-hint) .cell-caption {
  display: none;
}

.matrix-workspace-google .matrix-cell:has(.matrix-empty-hint) .cell-count {
  display: none;
}

.matrix-workspace-google .matrix-cell:has(.matrix-empty-hint) .matrix-empty-hint {
  min-height: 72px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.matrix-workspace-google .matrix-cell:has(.matrix-empty-hint) .matrix-empty-hint::before {
  content: none !important;
  display: none !important;
}

.matrix-workspace-google .matrix-cell:has(.matrix-empty-hint) .matrix-empty-hint strong,
.matrix-workspace-google .matrix-cell:has(.matrix-empty-hint) .matrix-empty-hint small {
  display: none !important;
}

.matrix-frame .matrix-toolbar-meta {
  display: none !important;
}

.matrix-workspace-google .matrix-toolbar-controls {
  align-items: center;
  gap: 6px;
}

.matrix-workspace-google .matrix-toolbar-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: auto;
}

.matrix-workspace-google .matrix-toolbar-select span {
  margin: 0;
  white-space: nowrap;
}

.matrix-workspace-google .matrix-toolbar-select select {
  min-height: 32px;
}

.matrix-workspace-google .matrix-product-card .mini-product-price-stack,
.matrix-workspace-google .matrix-product-card-regular .mini-product-price-stack,
.matrix-workspace-google .matrix-product-card-tight .mini-product-price-stack,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price-stack,
.matrix-workspace-google .product-style-card .mini-product-price-stack {
  display: grid;
  justify-items: end;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.matrix-workspace-google .matrix-product-card .mini-product-price-stack .mini-product-price,
.matrix-workspace-google .matrix-product-card-regular .mini-product-price-stack .mini-product-price,
.matrix-workspace-google .matrix-product-card-tight .mini-product-price-stack .mini-product-price,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price-stack .mini-product-price,
.matrix-workspace-google .product-style-card .mini-product-price-stack .mini-product-price {
  justify-self: end;
  text-align: right;
}

.matrix-workspace-google .matrix-product-card .mini-product-price-origin,
.matrix-workspace-google .matrix-product-card-regular .mini-product-price-origin,
.matrix-workspace-google .matrix-product-card-tight .mini-product-price-origin,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price-origin,
.matrix-workspace-google .product-style-card .mini-product-price-origin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  min-height: 14px;
  font-size: 0.56rem;
  line-height: 1;
  color: #718096;
}

.matrix-workspace-google .matrix-product-card .mini-product-price-origin-base,
.matrix-workspace-google .matrix-product-card-regular .mini-product-price-origin-base,
.matrix-workspace-google .matrix-product-card-tight .mini-product-price-origin-base,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price-origin-base,
.matrix-workspace-google .product-style-card .mini-product-price-origin-base {
  padding: 1px 4px;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  background: #f7f9fc;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.matrix-workspace-google .matrix-product-card .mini-product-price-origin-store,
.matrix-workspace-google .matrix-product-card-regular .mini-product-price-origin-store,
.matrix-workspace-google .matrix-product-card-tight .mini-product-price-origin-store,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price-origin-store,
.matrix-workspace-google .product-style-card .mini-product-price-origin-store {
  min-width: 24px;
}

.matrix-workspace-google .matrix-product-card .mini-product-price-origin-logo,
.matrix-workspace-google .matrix-product-card-regular .mini-product-price-origin-logo,
.matrix-workspace-google .matrix-product-card-tight .mini-product-price-origin-logo,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price-origin-logo,
.matrix-workspace-google .product-style-card .mini-product-price-origin-logo {
  display: block;
  max-width: 28px;
  max-height: 14px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.matrix-workspace-google .matrix-product-card .mini-product-price-origin-fallback,
.matrix-workspace-google .matrix-product-card-regular .mini-product-price-origin-fallback,
.matrix-workspace-google .matrix-product-card-tight .mini-product-price-origin-fallback,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price-origin-fallback,
.matrix-workspace-google .product-style-card .mini-product-price-origin-fallback {
  padding: 1px 4px;
  border-radius: 999px;
  background: #f8fafc;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-price-origin,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price-origin,
.matrix-workspace-google .product-style-card.matrix-product-card-tight .mini-product-price-origin,
.matrix-workspace-google .product-style-card.matrix-product-card-dense .mini-product-price-origin {
  font-size: 0.52rem;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-price-origin-logo,
.matrix-workspace-google .matrix-product-card-dense .mini-product-price-origin-logo,
.matrix-workspace-google .product-style-card.matrix-product-card-tight .mini-product-price-origin-logo,
.matrix-workspace-google .product-style-card.matrix-product-card-dense .mini-product-price-origin-logo {
  max-width: 24px;
  max-height: 12px;
}

.matrix-workspace-google .matrix-more-badge {
  background: #ffffff;
  border: 1px solid #dde5ee;
  box-shadow: none;
}

.notifications-drawer {
  background: #ffffff;
  border-left: 1px solid #d7e0e9;
  box-shadow: -10px 0 26px rgba(15, 23, 42, 0.14);
}

@media (max-width: 1240px) {
  .topbar {
    align-items: flex-start;
  }

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

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .content-area {
    order: 1;
  }
}

/* Compact grid editor for product-type templates */
.templates-manager-card {
  width: min(1180px, calc(100vw - 36px));
}

.templates-manager-body {
  gap: 16px;
}

.templates-editor-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.templates-manager-heading {
  align-items: end;
  gap: 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid #e7edf4;
  background: transparent;
}

.templates-editor-form .panel-body {
  padding-top: 14px;
}

.templates-manager-form-body {
  display: grid;
  gap: 18px;
}

.template-section.template-section-table {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.template-section.template-section-table + .template-section.template-section-table {
  padding-top: 4px;
}

.template-section.template-section-table .template-section-head {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px;
}

.template-section.template-section-table .template-section-head h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  color: #0f172a;
}

.template-section.template-section-table .template-section-head .helper-text {
  max-width: 72ch;
}

.template-table-head,
.template-row {
  display: grid;
  grid-template-columns: 18px minmax(180px, 35%) minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.template-table-head {
  padding: 0 0 8px;
  border-bottom: 1px solid #e7edf4;
  color: #64748b;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
}

.template-head-handle,
.template-head-actions {
  display: block;
}

.template-table-body {
  display: grid;
  gap: 0;
}

.template-row {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #eef3f7;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.template-row:last-child {
  border-bottom: 0;
}

.template-row.is-dragging {
  opacity: 0.55;
  transform: scale(0.995);
}

.template-row-handle {
  display: grid;
  place-items: center;
  width: 18px;
  height: 36px;
  color: #a0aec0;
  cursor: grab;
}

.template-row-handle svg {
  width: 12px;
  height: 18px;
  fill: currentColor;
}

.template-cell-input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #d8e1ea;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.3;
}

.template-cell-input::placeholder {
  color: #94a3b8;
}

.template-row-delete {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  opacity: 0.84;
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease;
}

.template-row-delete svg {
  width: 16px;
  height: 16px;
}

.template-row:hover .template-row-delete {
  background: #f1f5f9;
  color: #475569;
  opacity: 1;
}

.template-add-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
}

.template-add-button:hover {
  color: #0f172a;
}

.template-add-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #d6dee8;
  background: #ffffff;
  color: #64748b;
  font-size: 14px;
  line-height: 1;
}

.template-table-empty {
  padding: 12px 0 6px;
  border-bottom: 1px dashed #e7edf4;
}

.template-table-empty p {
  margin: 0;
}

.templates-manager-footer-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

@media (max-width: 860px) {
  .template-table-head {
    display: none;
  }

  .template-row {
    grid-template-columns: 18px minmax(0, 1fr) 32px;
    grid-template-areas:
      "handle name delete"
      ". hint delete";
    align-items: start;
  }

  .template-row-handle {
    grid-area: handle;
    align-self: center;
  }

  .template-row [name="templateLabel"] {
    grid-area: name;
  }

  .template-row [name="templatePlaceholder"] {
    grid-area: hint;
  }

  .template-row-delete {
    grid-area: delete;
    align-self: center;
  }
}

/* Dense product details dashboard */

.details-dashboard-modal {
  width: min(1380px, calc(100vw - 32px));
  max-height: none;
  border: 1px solid #dbe4ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  align-self: start;
  margin-block: 10px;
}

.details-dashboard-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 9px;
  border-bottom: 1px solid #e7edf4;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.details-dashboard-heading,
.details-dashboard-title-row,
.details-dashboard-chips,
.details-dashboard-actions,
.details-dashboard-column,
.details-block,
.details-fact-list,
.details-data-list,
.details-pricing-list,
.details-market-list,
.details-comments-feed {
  min-width: 0;
}

.details-dashboard-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.details-dashboard-heading {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 32px;
}

.details-dashboard-title-row h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.details-dashboard-header .eyebrow {
  display: none;
}

.details-dashboard-chips {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.details-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #d8e1ea;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
}

.details-chip-price {
  border-color: color-mix(in srgb, var(--product-accent, #155eef) 20%, #d8e1ea);
  background: color-mix(in srgb, var(--product-accent, #155eef) 10%, #ffffff);
  color: #0f172a;
}

.details-chip-base {
  border-color: #d8e7ff;
  background: #eef4ff;
  color: #2450d3;
}

.details-chip-type {
  color: #475569;
}

.details-dashboard-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: nowrap !important;
  justify-content: flex-end;
  white-space: nowrap;
  align-self: center;
  justify-self: end;
}

.details-dashboard-actions > * {
  flex: 0 0 auto;
}

.details-dashboard-actions .compact-secondary-button,
.details-dashboard-actions .compact-ghost-button,
.details-dashboard-actions .compact-danger-button {
  min-height: 32px;
  height: 32px;
  width: auto;
  min-width: fit-content;
  padding: 0 12px;
  border-radius: 10px;
}

.details-toolbar-link,
.details-market-link {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.details-toolbar-close {
  min-width: 86px;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1;
}

.details-dashboard-body {
  padding: 14px 18px 18px;
  overflow: visible;
  background: #ffffff;
}

.details-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(260px, 22%) minmax(320px, 1fr) minmax(400px, 36%);
  gap: 14px;
  align-items: start;
  min-height: 0;
}

.details-dashboard-column {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.details-dashboard-column + .details-dashboard-column {
  padding-left: 14px;
  border-left: 1px solid #e7edf4;
}

.details-dashboard-column-left > .details-block {
  padding-bottom: 0;
  border-bottom: 0;
}

.details-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.details-dashboard-footer-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(300px, 40%) minmax(0, 1fr);
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid #e7edf4;
  min-width: 0;
  align-items: start;
}

.details-block {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
}

.details-dashboard-column > .details-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.details-dashboard-footer-grid > .details-block {
  padding-bottom: 0;
  border-bottom: 0;
}

.details-block-compact {
  gap: 8px;
  padding-bottom: 0;
  border-bottom: 0;
}

.details-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.details-block-head h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.details-block-body,
.details-comments-body {
  min-width: 0;
}

.details-scroll-body {
  max-height: 196px;
  overflow: auto;
  padding-right: 4px;
}

.details-scroll-body-compact {
  max-height: 132px;
}

.details-scroll-body-short {
  max-height: 164px;
}

.details-identity-media {
  display: grid;
  justify-items: stretch;
  gap: 10px;
}

.details-identity-photo {
  width: min(100%, 320px);
  justify-self: center;
  min-width: 0;
}

.details-identity-photo-stage {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #dbe4ed;
  border-radius: 14px;
  background: #ffffff;
  box-sizing: border-box;
}

.details-identity-photo-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  display: block;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  object-position: center center;
}

.details-identity-photo-fallback {
  display: grid;
  place-items: center;
  padding: 16px;
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.details-identity-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.details-identity-thumb {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid #dbe4ed;
  border-radius: 8px;
  background: #ffffff;
}

.details-identity-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.details-identity-photo-stage .details-media-brand-mark {
  top: 10px;
  right: 10px;
  z-index: 2;
}

.details-fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.details-fact-row,
.details-pricing-row,
.details-data-row,
.details-competitor-row,
.details-market-row {
  min-width: 0;
}

.details-fact-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.25;
}

.details-fact-row:nth-child(3),
.details-fact-row:nth-child(4) {
  grid-column: 1 / -1;
}

.details-fact-key,
.details-pricing-key {
  color: #64748b;
}

.details-fact-value,
.details-pricing-value {
  color: #0f172a;
  font-weight: 600;
}

.details-fact-value,
.details-data-key,
.details-data-value,
.details-market-meta,
.details-pricing-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.details-data-list {
  display: grid;
  gap: 0;
}

.details-data-row {
  display: grid;
  grid-template-columns: minmax(120px, 36%) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  line-height: 1.35;
}

.details-data-row:last-child {
  border-bottom: 0;
}

.details-data-key {
  color: #64748b;
}

.details-data-value {
  color: #0f172a;
  font-weight: 600;
}

.details-block-empty,
.details-inline-muted {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.25;
}

.details-competitors-table {
  display: grid;
  gap: 0;
}

.details-competitors-head,
.details-competitor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 76px;
  gap: 12px;
  align-items: center;
}

.details-competitors-head {
  padding-bottom: 6px;
  border-bottom: 1px solid #e7edf4;
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.details-competitor-row {
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}

.details-competitor-row:last-child {
  border-bottom: 0;
}

.details-competitor-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.details-competitor-main strong,
.details-competitor-main span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.details-competitor-main strong {
  font-size: 12px;
  line-height: 1.2;
  color: #0f172a;
}

.details-competitor-main span {
  font-size: 12px;
  line-height: 1.3;
  color: #475569;
}

.details-competitor-price {
  font-size: 12px;
  line-height: 1.2;
  color: #0f172a;
  text-align: right;
}

.details-competitor-delta {
  display: flex;
  justify-content: flex-start;
}

.details-pricing-list {
  display: grid;
  gap: 6px;
}

.details-pricing-stack {
  display: grid;
  gap: 10px;
}

.details-pricing-row {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  line-height: 1.25;
}

.details-pricing-row-link {
  align-items: start;
}

.details-pricing-link-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.details-pricing-link {
  max-width: 220px;
  color: #334155;
  font-size: 12px;
  line-height: 1.3;
}

.details-market-list {
  display: grid;
  gap: 0;
}

.details-market-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
}

.details-market-row:last-child {
  border-bottom: 0;
}

.details-market-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.details-market-main strong {
  font-size: 13px;
  line-height: 1.2;
  color: #0f172a;
}

.details-market-meta {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.25;
}

.details-market-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.details-market-chart {
  grid-column: 1 / -1;
  min-width: 0;
  padding-top: 2px;
}

.details-market-price {
  font-size: 12px;
  line-height: 1.2;
  color: #0f172a;
}

.details-dashboard-modal .product-price-history {
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.details-dashboard-modal .product-price-history-head {
  gap: 10px;
}

.details-dashboard-modal .product-price-history-head strong {
  font-size: 12px;
  line-height: 1.2;
}

.details-dashboard-modal .product-price-history-head span {
  font-size: 12px;
}

.details-dashboard-modal .product-price-history svg {
  height: 60px;
  border-radius: 10px;
  background: #ffffff;
}

.details-dashboard-modal .product-price-history-deltas span {
  font-size: 10px;
  padding: 2px 6px;
}

.details-dashboard-modal .offers-history-chart {
  display: grid;
  gap: 6px;
}

.details-dashboard-modal .offers-history-chart svg {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.details-dashboard-modal .offers-history-chart polyline {
  fill: none;
  stroke: #1d4ed8;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.details-dashboard-modal .offers-history-deltas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.details-dashboard-modal .offers-history-deltas span {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: #1d4ed8;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 600;
}

.details-comments-body {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.details-dashboard-column-right .details-scroll-body,
.details-dashboard-footer-grid .details-scroll-body {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.details-comments-feed {
  display: grid;
  gap: 6px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.details-comment-item {
  display: grid;
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}

.details-comment-item:last-child {
  border-bottom: 0;
}

.details-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.details-comment-meta strong,
.details-comment-meta time {
  font-size: 12px;
  line-height: 1.2;
}

.details-comment-meta strong {
  color: #0f172a;
}

.details-comment-meta time {
  color: #94a3b8;
  white-space: nowrap;
}

.details-comment-item p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.details-comment-form {
  display: grid;
  gap: 8px;
}

.details-comment-form .details-comment-field textarea {
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid #d8e1ea;
  border-radius: 10px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.4;
}

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

@media (max-width: 1240px) {
  .details-dashboard-grid {
    grid-template-columns: minmax(260px, 28%) minmax(0, 1fr);
  }

  .details-specs-grid {
    grid-template-columns: 1fr;
  }

  .details-dashboard-column-right {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding-left: 0;
    border-left: 0;
    padding-top: 18px;
    border-top: 1px solid #e7edf4;
  }

  .details-dashboard-column-right > .details-block {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .details-dashboard-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .details-dashboard-modal {
    width: min(100vw - 20px, 1000px);
    max-height: none;
  }

  .details-dashboard-modal .modal-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .details-dashboard-actions {
    justify-content: flex-end;
    overflow-x: auto;
  }

  .details-dashboard-grid,
  .details-dashboard-column-right {
    grid-template-columns: 1fr;
  }

  .details-fact-list {
    grid-template-columns: 1fr;
  }

  .details-fact-row:nth-child(3),
  .details-fact-row:nth-child(4) {
    grid-column: auto;
  }

  .details-dashboard-column + .details-dashboard-column,
  .details-dashboard-column-right {
    padding-left: 0;
    border-left: 0;
    padding-top: 16px;
    border-top: 1px solid #e7edf4;
  }

  .details-competitors-head,
  .details-competitor-row {
    grid-template-columns: minmax(0, 1fr) 88px 72px;
  }

  .details-dashboard-body {
    padding: 16px 18px 20px;
  }
}

.table-frame tbody td.table-store-prices-cell {
  min-width: 190px;
  vertical-align: top;
}

.table-price-cell {
  white-space: nowrap;
  font-weight: 600;
}

.table-store-prices {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.table-store-price-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.table-store-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.table-store-logo-badge-fallback {
  background: transparent;
}

.table-store-logo {
  display: block;
  max-width: 42px;
  max-height: 18px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.table-store-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.table-store-price-copy {
  display: flex;
  align-items: center;
  min-width: 0;
}

.table-store-price-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-store-price-value {
  font-size: 0.8rem;
  line-height: 1.1;
}

.table-store-name {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.15;
}

.table-store-price-value {
  color: #0f172a;
  font-size: 0.78rem;
  line-height: 1.15;
  font-weight: 700;
}

.table-store-prices {
  display: grid;
  gap: 6px;
}

.table-store-price-item {
  display: block;
  min-width: 0;
}

.table-store-price-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.table-store-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-size: 0.76rem;
  line-height: 1.2;
}

.table-store-price-value {
  justify-self: end;
  white-space: normal;
  color: #0f172a;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

.table-store-price-value.is-status {
  white-space: normal;
  max-width: 136px;
  text-align: right;
  line-height: 1.15;
  color: #475569;
}

.matrix-workspace-google .matrix-product-card .mini-product-availability-note,
.matrix-workspace-google .matrix-product-card-regular .mini-product-availability-note,
.matrix-workspace-google .matrix-product-card-tight .mini-product-availability-note,
.matrix-workspace-google .matrix-product-card-dense .mini-product-availability-note,
.matrix-workspace-google .product-style-card .mini-product-availability-note {
  display: block;
  color: #94a3b8;
  font-size: 0.6rem;
  line-height: 1.05;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.matrix-workspace-google .matrix-product-card.is-store-out-of-stock,
.matrix-workspace-google .matrix-product-card.is-store-out-of-assortment,
.matrix-workspace-google .product-style-card.is-store-out-of-stock,
.matrix-workspace-google .product-style-card.is-store-out-of-assortment {
  background: rgba(241, 245, 249, 0.92);
  border-color: #d6dee8;
}

.matrix-workspace-google .matrix-product-card.is-store-out-of-stock,
.matrix-workspace-google .product-style-card.is-store-out-of-stock {
  opacity: 0.82;
}

.matrix-workspace-google .matrix-product-card.is-store-out-of-assortment,
.matrix-workspace-google .product-style-card.is-store-out-of-assortment {
  opacity: 0.7;
}

.matrix-workspace-google .matrix-product-card.is-store-out-of-stock .mini-product-thumb,
.matrix-workspace-google .matrix-product-card.is-store-out-of-stock .mini-product-thumb-fallback,
.matrix-workspace-google .matrix-product-card.is-store-out-of-assortment .mini-product-thumb,
.matrix-workspace-google .matrix-product-card.is-store-out-of-assortment .mini-product-thumb-fallback,
.matrix-workspace-google .product-style-card.is-store-out-of-stock .mini-product-thumb,
.matrix-workspace-google .product-style-card.is-store-out-of-stock .mini-product-thumb-fallback,
.matrix-workspace-google .product-style-card.is-store-out-of-assortment .mini-product-thumb,
.matrix-workspace-google .product-style-card.is-store-out-of-assortment .mini-product-thumb-fallback {
  filter: grayscale(0.35);
}

/* Final table alignment overrides */
.table-frame thead th:nth-child(3) {
  text-align: center;
}

.table-frame tbody td {
  vertical-align: middle;
}

.table-frame tbody td.table-brand-cell {
  vertical-align: middle;
}

.table-frame tbody td.table-store-prices-cell {
  width: 232px;
  min-width: 232px;
  vertical-align: middle;
}

.table-frame .table-store-prices {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
}

.table-frame .table-store-price-item {
  display: flex;
  align-items: center;
  min-height: 20px;
  min-width: 0;
}

.table-frame .table-store-price-copy {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.table-frame .table-store-name {
  flex: 0 1 auto;
  max-width: 108px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}

.table-frame .table-store-price-value {
  flex: 0 0 auto;
  min-width: auto;
  justify-self: auto;
  white-space: nowrap;
  line-height: 1.15;
}

.table-frame .table-store-price-value.is-status {
  max-width: none;
  text-align: left;
  white-space: nowrap;
}

.matrix-workspace-google .matrix-product-card.is-store-out-of-stock::before,
.matrix-workspace-google .matrix-product-card.is-store-out-of-assortment::before,
.matrix-workspace-google .product-style-card.is-store-out-of-stock::before,
.matrix-workspace-google .product-style-card.is-store-out-of-assortment::before {
  opacity: 0.45;
}

.product-editor-card .product-editor-offer-grid {
  grid-template-columns: minmax(132px, 1fr) 176px 96px minmax(112px, 0.9fr) minmax(0, 1.15fr);
}

.product-editor-card .product-editor-sidebar .product-editor-offer-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "store store"
    "status status"
    "price article"
    "url url";
}

.product-editor-card .product-editor-sidebar .product-editor-offer-grid [name="offerStatus"] {
  grid-area: status;
}

.product-editor-card .product-editor-list-input.is-disabled-by-status,
.product-editor-card .product-editor-list-input:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

@media (max-width: 1160px) {
  .product-editor-card .product-editor-offer-grid {
    grid-template-columns: minmax(112px, 1fr) 156px 88px minmax(104px, 0.9fr) minmax(0, 1fr);
  }
}

@media (max-width: 1040px) {
  .product-editor-card .product-editor-offer-grid {
    grid-template-columns: 1fr;
  }
}

.matrix-workspace-google .matrix-toolbar-lead {
  max-width: 720px;
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.matrix-workspace-google .matrix-toolbar-main {
  gap: 10px;
}

.matrix-workspace-google .matrix-toolbar-side,
.matrix-workspace-google .matrix-toolbar-meta {
  justify-items: end;
}

.matrix-workspace-google .matrix-board-guide .legend-chip {
  background: #f8fafc;
  color: #64748b;
}

.matrix-workspace-google .matrix-corner-chip {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: var(--matrix-header-height);
  padding: 8px 12px;
  border-radius: 14px 0 0 0;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 46%, #e2e8f0 100%);
  color: #334155;
  font-size: 0.72rem;
}

.matrix-workspace-google .matrix-corner-chip small {
  color: #8a97a6;
  font-size: 0.62rem;
  line-height: 1.1;
}

.matrix-workspace-google .matrix-corner-copy {
  display: grid;
  gap: 2px;
  color: #334155;
  font-size: 0.72rem;
  line-height: 1.2;
}

.matrix-workspace-google .axis-chip-top,
.matrix-workspace-google .axis-chip-side-sticky {
  gap: 10px;
  justify-content: space-between;
}

.matrix-workspace-google .axis-chip-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.matrix-workspace-google .axis-chip-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
  color: #475569;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.matrix-workspace-google .axis-chip-side-sticky .axis-chip-meta {
  align-self: center;
}

.matrix-workspace-google .matrix-cell {
  gap: 10px;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.matrix-workspace-google .cell-caption strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.matrix-workspace-google .matrix-cell-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.matrix-workspace-google .matrix-cell-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: rgba(255, 255, 255, 0.92);
  color: #526277;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 700;
}

.matrix-workspace-google .matrix-cell-pill-own {
  background: rgba(219, 234, 254, 0.72);
  border-color: #c7d9f3;
  color: #355275;
}

.matrix-workspace-google .matrix-cell-pill-rival {
  background: rgba(248, 250, 252, 0.96);
}

.matrix-workspace-google .matrix-cell-pill-price {
  background: rgba(241, 245, 249, 0.95);
  color: #0f172a;
}

.matrix-workspace-google .matrix-cell-focus-note {
  margin: 0;
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1.3;
}

.matrix-workspace-google .matrix-cell.matrix-cell-crowded .matrix-cell-summary,
.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-cell-summary {
  gap: 4px;
}

.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-cell-pill {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 0.64rem;
}

.matrix-workspace-google .matrix-cell.matrix-cell-packed .matrix-cell-focus-note {
  font-size: 0.64rem;
}

.matrix-workspace-google .matrix-more-badge.matrix-more-toggle {
  align-self: flex-start;
}

.matrix-workspace-google .axis-chip-top.is-matrix-hovered,
.matrix-workspace-google .axis-chip-side-sticky.is-matrix-hovered {
  background: #dfe8f2;
  border-color: #c2d0df;
}

.matrix-workspace-google .matrix-cell.is-matrix-hovered {
  border-color: #c2d0df;
  box-shadow: inset 0 0 0 1px rgba(191, 209, 226, 0.72);
}

.matrix-workspace-google .matrix-cell.is-matrix-focus-cell {
  border-color: #94a9bf;
  box-shadow:
    0 0 0 2px rgba(148, 169, 191, 0.18),
    0 8px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  z-index: 1;
}

.matrix-workspace-google .matrix-product-card .mini-product-meta,
.matrix-workspace-google .product-style-card .mini-product-meta {
  gap: 4px;
}

.matrix-workspace-google .mini-product-context-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.matrix-workspace-google .mini-product-context-chip {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  max-width: 100%;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #526277;
  font-size: 0.58rem;
  line-height: 1;
  font-weight: 700;
}

.matrix-workspace-google .mini-product-context-chip-brand {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.matrix-workspace-google .mini-product-context-chip-own {
  background: rgba(219, 234, 254, 0.9);
  border-color: #c7d9f3;
  color: #355275;
}

.matrix-workspace-google .mini-product-context-chip-rival {
  background: rgba(248, 250, 252, 0.98);
}

.matrix-workspace-google .mini-product-context-chip-base {
  background: rgba(241, 245, 249, 0.95);
  color: #475569;
}

.matrix-workspace-google .matrix-product-card-tight .mini-product-context-chip {
  min-height: 17px;
  padding: 0 5px;
  font-size: 0.54rem;
}

.matrix-workspace-google .matrix-product-card-dense .mini-product-context-row {
  display: none;
}

@media (max-width: 1280px) {
  .matrix-workspace-google .matrix-toolbar-lead {
    max-width: 100%;
  }

  .matrix-workspace-google .matrix-toolbar-side,
  .matrix-workspace-google .matrix-toolbar-meta {
    justify-items: start;
  }
}
