:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #eef2f6;
  --ink: #17202a;
  --muted: #697586;
  --line: #d9e0e8;
  --accent: #c51f5d;
  --accent-dark: #941847;
  --green: #157f5b;
  --blue: #2267b8;
  --amber: #9a6500;
  --shadow: 0 18px 60px rgba(27, 39, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.screen {
  min-height: 100vh;
}

.screen-login {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(28px, 4vw, 72px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.56)),
    url("/MAIN_2.png") center / cover no-repeat,
    #030608;
  color: #f7f7f2;
}

.login-shell {
  position: relative;
  width: min(1480px, 100%);
  min-height: calc(100vh - clamp(56px, 8vw, 144px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 540px);
  gap: clamp(28px, 6vw, 110px);
  align-items: center;
}

.module-board,
.table-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-block {
  align-self: end;
  max-width: 520px;
  padding: 0 0 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.7);
}

.brand-block strong {
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.05;
  font-weight: 800;
  max-width: 430px;
}

.brand-block strong::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  margin-top: 20px;
  background: #d91649;
}

.brand-block span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
}

.login-brand-kicker {
  max-width: 430px;
  font-size: clamp(22px, 3vw, 40px) !important;
  line-height: 1.2;
  font-weight: 800;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  margin-bottom: 26px;
}

.brand-mark.small {
  width: 40px;
  height: 40px;
  margin: 0;
  font-size: 14px;
}

.login-panel {
  min-height: 620px;
  padding: clamp(34px, 4vw, 70px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.72));
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(5px);
  color: #f7f7f2;
}

.login-title {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-bottom: 56px;
  text-transform: uppercase;
  text-align: center;
}

.login-title h1 {
  margin: 0;
  display: inline-block;
  font-family: "Arial Black", Impact, Arial, Helvetica, sans-serif;
  max-width: 100%;
  font-size: clamp(48px, 4.5vw, 72px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 10px 22px rgba(0, 0, 0, 0.82), 0 0 18px rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.login-title h1::after {
  content: "";
  display: block;
  width: min(260px, 52vw);
  height: 1px;
  margin: 26px auto 0;
  background: rgba(255, 255, 255, 0.8);
}

.login-title span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 22px;
  letter-spacing: 0.28em;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.field label,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-panel .field label {
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  letter-spacing: 0.18em;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  outline: none;
}

.login-panel .field input {
  min-height: 62px;
  border-radius: 0;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-panel .field input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.12);
}

.login-panel .field input:focus {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.login-mobile-toggle {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-mobile-toggle input {
  width: 20px;
  height: 20px;
  accent-color: #fff;
}

.login-mobile-toggle span {
  color: inherit;
}

.store-header,
.section-title,
.topbar,
.topbar-actions,
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.store-header h2,
.section-title h1,
.section-title h2,
.topbar h2 {
  margin: 0;
}

.login-panel .store-header {
  margin-top: 26px;
}

.login-panel .store-header h2 {
  color: #fff;
  font-size: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-panel .store-header span,
.login-panel .login-status {
  color: rgba(255, 255, 255, 0.72);
}

.login-panel .login-status {
  border-color: rgba(255, 255, 255, 0.22);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
}

.login-status:empty {
  display: none;
}

.screen-login.login-locked .store-header,
.screen-login.login-locked .store-list,
.screen-login.login-locked .empty-state,
.screen-login.login-locked .admin-store-create {
  display: none !important;
}

.store-header span,
.section-title span,
.sidebar-brand span {
  color: var(--muted);
  font-size: 13px;
}

.store-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 22px;
}

.store-option {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.store-select-button {
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 5px;
  cursor: pointer;
}

.store-delete-button {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(197, 31, 93, 0.12);
  color: #fff;
  padding: 0 12px;
  min-height: 42px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.store-delete-button:hover,
.store-delete-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.76);
  background: rgba(197, 31, 93, 0.36);
}

.login-panel .store-option {
  border-radius: 0;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.store-option strong {
  color: var(--ink);
}

.login-panel .store-option strong {
  color: #fff;
}

.store-option span {
  color: var(--muted);
  font-size: 13px;
}

.login-panel .store-option span {
  color: rgba(255, 255, 255, 0.68);
}

.store-option.selected {
  border-color: var(--accent);
  background: rgba(197, 31, 93, 0.06);
}

.login-panel .store-option.selected {
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.14);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--ink);
}

.login-panel .empty-state {
  border-color: rgba(255, 255, 255, 0.3);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.68);
}

.login-panel .empty-state strong {
  color: #fff;
}

.admin-store-create {
  margin-top: 16px;
  padding: 20px;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
}

.admin-store-create strong {
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-store-create label {
  display: grid;
  gap: 8px;
}

.admin-store-create label span,
.admin-store-create > span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

.admin-store-create input,
.admin-store-create textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  padding: 13px 14px;
  outline: none;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  font: inherit;
  resize: vertical;
}

.admin-store-create input:focus,
.admin-store-create textarea:focus {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.admin-store-create .secondary-action {
  min-height: 50px;
  border-radius: 0;
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.9);
  color: #050608;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-store-create .secondary-action:hover:not(:disabled),
.admin-store-create .secondary-action:focus-visible:not(:disabled) {
  background: #fff;
}

.admin-store-create .secondary-action:disabled {
  cursor: wait;
  opacity: 0.6;
}

.primary-action,
.secondary-action,
.ghost-button {
  border-radius: 8px;
  border: 1px solid transparent;
  min-height: 42px;
  padding: 0 16px;
}

.primary-action {
  width: 100%;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.login-panel .primary-action {
  min-height: 70px;
  margin-top: 30px;
  border-radius: 0;
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  font-size: 22px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.login-panel .primary-action:hover:not(:disabled),
.login-panel .primary-action:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  color: #050608;
}

.login-panel .primary-action:disabled {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.44);
}

.screen-login.session-sleep .store-header,
.screen-login.session-sleep .store-list,
.screen-login.session-sleep .empty-state,
.screen-login.session-sleep .admin-store-create {
  display: none !important;
}

.screen-login.session-sleep .login-panel {
  min-height: 520px;
}

.screen-login.session-sleep .login-status {
  color: #fff;
}

.primary-action:disabled {
  cursor: not-allowed;
  background: #b7bec8;
}

.secondary-action {
  background: var(--ink);
  color: white;
}

.ghost-button {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.screen-dashboard {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.screen-module-hub {
  min-height: 100vh;
  padding: clamp(22px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgba(7, 10, 14, 0.88), rgba(7, 10, 14, 0.62)),
    url("/MAIN_2.png") center / cover no-repeat;
  color: #fff;
}

.module-hub-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - clamp(44px, 8vw, 112px));
  display: grid;
  align-content: center;
  gap: 28px;
}

.module-hub-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.module-hub-head h1 {
  margin: 8px 0;
  font-size: clamp(38px, 5vw, 74px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0;
}

.module-hub-head p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

.module-hub-meta {
  display: grid;
  gap: 5px;
  min-width: min(320px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(14px);
  padding: 16px;
}

.module-hub-meta span,
.module-hub-meta em {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-style: normal;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.module-hub-meta strong {
  font-size: 22px;
}

.module-hub-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.module-hub-meta .ghost-button {
  margin-top: 8px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
}

.module-hub-actions .ghost-button {
  margin-top: 0;
  justify-content: center;
}

.module-hub-actions .ghost-button.danger {
  border-color: rgba(238, 38, 50, 0.55);
  color: #fff;
}

.module-hub-actions .ghost-button.danger:hover {
  background: rgba(238, 38, 50, 0.14);
  border-color: rgba(238, 38, 50, 0.86);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.module-tile {
  position: relative;
  min-height: 190px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.72);
  color: #fff;
  padding: 20px;
  text-align: left;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.module-tile:not(:disabled) {
  cursor: pointer;
}

.module-tile:not(:disabled):hover {
  border-color: rgba(255, 255, 255, 0.62);
  transform: translateY(-1px);
}

.module-tile:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.module-tile span {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  font-size: 22px;
  font-weight: 900;
}

.module-tile strong {
  display: block;
  margin: 0 0 9px;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0;
}

.module-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.45;
}

.module-tile em {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-style: normal;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.module-tile.primary {
  background:
    linear-gradient(145deg, rgba(197, 31, 93, 0.34), rgba(8, 12, 18, 0.78) 42%),
    rgba(8, 12, 18, 0.78);
}

.sidebar {
  min-height: 100vh;
  background: #121821;
  color: white;
  padding: 22px;
}

.sidebar-brand {
  justify-content: flex-start;
  margin-bottom: 28px;
}

.sidebar-brand span {
  display: block;
  color: #9ba7b7;
  margin-top: 3px;
}

.nav-list,
.nav-group {
  display: grid;
}

.nav-list {
  gap: 6px;
}

.nav-group {
  gap: 4px;
  margin-bottom: 14px;
}

.nav-group-title {
  width: 100%;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #748195;
  font-size: 11px;
  font-weight: 800;
  padding: 0 10px 4px;
  text-align: left;
  text-transform: uppercase;
}

.nav-group-title::after {
  content: "›";
  float: right;
  color: #748195;
  font-size: 14px;
  font-weight: 700;
}

.nav-group-expanded > .nav-group-title::after {
  content: "⌄";
}

.nav-group-collapsed > button:not(.nav-group-title) {
  display: none;
}

.nav-group-marketing,
.nav-group-analytics-data {
  gap: 6px;
  margin: 4px -6px 16px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.nav-group-marketing .nav-group-title,
.nav-group-analytics-data .nav-group-title {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-radius: 6px;
  background: #20262f;
  color: #f5f7fb;
  font-size: 13px;
  text-transform: none;
}

.nav-group-analytics-data .nav-group-title {
  background: #1d2830;
}

.nav-group-marketing .nav-group-title::after,
.nav-group-analytics-data .nav-group-title::after {
  color: #8f98a7;
  font-size: 16px;
  font-weight: 600;
  float: none;
}

.nav-group-marketing button,
.nav-group-analytics-data button {
  padding-left: 18px;
}

.nav-list button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: #c8d2df;
  text-align: left;
}

.nav-list button.active,
.nav-list button:hover {
  background: #263343;
  color: white;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.compact-page-header .workspace {
  padding-top: 14px;
}

.topbar {
  margin-bottom: 22px;
}

.topbar h2 {
  font-size: 24px;
}

#operator-badge {
  color: var(--muted);
}

.dashboard-band {
  margin-bottom: 20px;
}

.compact-page-header .dashboard-band {
  margin-bottom: 10px;
}

.section-title {
  margin-bottom: 16px;
}

.page-title-row {
  align-items: flex-start;
  gap: 12px;
}

.page-title-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 8px 12px;
  width: 100%;
}

.store-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 7px 9px;
}

.store-chip strong {
  color: var(--ink);
  font-size: 15px;
}

.section-title h1 {
  font-size: 34px;
}

.page-title-main .eyebrow,
.page-title-main h1 {
  flex: 0 0 auto;
  white-space: nowrap;
}

.compact-page-header .section-title {
  margin-bottom: 8px;
}

.compact-page-header .section-title h1 {
  font-size: 0;
  line-height: 1.1;
}

.compact-page-header .page-title-row {
  align-items: center;
}

.compact-page-header .page-title-main {
  align-items: center;
  gap: 10px;
}

.compact-page-header .page-title-main .eyebrow {
  color: #526172;
  font-size: 12px;
  letter-spacing: 0;
}

.compact-page-header .page-title-main .eyebrow:empty {
  display: none;
}

#view-subtitle {
  max-width: 840px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.page-title-main #view-subtitle {
  min-width: 120px;
  max-width: none;
  flex: 1 1 auto;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-page-header .page-title-main #view-subtitle {
  display: none;
}

.compact-page-header #view-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 2px 0;
}

.crumb-section {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  color: #526172;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  padding: 0 10px;
}

.crumb-arrow {
  color: #8a97a8;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.crumb-current {
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.section-title.compact {
  margin: 0 0 14px;
}

.section-title.compact h2 {
  font-size: 18px;
}

.section-title.compact #table-caption {
  margin-left: auto;
}

.main-report-mode-board {
  padding: 10px 12px;
}

.main-report-mode-board .section-title.compact {
  margin: 0 0 8px;
}

.main-report-mode-board .section-title.compact h2 {
  font-size: 13px;
}

.main-report-mode-board .section-title.compact span {
  display: none;
}

.table-caption-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.table-caption-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 11px;
}

.table-caption-actions button:hover {
  border-color: var(--accent);
  background: rgba(197, 31, 93, 0.06);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metric-card.clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.metric-card.clickable:hover,
.metric-card.clickable:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(197, 31, 93, 0.12);
  outline: none;
}

.metric-card.clickable:active {
  transform: translateY(1px);
}

.metric-card.loading {
  opacity: 0.72;
  pointer-events: none;
}

.metric-card.warning {
  border-color: rgba(154, 101, 0, 0.28);
  background: rgba(154, 101, 0, 0.06);
}

.metric-card.critical {
  border-color: rgba(197, 31, 93, 0.28);
  background: rgba(197, 31, 93, 0.06);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin: 10px 0;
  font-size: 32px;
}

.compact-page-header .metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.compact-page-header .metric-card {
  min-height: 76px;
  padding: 10px 12px;
}

.compact-page-header .metric-card span {
  font-size: 11px;
}

.compact-page-header .metric-card strong {
  margin: 4px 0;
  font-size: 24px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.module-board,
.table-section {
  padding: 20px;
}

.table-section {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 330px);
  min-height: 0;
  overflow: hidden;
}

.compact-page-header .table-section {
  max-height: calc(100vh - 300px);
}

body.merge-view .table-section {
  max-height: calc(100vh - 246px);
}

.table-section > .section-title {
  position: relative;
  flex: 0 0 auto;
  z-index: 30;
  margin: -20px -20px 0;
  padding: 16px 20px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.table-section > .section-title::before {
  display: none;
}

body.merge-view .table-section > .section-title {
  display: none;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
}

.mode-grid.main-report-mode-grid {
  grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.3fr);
  gap: 10px;
}

.main-report-mode-group {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.main-report-mode-group > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.main-report-mode-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.main-report-mode-grid .mode-chip {
  min-height: 28px;
  min-width: 0;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}

.mode-grid.promo-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.mode-grid.promo-mode-row .mode-chip {
  min-width: 128px;
  flex: 0 0 auto;
}

.promo-filter-panel {
  grid-template-columns: minmax(260px, 0.85fr) minmax(260px, 0.95fr) minmax(340px, 1.15fr);
  align-items: stretch;
  gap: 12px;
}

.promo-filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.promo-filter-group strong {
  font-size: 13px;
  color: var(--ink);
}

.promo-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.promo-filter-buttons .mode-chip {
  min-height: 32px;
  min-width: 0;
  flex: 0 0 auto;
  padding: 0 11px;
}

.promo-manage-group {
  background: linear-gradient(180deg, #ffffff, #f3f7fb);
}

.tool-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.tool-strip button,
.mode-chip {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

.tool-strip button:hover,
.mode-chip:hover,
.mode-chip.selected {
  border-color: var(--accent);
  background: rgba(197, 31, 93, 0.06);
}

.tool-strip button:disabled {
  color: var(--green);
  cursor: default;
}

.promotion-period-board {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(140px, 0.35fr) minmax(140px, 0.35fr) minmax(260px, 0.9fr) auto;
  align-items: end;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.promotion-period-board.needs-load {
  border-color: rgba(197, 31, 93, 0.34);
  background: linear-gradient(180deg, #fff, rgba(197, 31, 93, 0.055));
}

.promotion-period-main,
.promotion-period-date,
.promotion-period-state {
  display: grid;
  gap: 4px;
}

.promotion-period-main span,
.promotion-period-date span,
.promotion-period-state span {
  color: var(--muted);
  font-size: 12px;
}

.promotion-period-main strong {
  font-size: 18px;
}

.promotion-period-main em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.promotion-period-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.promotion-period-quick button,
.promotion-period-board > button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

.promotion-period-quick button.selected,
.promotion-period-quick button:hover,
.promotion-period-board > button:hover {
  border-color: var(--accent);
  background: rgba(197, 31, 93, 0.06);
}

.promotion-period-board > button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.promotion-period-date input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 10px;
}

.promotion-period-state strong {
  font-size: 14px;
}

.promotion-period-board.needs-load .promotion-period-state strong {
  color: var(--accent);
}

.article-workbench {
  margin: 0 0 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.fbs-control-board {
  display: grid;
  gap: 10px;
}

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

.fbs-assembly-head,
.fbs-assembly-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fbs-assembly-head span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

.fbs-assembly-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.fbs-assembly-head strong {
  font-size: 34px;
}

.fbs-assembly-actions {
  justify-content: flex-start;
}

.fbs-assembly-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
}

.fbs-assembly-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.fbs-assembly-list article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.fbs-assembly-list span,
.fbs-assembly-list em,
.fbs-assembly-list p {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.settings-workbench {
  margin: 0 0 18px;
}

.settings-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.settings-store-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.settings-store-row article {
  display: grid;
  gap: 8px;
  min-height: 82px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.settings-store-row span,
.settings-field span,
.settings-actions span {
  color: var(--muted);
  font-size: 12px;
}

.settings-store-row strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

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

.settings-field textarea,
.settings-field input,
.settings-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  outline: none;
  font: inherit;
  background: #fff;
}

.settings-field textarea {
  resize: vertical;
}

.settings-field textarea:focus,
.settings-field input:focus,
.settings-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.1);
}

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

.login-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.settings-user-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(140px, 180px) auto;
  gap: 12px;
  align-items: end;
}

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

.settings-users-subtitle {
  display: grid;
  gap: 4px;
  padding: 8px 2px 2px;
}

.settings-users-subtitle strong {
  font-size: 13px;
}

.settings-users-subtitle span {
  color: var(--muted);
  font-size: 12px;
}

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

.settings-job-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px 72px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 17, 22, 0.68);
}

.settings-job-head {
  min-height: 34px;
  padding-top: 8px;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-job-row strong,
.settings-job-row em,
.settings-job-note span {
  display: block;
}

.settings-job-row em,
.settings-job-note span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.settings-job-row input[type="number"] {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.settings-job-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  justify-self: center;
}

.settings-job-note {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 196, 95, 0.25);
  border-radius: 8px;
  background: rgba(255, 196, 95, 0.06);
}

.settings-job-note strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.settings-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-user-row div:first-child {
  display: grid;
  gap: 4px;
}

.settings-user-row span {
  color: var(--muted);
  font-size: 12px;
}

.settings-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-user-actions input {
  width: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
}

.settings-permissions {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.settings-permissions summary {
  cursor: pointer;
  font-weight: 700;
}

.permission-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.permission-columns section {
  display: grid;
  gap: 10px;
  align-content: start;
}

.permission-columns h3 {
  margin: 0;
  font-size: 13px;
}

.permission-group {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.permission-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.article-control-row,
.article-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-control-row {
  flex-wrap: wrap;
}

.segmented-control {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 0 14px;
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button.active {
  background: var(--ink);
  color: white;
}

.article-search {
  flex: 1 1 360px;
}

.article-control-row > input.article-search {
  width: auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 11px;
  outline: none;
}

.article-control-row > input.article-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.1);
}

.article-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.article-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.1);
}

.article-status-row {
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.sales-funnel-extra {
  align-items: center;
  gap: 12px;
}

.sales-funnel-nmids {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(680px, 100%);
}

.sales-funnel-nmids span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sales-funnel-nmids input {
  flex: 1;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
}

.sales-funnel-nmids input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.1);
}

.main-report-period {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.main-report-period span,
.main-report-period em,
.locality-note {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.main-report-period strong {
  font-size: 16px;
}

.main-report-control-board {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.main-report-control-board .article-control-row {
  gap: 8px;
}

.main-report-control-board .article-control-row button,
.main-report-period-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.main-report-control-board .article-control-row button:hover,
.main-report-period-row button:hover {
  border-color: var(--accent);
  background: rgba(197, 31, 93, 0.06);
}

.main-report-period-row {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
}

.main-report-period-row label {
  display: grid;
  gap: 4px;
  min-width: 124px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.main-report-period-row input {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 9px;
  outline: none;
}

.main-report-period-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.1);
}

.main-report-period-row .period-quick-row {
  align-items: end;
  gap: 5px;
}

.main-report-period-row .period-quick-row button {
  min-height: 30px;
  padding: 0 9px;
}

.main-report-period-row button.danger,
.main-report-period-state.warning {
  border-color: rgba(197, 31, 93, 0.42);
  color: var(--accent);
}

.main-report-period-state {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  max-width: min(720px, 100%);
  color: var(--muted);
  font-size: 12px;
}

.main-report-period-state.ok {
  color: var(--green);
}

.main-report-sync-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 12px;
}

.main-report-sync-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 13px;
  font-weight: 800;
}

.main-report-sync-actions button:hover {
  border-color: var(--accent);
  background: rgba(197, 31, 93, 0.06);
}

.main-report-sync-actions button.danger {
  border-color: rgba(197, 31, 93, 0.35);
  color: var(--accent);
}

.main-report-sync-actions span {
  color: var(--muted);
  font-size: 13px;
}

.article-status-row strong {
  color: var(--ink);
}

.stock-warehouse-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.stock-warehouse-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.stock-warehouse-toolbar .ghost-button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(197, 31, 93, 0.06);
}

.stock-period-field,
.stock-region-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stock-period-field input {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.stock-region-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.stock-warehouse-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.stock-warehouse-panel-head > div:first-child {
  display: grid;
  gap: 3px;
}

.stock-warehouse-panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.stock-warehouse-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stock-warehouse-actions input {
  min-height: 38px;
  width: min(260px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.stock-warehouse-actions input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.1);
}

.stock-warehouse-actions .ghost-button {
  min-height: 38px;
}

.stock-warehouse-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-height: 150px;
  overflow: auto;
  padding-right: 4px;
}

.stock-warehouse-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 0 10px;
  font-size: 13px;
  cursor: pointer;
}

.stock-warehouse-chip.muted {
  color: var(--muted);
  background: #f7f8fa;
  opacity: 0.68;
}

.stock-warehouse-chip.virtual {
  border-color: rgba(50, 122, 184, 0.36);
  background: rgba(50, 122, 184, 0.08);
}

.stock-warehouse-chip.virtual em {
  background: rgba(50, 122, 184, 0.18);
}

.stock-warehouse-chip input {
  margin: 0;
}

.stock-warehouse-chip em {
  margin-left: 4px;
  border-radius: 999px;
  background: #e8eef6;
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 3px 7px;
}

.stock-warehouse-empty {
  color: var(--muted);
  font-size: 13px;
}

.stock-warehouse-dialog {
  width: min(920px, 100%);
}

.stock-warehouse-picker-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.stock-warehouse-picker-tools input {
  flex: 1 1 320px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.stock-warehouse-dialog-status {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stock-warehouse-dialog-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: min(520px, calc(100vh - 280px));
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.stock-warehouse-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stock-warehouse-dialog-footer span {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
}

.stock-warehouse-dialog-footer button {
  min-height: 38px;
}

.stock-warehouse-dialog-footer button.primary {
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 0 16px;
  font-weight: 900;
}

.stock-warehouse-select-empty {
  min-height: 220px;
  display: grid !important;
  place-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px !important;
  text-align: center;
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
}

.stock-warehouse-select-empty strong {
  color: var(--ink);
  font-size: 22px;
}

.stock-warehouse-select-empty span {
  max-width: 620px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.stock-warehouse-select-empty button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(197, 31, 93, 0.08);
  color: var(--accent);
  padding: 0 16px;
  font-weight: 900;
}

.stock-pivot-table .warehouse-metric-head {
  align-items: center;
  gap: 3px;
  padding: 7px 8px;
  text-align: center;
}

.stock-pivot-table .warehouse-metric-head strong,
.stock-pivot-table .warehouse-metric-head button strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-pivot-table .warehouse-metric-head span,
.stock-pivot-table .warehouse-metric-head button span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-replenish-cell {
  padding: 4px 6px;
}

.stock-replenish-cell input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  text-align: center;
  outline: none;
}

.stock-replenish-cell input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.08);
}

.article-columns-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.column-option {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
}

.owner-dashboard {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.owner-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
}

.owner-kpi,
.owner-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.owner-kpi {
  min-height: 118px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  border-left: 4px solid #9aa6b2;
}

.owner-kpi.warning {
  border-left-color: var(--amber);
}

.owner-kpi.critical {
  border-left-color: var(--accent);
}

.owner-kpi.positive {
  border-left-color: var(--green);
}

.owner-kpi span,
.owner-kpi em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.owner-kpi strong {
  font-size: 28px;
}

.owner-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.owner-panel {
  padding: 20px;
}

.alert-list,
.task-list {
  display: grid;
  gap: 10px;
}

.alert-item,
.task-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.alert-item {
  border-left-width: 4px;
}

.alert-item.critical {
  border-left-color: var(--accent);
}

.alert-item.warning {
  border-left-color: var(--amber);
}

.alert-item.info {
  border-left-color: var(--blue);
}

.alert-item span,
.task-item strong {
  color: var(--muted);
  font-size: 13px;
}

.task-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.funnel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.funnel-card strong {
  display: block;
  margin-bottom: 12px;
}

.funnel-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.funnel-card span {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  padding: 6px 9px;
}

.preview-table {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  isolation: isolate;
}

.preview-table > div {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow-wrap: anywhere;
}

.preview-cell {
  position: relative;
  z-index: 1;
  font-size: 13px;
  line-height: 1.35;
}

.preview-cell.product-cell:has(.product-thumb) {
  justify-content: center;
  align-items: center;
  min-height: 70px;
  padding: 3px 6px;
}

.preview-table.campaign-table .preview-cell,
.preview-table.campaign-table .preview-head {
  font-size: var(--campaign-font-size, 13px);
}

.campaign-cell.campaign-kind-ark {
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.055), rgba(255, 255, 255, 0.01)),
    #0f1318;
}

.campaign-cell.campaign-kind-rk {
  background:
    linear-gradient(180deg, rgba(79, 143, 255, 0.055), rgba(255, 255, 255, 0.01)),
    #0f1318;
}

.campaign-cell.selected.campaign-kind-ark,
.campaign-cell.selected.campaign-kind-rk {
  background: rgba(238, 38, 50, 0.12) !important;
}

.campaign-kind-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #d6dce3;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0 9px;
}

.campaign-kind-badge-ark {
  border-color: rgba(245, 158, 11, 0.62);
  background: rgba(245, 158, 11, 0.14);
  color: #ffd37a;
}

.campaign-kind-badge-rk {
  border-color: rgba(79, 143, 255, 0.58);
  background: rgba(79, 143, 255, 0.13);
  color: #b8d3ff;
}

.preview-table.mobile-card-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  min-width: 0;
  border: 0;
  gap: 12px;
  background: transparent;
}

.preview-table.mobile-card-table > div,
.preview-table.mobile-card-table > article {
  border: 0;
}

.mobile-report-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(27, 39, 51, 0.08);
}

.mobile-report-card.warning {
  border-color: rgba(154, 101, 0, 0.32);
  background: #fffaf0;
}

.mobile-report-card-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.mobile-report-card-head img,
.mobile-report-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-soft);
}

.mobile-report-thumb {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mobile-report-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.mobile-report-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-report-title span,
.mobile-report-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-report-amount {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-report-details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.mobile-report-details dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

.mobile-report-empty {
  min-height: 110px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
}

.selection-cell {
  justify-content: center;
  padding: 0 8px;
}

.product-head {
  position: relative;
  z-index: 1;
  min-height: 58px;
  align-items: stretch;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  cursor: grab;
}

.column-stat-head {
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #eef3f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 6px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-head.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.product-head.filtered {
  --preview-head-bg: #fff2f7;
  background: var(--preview-head-bg);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.product-head.drop-before,
.product-head.drop-after {
  --preview-head-bg: #eff5ff;
  background: var(--preview-head-bg);
}

.product-head.drop-before {
  box-shadow: inset 3px 0 0 var(--blue);
}

.product-head.drop-after {
  box-shadow: inset -3px 0 0 var(--blue);
}

.column-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 3;
}

.column-resizer::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 3px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}

.column-resizer:hover::after,
.resizing-column .column-resizer::after {
  background: var(--accent);
}

.resizing-column {
  cursor: col-resize;
  user-select: none;
}

.product-head button {
  width: 100%;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  padding: 0;
}

.stock-pivot-label {
  display: block;
  width: 100%;
}

.stock-header-dialog {
  max-width: 820px;
}

.stock-header-help {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 12px;
}

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

.export-format-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.export-format-card:hover {
  border-color: rgba(238, 38, 50, 0.55);
  background: rgba(238, 38, 50, 0.07);
}

.export-format-card strong {
  font-size: 14px;
}

.export-format-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.export-format-card:disabled {
  cursor: wait;
  opacity: 0.72;
}

.stock-header-settings-list {
  display: grid;
  max-height: min(58vh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stock-header-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.stock-header-setting-row:last-child {
  border-bottom: 0;
}

.stock-header-setting-row span {
  min-width: 0;
}

.stock-header-setting-row strong,
.stock-header-setting-row em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-header-setting-row strong {
  color: var(--ink);
  font-size: 14px;
}

.stock-header-setting-row em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.stock-header-setting-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.filter-badge {
  width: fit-content;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 7px;
}

.table-menu {
  position: fixed;
  z-index: 70;
  width: 180px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(18, 24, 33, 0.22);
  padding: 6px;
}

.table-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0 10px;
}

.table-menu button:hover {
  background: var(--surface-soft);
}

.filter-popover {
  position: fixed;
  z-index: 75;
  width: min(380px, calc(100vw - 24px));
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(18, 24, 33, 0.26);
  padding: 16px;
}

.attribute-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 24, 33, 0.5);
}

.attribute-dialog,
.cell-editor {
  width: min(620px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(18, 24, 33, 0.28);
  padding: 22px;
}

.attribute-dialog.small {
  width: min(460px, 100%);
}

.tasks-control-board {
  padding: 12px 14px;
}

.tasks-workspace-board {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
}

.tasks-workspace-nav {
  display: grid;
  gap: 12px;
  align-content: start;
}

.tasks-workspace-section {
  display: grid;
  gap: 6px;
}

.tasks-workspace-section > strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tasks-workspace-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-align: left;
}

.tasks-workspace-link:hover,
.tasks-workspace-link.active {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
}

.tasks-workspace-link.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.tasks-workspace-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tasks-workspace-link em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
}

.tasks-workspace-content {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--surface-soft);
}

.tasks-workspace-content span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.tasks-workspace-content strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.tasks-workspace-content p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.tasks-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: flex-start;
}

.task-actions-strip {
  justify-content: flex-end;
}

.tasks-status-line {
  display: flex;
  flex: 1 1 520px;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: min(100%, 460px);
  overflow-x: auto;
}

.tasks-search {
  flex: 1 1 360px;
  min-width: min(100%, 280px);
}

.tasks-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
}

.tasks-status-line .mode-chip {
  min-width: 112px;
  height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.tasks-period-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  justify-content: flex-start;
}

.tasks-period-row label {
  display: grid;
  gap: 5px;
  min-width: 128px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tasks-period-row input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

.preview-table.task-page {
  display: grid;
  gap: 16px;
  overflow: visible;
}

.task-table-grid,
.task-items-grid {
  display: grid;
  min-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task-table-grid {
  width: 100%;
  min-width: 980px;
}

.task-table-grid .preview-head,
.task-items-grid .preview-head {
  position: relative;
  z-index: 2;
  min-height: 38px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-table-grid .preview-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-table-grid .column-title-button {
  min-width: 0;
  flex: 1 1 auto;
}

.task-table-grid .column-filter-button {
  width: 22px;
  min-height: 22px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.task-row-cell {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.task-row-cell.selected {
  background: #eef6ff;
  box-shadow: inset 0 0 0 2px #2f7ee6;
}

.task-row-cell.status-deleted {
  color: var(--muted);
  background: #f8f9fb;
}

.task-row-cell.status-done {
  background: #f4fbf5;
}

.task-empty-row {
  min-height: 52px;
  display: grid;
  align-items: center;
  padding: 14px;
  color: var(--muted);
  background: #fff;
}

.task-empty-row.wide {
  grid-column: 1 / -1;
}

.task-detail-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.task-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.task-detail-summary article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.task-detail-summary article em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.task-detail-summary span,
.task-change-log > strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-items-grid {
  grid-template-columns: 64px minmax(180px, 1.25fr) 120px 160px 88px 150px 82px 132px 82px 96px 82px 126px;
  min-width: 1320px;
}

.task-items-grid > div {
  min-height: 38px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
}

.task-photo-cell {
  display: grid;
  place-items: center;
  padding: 6px;
}

.task-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
}

.task-detail-items-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0d10;
}

.task-detail-items-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 100%;
  background: #0a0d10;
}

.task-detail-items-table th,
.task-detail-items-table td {
  position: relative;
  height: 38px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 9px 10px;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.task-detail-items-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #151a20;
  color: #aeb6c0;
  font-size: 11px;
  font-weight: 800;
}

.task-detail-items-table td {
  background: #0f1318;
  color: #dbe0e6;
  font-size: 12px;
}

.task-detail-items-table tr:hover td {
  background: #171d23;
}

.task-detail-items-table .column-title-button {
  width: calc(100% - 10px);
  min-height: 20px;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: hidden;
  padding: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-detail-column-resizer {
  position: absolute;
  inset: 0 0 0 auto;
  width: 8px;
  cursor: col-resize;
}

.task-detail-items-table .task-photo-cell {
  text-align: center;
}

.task-detail-items-table .task-thumb {
  display: inline-block;
  width: 44px;
  height: 44px;
}

.task-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.task-status-pill.status-started {
  border-color: rgba(47, 126, 230, 0.32);
  background: rgba(47, 126, 230, 0.08);
}

.task-status-pill.status-done {
  border-color: rgba(39, 151, 91, 0.32);
  background: rgba(39, 151, 91, 0.08);
}

.task-status-pill.status-deleted {
  color: var(--muted);
  background: #f8f9fb;
}

.task-change-log {
  display: grid;
  gap: 8px;
}

.task-change-log article {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-soft);
}

.task-change-log article strong {
  font-size: 12px;
}

.task-change-log article span {
  color: var(--muted);
}

.task-edit-dialog {
  width: min(1180px, 100%);
  max-height: min(880px, calc(100vh - 48px));
  overflow: auto;
}

.task-edit-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.task-edit-fields .wide {
  grid-column: span 2;
}

.task-edit-items {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.task-edit-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.85fr) minmax(180px, 1.15fr) 110px 150px 72px 128px 74px 74px 74px 74px 74px 116px 90px;
  gap: 6px;
  align-items: center;
}

.task-edit-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-edit-row input,
.task-edit-row select {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
}

.campaign-detail-dialog {
  width: min(1680px, calc(100vw - 28px));
  min-width: min(1180px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  resize: horizontal;
}

.campaign-fields-help-dialog {
  width: min(1240px, 100%);
  max-height: min(880px, calc(100vh - 48px));
  overflow: auto;
}

.campaign-fields-help-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.campaign-fields-help-summary article {
  display: grid;
  gap: 5px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 11px 12px;
}

.campaign-fields-help-summary span,
.campaign-field-help-card header span,
.campaign-field-help-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.campaign-fields-help-summary strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.15;
}

.campaign-fields-help-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(260px, 1fr);
  gap: 10px;
  align-items: center;
}

.campaign-fields-help-toolbar input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #070a0e;
  color: var(--text);
}

.campaign-fields-help-toolbar span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.campaign-fields-help-list {
  display: grid;
  gap: 10px;
}

.campaign-field-help-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--surface-soft);
  padding: 13px;
}

.campaign-field-help-card[hidden] {
  display: none;
}

.campaign-field-help-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: start;
}

.campaign-field-help-card header div {
  display: grid;
  gap: 4px;
}

.campaign-field-help-card header strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
}

.campaign-field-help-card code {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  background: rgba(0, 0, 0, 0.22);
  color: #cbd5df;
  font-size: 12px;
}

.campaign-field-help-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.campaign-field-help-meta span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.035);
  text-transform: none;
}

.campaign-field-help-card p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.campaign-field-help-card section {
  display: grid;
  gap: 5px;
}

.campaign-field-help-card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.campaign-field-help-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.campaign-detail-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.campaign-detail-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.campaign-detail-kpis article {
  display: grid;
  gap: 5px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.campaign-detail-kpis span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.campaign-detail-kpis strong {
  font-size: 20px;
  line-height: 1.15;
}

.campaign-kpi-compare {
  align-content: start;
}

.campaign-kpi-compare .detail-previous {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.campaign-budget-balance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.campaign-budget-balance article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.campaign-budget-balance span,
.campaign-budget-balance small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.campaign-budget-balance strong {
  font-size: 18px;
}

.campaign-budget-balance small {
  grid-column: 1 / -1;
}

.campaign-detail-chart {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.campaign-detail-chart.empty {
  min-height: 120px;
  place-items: center;
  color: var(--muted);
}

.campaign-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.campaign-chart-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--chart-color);
}

.campaign-detail-chart svg {
  width: 100%;
  min-height: 220px;
}

.campaign-detail-chart line {
  stroke: var(--line);
  stroke-width: 1;
}

.campaign-detail-chart polyline {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.campaign-detail-chart text {
  fill: var(--muted);
  font-size: 12px;
}

.campaign-detail-table-wrap,
.campaign-query-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.campaign-detail-table,
.campaign-query-table {
  display: grid;
  min-width: 980px;
  background: var(--line);
  gap: 1px;
}

.campaign-detail-table {
  grid-template-columns: minmax(90px, 0.8fr) minmax(110px, 0.9fr) repeat(8, minmax(96px, 1fr));
}

.campaign-query-table {
  grid-template-columns: minmax(260px, 1.8fr) minmax(92px, 0.7fr) minmax(92px, 0.7fr) repeat(5, minmax(92px, 0.7fr));
}

.campaign-detail-table > div,
.campaign-query-table > div {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: #fff;
  word-break: break-word;
}

.campaign-detail-head-cell {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft) !important;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.campaign-query-text {
  font-weight: 700;
}

.campaign-query-data-table .campaign-query-text strong {
  display: block;
  min-width: 260px;
  max-width: 440px;
  color: var(--text);
  line-height: 1.35;
}

.campaign-query-empty {
  height: 150px;
  text-align: center;
}

.campaign-query-empty strong,
.campaign-query-empty span {
  display: block;
}

.campaign-query-empty strong {
  margin-bottom: 7px;
  color: var(--text);
  font-size: 15px;
}

.campaign-query-empty span {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.45;
}

.campaign-detail-controls,
.campaign-detail-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.campaign-detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.campaign-detail-period-note,
.campaign-detail-table-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.campaign-detail-table-toolbar {
  justify-content: space-between;
}

.campaign-detail-table-toolbar input {
  min-width: min(360px, 100%);
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  background: #070a0e;
  color: var(--text);
}

.campaign-detail-chart {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    #10151b;
}

.campaign-chart-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.campaign-chart-legend button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.campaign-chart-legend button::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--chart-color);
}

.campaign-chart-legend button.selected {
  border-color: color-mix(in srgb, var(--chart-color) 55%, transparent);
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--chart-color) 28%, transparent), color-mix(in srgb, var(--chart-color) 12%, transparent)),
    rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--chart-color) 35%, transparent),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

.campaign-chart-legend em {
  align-self: center;
  color: var(--muted);
  font-style: normal;
}

.campaign-chart-stage {
  position: relative;
  min-height: 260px;
}

.campaign-detail-chart .campaign-week-grid {
  stroke: rgba(255, 255, 255, 0.085);
}

.campaign-detail-chart .campaign-chart-crosshair {
  stroke: rgba(255, 255, 255, 0.42);
  stroke-dasharray: 4 4;
}

.campaign-detail-chart .metric-bar {
  fill: var(--bar-color);
  opacity: 0.84;
}

.campaign-detail-chart .metric-bar-previous {
  opacity: 0.24;
}

.campaign-detail-chart .metric-line-previous {
  opacity: 0.35;
  stroke-dasharray: 7 6;
}

.campaign-detail-chart .campaign-chart-value {
  fill: #dce7f4;
  font-size: 10px;
  font-weight: 800;
}

.campaign-chart-hover-zone {
  fill: transparent;
  cursor: crosshair;
}

.campaign-chart-tooltip {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 5px;
  min-width: 178px;
  max-width: 280px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(7, 10, 14, 0.96);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.35);
  color: var(--text);
  pointer-events: none;
}

.campaign-chart-tooltip strong {
  font-size: 13px;
}

.campaign-chart-tooltip small {
  color: var(--muted);
}

.campaign-chart-tooltip span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #dbe6f2;
  font-size: 12px;
}

.campaign-chart-tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--chart-color);
}

.campaign-detail-data-table {
  width: 100%;
  min-width: 1560px;
  border-collapse: separate;
  border-spacing: 0;
  background: #0d1218;
  color: var(--text);
  font-size: 12px;
}

.campaign-detail-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  background: #151b22;
  text-align: left;
}

.campaign-detail-data-table th button {
  width: 100%;
  min-height: 38px;
  border: 0;
  padding: 0 10px;
  background: transparent;
  color: #a9bfda;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.campaign-query-data-table {
  min-width: 1120px;
}

.campaign-query-data-table th {
  min-height: 38px;
  padding: 11px 10px;
  color: #a9bfda;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-detail-data-table th.metric-active {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--metric-color) 18%, transparent), rgba(21, 27, 34, 0.98)),
    #151b22;
  box-shadow: inset 0 -2px 0 var(--metric-color);
}

.campaign-detail-data-table th.metric-active button {
  color: #ffffff;
}

.campaign-detail-data-table td {
  min-height: 46px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.018);
  vertical-align: middle;
}

.campaign-detail-data-table td.metric-active {
  border-left: 2px solid color-mix(in srgb, var(--metric-color) 70%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--metric-color) 13%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.026);
}

.campaign-detail-data-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.035);
}

.campaign-detail-data-table tr:nth-child(even) td.metric-active {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--metric-color) 15%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.042);
}

.campaign-detail-data-table tr:hover td,
.campaign-detail-data-table tr.active td {
  background: rgba(79, 124, 255, 0.13);
}

.campaign-detail-data-table tr:hover td.metric-active,
.campaign-detail-data-table tr.active td.metric-active {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--metric-color) 20%, transparent), rgba(79, 124, 255, 0.08) 62%),
    rgba(79, 124, 255, 0.13);
}

.campaign-detail-cell-stack {
  display: grid;
  gap: 3px;
  min-width: 76px;
}

.detail-current {
  color: var(--text);
  font-weight: 800;
}

.detail-previous {
  color: var(--muted);
  font-size: 11px;
}

.detail-current.better,
.detail-previous.better {
  color: #47d18c;
}

.detail-current.worse,
.detail-previous.worse {
  color: #ff6478;
}

.campaign-detail-empty {
  height: 78px;
  color: var(--muted);
  text-align: center;
}

.campaign-detail-settings-dialog {
  width: min(920px, calc(100vw - 32px));
}

.campaign-detail-settings-list {
  display: grid;
  gap: 8px;
  max-height: min(560px, calc(100vh - 230px));
  overflow: auto;
}

.campaign-detail-setting-row {
  display: grid;
  grid-template-columns: 24px minmax(140px, 1fr) minmax(110px, 0.65fr) 54px minmax(130px, 0.75fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface-soft);
}

.campaign-detail-setting-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.campaign-detail-setting-row i {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--chart-color);
}

.campaign-detail-setting-row select,
.campaign-detail-setting-row input[type="color"] {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #070a0e;
  color: var(--text);
}

.campaign-detail-setting-row input[type="color"] {
  padding: 3px;
}

.campaign-raw-response {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.campaign-raw-response summary {
  cursor: pointer;
  font-weight: 800;
}

.campaign-raw-response pre {
  max-height: 360px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #10131a;
  color: #f7f8fb;
  font-size: 12px;
}

.order-locality-dialog {
  width: min(1120px, 100%);
}

.locality-note {
  margin: -4px 0 4px;
}

.locality-body {
  max-height: min(520px, calc(100vh - 260px));
  overflow: auto;
  display: grid;
  gap: 12px;
}

.locality-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.locality-summary article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.locality-summary article.warning {
  border-color: rgba(240, 165, 43, 0.42);
  background: linear-gradient(180deg, rgba(240, 165, 43, 0.12), rgba(255, 255, 255, 0.015)), var(--surface);
}

.locality-summary article.positive {
  border-color: rgba(38, 166, 91, 0.36);
  background: linear-gradient(180deg, rgba(38, 166, 91, 0.10), rgba(255, 255, 255, 0.015)), var(--surface);
}

.locality-summary span,
.locality-summary em,
.locality-priority > div span,
.locality-secondary > div span,
.locality-ok span,
.locality-cell span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.locality-summary strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.locality-priority,
.locality-secondary,
.locality-ok {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.locality-priority {
  border-color: rgba(238, 38, 50, 0.38);
  background: linear-gradient(180deg, rgba(238, 38, 50, 0.08), rgba(255, 255, 255, 0.012)), var(--surface);
}

.locality-priority > div,
.locality-secondary > div,
.locality-ok {
  display: grid;
  gap: 4px;
}

.locality-table {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(240px, 1fr) repeat(3, minmax(100px, 0.45fr));
  min-width: 860px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.locality-table.priority {
  border-color: rgba(238, 38, 50, 0.36);
}

.locality-summary-table {
  grid-template-columns: minmax(240px, 1.2fr) minmax(240px, 1fr) repeat(3, minmax(110px, 0.45fr));
}

.locality-head,
.locality-cell {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.locality-cell {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
}

.locality-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  font-weight: 700;
}

.locality-cell select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0d10;
  color: #f3f5f7;
  padding: 0 9px;
}

.locality-cell.positive {
  color: var(--green);
  font-weight: 700;
}

.locality-cell.warning {
  color: var(--amber);
  font-weight: 700;
}

.locality-cell.danger {
  color: #ff6b76;
  font-weight: 800;
}

.locality-empty-row {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

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

.attribute-field span,
.delete-note {
  color: var(--muted);
  font-size: 13px;
}

.attribute-field input,
.attribute-field select,
.cell-editor input,
.cell-editor select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  padding: 0 12px;
}

.attribute-field input:focus,
.attribute-field select:focus,
.cell-editor input:focus,
.cell-editor select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.1);
}

.attribute-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.dictionary-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.dictionary-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.dictionary-add input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.dictionary-add button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
}

.dictionary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dictionary-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 6px 8px 6px 10px;
  font-size: 13px;
}

.dictionary-item button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
}

.secondary-action.danger {
  background: var(--accent);
}

.cell-editor {
  position: fixed;
  z-index: 78;
  width: min(420px, calc(100vw - 24px));
}

.custom-cell {
  cursor: text;
}

.custom-cell:hover {
  background: rgba(197, 31, 93, 0.05);
  box-shadow: inset 0 0 0 2px rgba(197, 31, 93, 0.14);
}

.stock-cell.muted-stock {
  color: var(--muted);
  background: #f7f8fa;
}

.stock-cell.danger-stock {
  color: #8f1d32;
  background: rgba(197, 31, 93, 0.08);
  font-weight: 700;
}

.stock-cell.warning-stock {
  color: var(--amber);
  background: rgba(154, 101, 0, 0.08);
  font-weight: 700;
}

.price-cell.danger-stock {
  color: #8f1d32;
  background: rgba(197, 31, 93, 0.08);
  font-weight: 700;
}

.price-cell.warning-stock {
  color: var(--amber);
  background: rgba(154, 101, 0, 0.08);
  font-weight: 700;
}

.price-input {
  width: 100%;
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  background: #fff;
  outline: none;
}

.price-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.12);
}

.price-control-board {
  margin-top: 12px;
}

.price-control-row {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

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

.period-quick-row button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
}

.period-quick-row button.selected {
  border-color: var(--accent);
  background: rgba(197, 31, 93, 0.06);
}

.price-date-field {
  display: grid;
  gap: 6px;
}

.price-date-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.price-date-field input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  outline: none;
}

.price-date-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.12);
}

.product-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 24, 33, 0.56);
}

.product-detail-dialog {
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(18, 24, 33, 0.32);
  padding: 22px;
}

.product-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.product-detail-head h2 {
  margin: 4px 0;
  font-size: 24px;
}

.product-detail-head p {
  margin: 0;
  color: var(--muted);
}

.product-detail-body {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.detail-gallery {
  display: grid;
  gap: 12px;
  align-content: start;
}

#detail-main-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.detail-thumbs button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0;
  overflow: hidden;
}

.detail-thumbs button.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(197, 31, 93, 0.14);
}

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

.detail-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.detail-info {
  display: grid;
  gap: 14px;
}

.detail-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.detail-kpis article,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.detail-kpis article {
  min-height: 86px;
  display: grid;
  align-content: space-between;
  padding: 12px;
}

.detail-kpis span,
.detail-table span,
.detail-attributes span {
  color: var(--muted);
  font-size: 12px;
}

.detail-kpis strong {
  font-size: 20px;
}

.detail-panels {
  display: grid;
  gap: 12px;
}

.detail-panel {
  padding: 14px;
}

.detail-panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

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

.detail-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.detail-row strong {
  overflow-wrap: anywhere;
}

.detail-row-head {
  background: var(--surface-soft);
}

.detail-row-head span {
  color: var(--ink);
  font-weight: 700;
}

.detail-attributes {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px;
}

.detail-attributes div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.filter-head,
.filter-actions,
.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.filter-popover input[type="search"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  padding: 0 12px;
}

.filter-popover input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.1);
}

.filter-actions button,
.filter-footer button {
  min-height: 34px;
}

.filter-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
}

.filter-values {
  max-height: 300px;
  display: grid;
  gap: 4px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
}

.filter-option {
  min-height: 32px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 12px;
}

.filter-option:hover {
  background: var(--surface-soft);
}

.filter-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-option em,
.filter-empty {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.filter-empty {
  padding: 12px;
}

.product-cell.selected,
.selection-cell.selected,
.campaign-cell.selected {
  background: rgba(34, 103, 184, 0.1);
  box-shadow: inset 3px 0 0 var(--blue);
}

.campaign-cell {
  cursor: default;
}

.campaign-status-cell {
  justify-content: center;
  padding: 0 10px;
}

.campaign-status-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 30px;
  border: 1px solid #d6d9e3;
  border-radius: 999px;
  background: #eef0f5;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
  color: #6b7280;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  cursor: pointer;
}

.campaign-status-switch:disabled {
  cursor: wait;
  opacity: 0.65;
}

.campaign-status-switch.on {
  border-color: #8b3dff;
  background: linear-gradient(90deg, #9b4dff, #7c2cff);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 44, 255, 0.22);
}

.campaign-status-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28);
  transition: transform 0.16s ease;
}

.campaign-status-switch.on .campaign-status-knob {
  transform: translateX(28px);
}

.campaign-status-text {
  position: absolute;
  right: 9px;
  z-index: 1;
  pointer-events: none;
}

.campaign-status-switch.on .campaign-status-text {
  right: auto;
  left: 9px;
}

.campaign-favorite-cell {
  justify-content: center;
  padding: 0 8px;
  cursor: pointer;
}

.campaign-select-head {
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.campaign-select-head span {
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
}

.campaign-select-visible {
  width: 28px;
  height: 28px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue);
  font-size: 0;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.campaign-select-visible::before {
  content: "\2610";
  color: #d6dce3;
  font-size: 15px;
  line-height: 1;
}

.campaign-select-visible:hover,
.campaign-select-visible:focus-visible {
  border-color: var(--blue);
  background: rgba(34, 103, 184, 0.08);
  outline: none;
}

.campaign-favorite-toggle {
  width: 34px;
  height: 34px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0;
  line-height: 1;
}

.campaign-favorite-toggle::before {
  content: "\2606";
  color: #8f98a3;
  font-size: 20px;
  line-height: 1;
}

.campaign-favorite-toggle:hover,
.campaign-favorite-toggle.active {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #b45309;
}

.campaign-favorite-toggle:hover::before,
.campaign-favorite-toggle.active::before {
  content: "\2605";
  color: #f59e0b;
}

.campaign-primary-toggle {
  width: 34px;
  height: 34px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0;
  font-weight: 800;
  line-height: 1;
}

.campaign-primary-toggle::before {
  content: "+";
  color: #8f98a3;
  font-size: 18px;
  line-height: 1;
}

.campaign-primary-toggle:hover,
.campaign-primary-toggle.active {
  border-color: var(--blue);
  background: rgba(34, 103, 184, 0.08);
  color: var(--blue);
}

.campaign-primary-toggle:hover::before,
.campaign-primary-toggle.active::before {
  content: "\2713";
  color: #d6dce3;
}

.campaign-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.campaign-dialog-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 14px;
}

.campaign-dialog-actions button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.campaign-dialog-actions .secondary-action {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.campaign-dialog-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-thumb {
  width: 52px;
  height: 64px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 39, 51, 0.08);
}

.preview-head {
  --preview-head-bg: var(--surface-soft);
  background: var(--preview-head-bg);
  font-weight: 700;
}

.preview-table:not(.mobile-card-table) > .preview-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--preview-head-bg, var(--surface-soft));
  box-shadow:
    0 -1px 0 var(--preview-head-bg, var(--surface-soft)),
    0 1px 0 var(--line),
    0 8px 0 var(--preview-head-bg, var(--surface-soft));
}

.preview-table.has-column-stat-row:not(.mobile-card-table) > .column-stat-head {
  top: 0;
  z-index: 24;
  box-shadow:
    0 -1px 0 #eef3f7,
    0 1px 0 var(--line);
}

.preview-table.has-column-stat-row:not(.mobile-card-table) > .column-label-head {
  top: 32px;
}

.preview-table:not(.mobile-card-table) > .preview-head.product-head.filtered {
  box-shadow:
    inset 0 -3px 0 var(--accent),
    0 -1px 0 var(--preview-head-bg, var(--surface-soft)),
    0 1px 0 var(--line),
    0 8px 0 var(--preview-head-bg, var(--surface-soft));
}

.preview-table:not(.mobile-card-table) > .preview-head.product-head.drop-before {
  box-shadow:
    inset 3px 0 0 var(--blue),
    0 -1px 0 var(--preview-head-bg, var(--surface-soft)),
    0 1px 0 var(--line),
    0 8px 0 var(--preview-head-bg, var(--surface-soft));
}

.preview-table:not(.mobile-card-table) > .preview-head.product-head.drop-after {
  box-shadow:
    inset -3px 0 0 var(--blue),
    0 -1px 0 var(--preview-head-bg, var(--surface-soft)),
    0 1px 0 var(--line),
    0 8px 0 var(--preview-head-bg, var(--surface-soft));
}

.muted {
  color: var(--muted);
}

.sync-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 24, 33, 0.46);
}

.columns-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 24, 33, 0.5);
}

.columns-dialog {
  width: min(1380px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(18, 24, 33, 0.28);
  padding: 24px;
}

.columns-head,
.columns-toolbar,
.columns-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.columns-head {
  justify-content: space-between;
  margin-bottom: 18px;
}

.columns-head h2 {
  margin: 4px 0 0;
}

.columns-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr);
}

.columns-toolbar label {
  display: grid;
  gap: 6px;
}

.columns-toolbar span,
.columns-help {
  color: var(--muted);
  font-size: 13px;
}

.columns-toolbar select,
.columns-toolbar input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.columns-actions {
  flex-wrap: wrap;
  margin: 14px 0;
}

.columns-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
}

.columns-actions button:hover {
  border-color: var(--accent);
  background: rgba(197, 31, 93, 0.06);
}

.columns-list {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  align-items: start;
  gap: 14px;
  margin-top: 12px;
}

.columns-zone {
  min-height: min(620px, calc(100vh - 285px));
  max-height: min(720px, calc(100vh - 240px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.columns-zone-head {
  position: sticky;
  top: -12px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: -12px -12px 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: inherit;
}

.columns-zone-head strong {
  font-size: 16px;
}

.columns-zone-head span {
  color: var(--muted);
  font-size: 12px;
}

.visible-zone {
  background: #f8fafc;
}

.columns-visible-list {
  display: grid;
  gap: 8px;
}

.columns-library {
  display: grid;
  gap: 12px;
}

.columns-library-group {
  display: grid;
  gap: 8px;
}

.columns-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px;
}

.columns-group-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.visible-zone .columns-group-title {
  position: sticky;
  top: 43px;
  z-index: 1;
}

.columns-group-title strong {
  font-size: 13px;
}

.columns-group-title span {
  color: var(--muted);
  font-size: 12px;
}

.columns-group-title.compact {
  margin-top: 2px;
  padding: 6px 8px;
  background: transparent;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.columns-group-title.compact:first-child {
  border-top: 0;
}

.columns-item {
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
}

.columns-item.available {
  cursor: pointer;
}

.columns-item.available:hover,
.columns-item.visible:hover {
  border-color: rgba(197, 31, 93, 0.45);
  background: rgba(197, 31, 93, 0.04);
}

.columns-item.visible {
  background: #ffffff;
}

.columns-item.dragging {
  opacity: 0.55;
  border-color: var(--accent);
}

.columns-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.columns-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.drag-handle {
  color: var(--muted);
  cursor: grab;
  text-align: center;
}

.columns-item.available .drag-handle {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.columns-empty {
  grid-column: 1 / -1;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
}

.sync-dialog {
  width: min(780px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(18, 24, 33, 0.28);
  padding: 24px;
}

.sync-dialog-head,
.sync-status-row,
.sync-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sync-dialog-head {
  margin-bottom: 22px;
}

.sync-dialog-head h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.sync-status-row {
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-soft);
}

.sync-status-row strong,
.sync-status-row span {
  display: block;
}

.sync-status-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.sync-loader-art {
  margin: 16px 0 2px;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  background:
    linear-gradient(135deg, rgba(197, 31, 93, 0.08), rgba(34, 103, 184, 0.08)),
    var(--surface);
}

.sync-loader-photos {
  background:
    linear-gradient(135deg, rgba(34, 103, 184, 0.09), rgba(22, 139, 100, 0.08)),
    var(--surface);
}

.sync-loader-stocks {
  background:
    linear-gradient(135deg, rgba(22, 139, 100, 0.1), rgba(34, 103, 184, 0.06)),
    var(--surface);
}

.sync-loader-promotion {
  background:
    linear-gradient(135deg, rgba(197, 31, 93, 0.1), rgba(34, 103, 184, 0.08)),
    var(--surface);
}

.sync-orbit {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 1px solid rgba(34, 103, 184, 0.26);
  border-radius: 50%;
  animation: sync-spin 2.4s linear infinite;
}

.sync-orbit.waiting {
  background: conic-gradient(var(--blue) var(--wait-progress, 0%), rgba(34, 103, 184, 0.12) 0);
  animation: none;
  box-shadow: inset 0 0 0 7px var(--surface);
}

.sync-orbit::before,
.sync-orbit::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(197, 31, 93, 0.28);
  border-radius: 50%;
}

.sync-orbit::after {
  inset: 20px;
  background: var(--ink);
  border-color: transparent;
  box-shadow: 0 0 0 5px rgba(18, 24, 33, 0.08);
}

.sync-orbit span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(197, 31, 93, 0.36);
}

.sync-orbit.waiting span {
  opacity: 0;
}

.sync-orbit span:nth-child(1) {
  top: -4px;
  left: 24px;
}

.sync-orbit span:nth-child(2) {
  right: 2px;
  bottom: 9px;
  background: var(--blue);
}

.sync-orbit span:nth-child(3) {
  left: 4px;
  bottom: 8px;
  background: var(--green);
}

.sync-loader-photos .sync-orbit {
  border-radius: 14px;
  border-color: rgba(34, 103, 184, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(34, 103, 184, 0.08));
  animation: pulse 1.6s ease-in-out infinite;
}

.sync-loader-photos .sync-orbit::before {
  inset: 8px 11px 14px 11px;
  border-radius: 8px;
  border-color: rgba(34, 103, 184, 0.25);
  background: rgba(255, 255, 255, 0.62);
}

.sync-loader-photos .sync-orbit::after {
  inset: auto 12px 9px auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(34, 103, 184, 0.12);
}

.sync-loader-photos .sync-orbit span {
  width: 18px;
  height: 24px;
  border-radius: 5px;
  background: rgba(197, 31, 93, 0.82);
  box-shadow: 0 7px 18px rgba(18, 24, 33, 0.12);
}

.sync-loader-photos .sync-orbit span:nth-child(1) {
  top: 9px;
  left: 6px;
  transform: rotate(-10deg);
}

.sync-loader-photos .sync-orbit span:nth-child(2) {
  right: 16px;
  bottom: 17px;
  background: rgba(34, 103, 184, 0.82);
}

.sync-loader-photos .sync-orbit span:nth-child(3) {
  left: 27px;
  bottom: 10px;
  transform: rotate(8deg);
}

.sync-loader-stocks .sync-orbit span:nth-child(1),
.sync-loader-stocks .sync-orbit span:nth-child(2),
.sync-loader-stocks .sync-orbit span:nth-child(3) {
  background: var(--green);
}

.sync-loader-promotion .sync-orbit span:nth-child(1) {
  background: var(--accent);
}

.sync-loader-promotion .sync-orbit span:nth-child(2) {
  background: var(--blue);
}

.sync-loader-copy {
  display: grid;
  gap: 4px;
}

.sync-loader-copy strong {
  font-size: 16px;
}

.sync-loader-copy span {
  color: var(--muted);
  font-size: 13px;
}

.sync-pulse {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue);
}

.sync-pulse.running {
  animation: pulse 1s ease-in-out infinite;
}

.sync-pulse.done {
  background: var(--green);
}

.sync-pulse.error {
  background: var(--accent);
}

.sync-progress {
  height: 12px;
  overflow: hidden;
  margin: 18px 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.sync-progress-bar {
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 0.35s ease;
}

.sync-progress-bar.indeterminate {
  background:
    repeating-linear-gradient(
      45deg,
      var(--accent),
      var(--accent) 10px,
      var(--accent-dark) 10px,
      var(--accent-dark) 20px
    );
  background-size: 36px 36px;
  animation: sync-stripes 0.8s linear infinite;
}

.sync-progress-text {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.sync-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.sync-stats article {
  min-height: 92px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.sync-stats span,
.sync-timeline {
  color: var(--muted);
  font-size: 13px;
}

.sync-stats strong {
  overflow-wrap: anywhere;
  font-size: 20px;
}

.sync-timeline {
  margin-top: 16px;
  justify-content: flex-start;
}

.sync-error {
  margin-top: 16px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(197, 31, 93, 0.32);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: rgba(197, 31, 93, 0.06);
}

.sync-error span {
  color: var(--muted);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.sync-error.warning {
  border-color: rgba(154, 101, 0, 0.32);
  border-left-color: var(--amber);
  background: rgba(154, 101, 0, 0.08);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }

  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

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

@keyframes sync-stripes {
  to {
    background-position: 36px 0;
  }
}

@media (max-width: 1000px) {
  .tasks-workspace-board {
    grid-template-columns: 1fr;
  }

  .screen-dashboard,
  .content-grid,
  .columns-toolbar,
  .columns-list,
  .columns-visible-list,
  .columns-library-grid {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .brand-block {
    display: none;
  }

  .login-panel {
    width: min(560px, 100%);
    margin-left: auto;
  }

  .columns-zone {
    min-height: auto;
    max-height: none;
  }

  .promotion-period-board {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sidebar {
    min-height: auto;
  }

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

  .metric-grid,
  .mode-grid,
  .owner-kpi-grid,
  .owner-lower-grid,
  .funnel-grid,
  .sync-stats,
  .article-columns-panel,
  .product-detail-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-grid.promo-mode-row {
    display: flex;
  }

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

  .product-detail-body {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .screen-login,
  .workspace,
  .sidebar {
    padding: 16px;
  }

  .login-panel {
    min-height: auto;
    padding: 28px 22px;
  }

  .screen-module-hub {
    padding: 16px;
  }

  .module-hub-shell {
    min-height: calc(100vh - 32px);
    align-content: start;
    gap: 18px;
  }

  .module-hub-head {
    align-items: stretch;
    flex-direction: column;
  }

  .module-hub-head h1 {
    font-size: 34px;
    line-height: 1;
  }

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

  .module-tile {
    min-height: 142px;
    padding: 16px;
  }

  .module-tile strong {
    font-size: 20px;
  }

  .login-title {
    margin-bottom: 34px;
    letter-spacing: 0.18em;
  }

  .login-title h1,
  .section-title h1 {
    font-size: 28px;
  }

  .login-title span {
    font-size: 14px;
  }

  .login-panel .field input {
    min-height: 54px;
    font-size: 14px;
  }

  .login-panel .primary-action {
    min-height: 58px;
    font-size: 16px;
  }

  .topbar,
  .section-title,
  .store-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-title-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-actions .ghost-button,
  .section-title .secondary-action {
    flex: 1 1 auto;
  }

  .dashboard-band,
  .module-board,
  .table-section {
    padding: 14px;
  }

  .table-section {
    max-height: none;
    overflow: visible;
  }

  .table-section > .section-title {
    position: static;
    margin: 0 0 12px;
    padding: 0 0 12px;
  }

  .table-section > .section-title::before {
    display: none;
  }

  .metric-grid,
  .mode-grid,
  .owner-kpi-grid,
  .owner-lower-grid,
  .funnel-grid,
  .sync-stats,
  .article-columns-panel,
  .nav-list,
  .preview-table {
    grid-template-columns: 1fr;
  }

  .mode-grid.promo-mode-row {
    display: flex;
  }

  .article-control-row,
  .article-status-row {
    align-items: stretch;
    flex-direction: column;
  }

  .sync-dialog {
    padding: 18px;
  }

  .columns-dialog,
  .product-detail-dialog {
    padding: 18px;
  }

  .sync-dialog-head,
  .sync-timeline,
  .columns-head,
  .product-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-kpis,
  .detail-attributes,
  .detail-row {
    grid-template-columns: 1fr;
  }

  .task-item {
    grid-template-columns: 1fr;
  }

  .preview-table > div {
    border-right: 0;
  }

  .preview-table.mobile-card-table {
    grid-template-columns: 1fr;
  }

  .mobile-report-card-head {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .mobile-report-amount {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

body.force-mobile-layout .screen-dashboard {
  grid-template-columns: 1fr;
}

body.force-mobile-layout .sidebar {
  min-height: auto;
  padding: 16px;
}

body.force-mobile-layout .workspace {
  padding: 16px;
}

body.force-mobile-layout .nav-list,
body.force-mobile-layout .metric-grid,
body.force-mobile-layout .mode-grid,
body.force-mobile-layout .module-grid,
body.force-mobile-layout .preview-table.mobile-card-table {
  grid-template-columns: 1fr;
}

body.force-mobile-layout .module-hub-head,
body.force-mobile-layout .topbar,
body.force-mobile-layout .section-title,
body.force-mobile-layout .article-control-row,
body.force-mobile-layout .article-status-row {
  align-items: stretch;
  flex-direction: column;
}

body.force-mobile-layout .table-section {
  max-height: none;
  overflow: visible;
}

body.force-mobile-layout .table-section > .section-title {
  position: static;
  margin: 0 0 12px;
  padding: 0 0 12px;
}

body.force-mobile-layout .table-section > .section-title::before {
  display: none;
}

/* CHUPCHi dark interface */
:root {
  --bg: #050607;
  --surface: #101419;
  --surface-soft: #151a20;
  --surface-raised: #191f26;
  --ink: #f4f5f7;
  --muted: #8f98a3;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #ee2632;
  --accent-dark: #a81420;
  --green: #26c281;
  --blue: #8e98a5;
  --amber: #f0a52b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

body {
  background:
    radial-gradient(circle at 18% -10%, rgba(238, 38, 50, 0.09), transparent 34%),
    radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.055), transparent 28%),
    #050607;
  color: var(--ink);
  font-family: "Arial Narrow", "Roboto Condensed", "Inter", Arial, Helvetica, sans-serif;
}

.screen-dashboard {
  grid-template-columns: 205px minmax(0, 1fr);
  background: #050607;
}

.sidebar {
  position: relative;
  background:
    linear-gradient(180deg, rgba(17, 22, 28, 0.98), rgba(8, 11, 14, 0.98)),
    #0b0e12;
  border-right: 1px solid var(--line);
  box-shadow: 16px 0 48px rgba(0, 0, 0, 0.28);
  padding: 22px 14px;
}

.sidebar-brand {
  min-height: 58px;
  margin: -4px 0 24px;
  padding: 0 12px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-home-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.sidebar-home-button:hover .brand-mark.small,
.sidebar-home-button:focus-visible .brand-mark.small {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26), 0 8px 24px rgba(238, 38, 50, 0.42);
}

.sidebar-home-button:focus-visible {
  outline: 1px solid var(--line-strong);
  outline-offset: 3px;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 20px rgba(238, 38, 50, 0.24);
  font-size: 11px;
}

.sidebar-brand strong,
.module-hub-head h1,
.login-title h1 {
  letter-spacing: 0;
}

.sidebar-brand strong {
  color: #fff;
  font-size: 16px;
}

.sidebar-brand span {
  color: #7e8791;
  font-size: 11px;
  text-transform: lowercase;
}

.nav-group {
  margin-bottom: 18px;
}

.nav-group-title {
  min-height: 28px;
  color: #6f7780;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.nav-group-title::after {
  color: #69727b;
}

.nav-group {
  gap: 6px;
  margin: 6px 0 12px;
  padding: 0;
  background: transparent;
}

.nav-group-title,
.nav-group-marketing .nav-group-title,
.nav-group-analytics-data .nav-group-title {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    #10151a;
  color: #d6dbe1;
  font-size: 11px;
  font-weight: 800;
  padding: 0 12px;
  text-transform: uppercase;
}

.nav-group-title::after,
.nav-group-marketing .nav-group-title::after,
.nav-group-analytics-data .nav-group-title::after {
  color: #8f98a7;
  float: none;
  font-size: 16px;
  font-weight: 600;
}

.nav-group-active > .nav-group-title,
.nav-group-title:hover {
  border-color: rgba(238, 38, 50, 0.42);
  background:
    linear-gradient(180deg, rgba(238, 38, 50, 0.10), rgba(255, 255, 255, 0.024)),
    #11161b;
  color: #fff;
}

.nav-group-marketing,
.nav-group-analytics-data {
  margin: 6px 0 12px;
  padding: 0;
  background: transparent;
}

.nav-list button {
  position: relative;
  min-height: 34px;
  border-radius: 4px;
  color: #b5bdc6;
  font-size: 13px;
  padding: 0 10px 0 14px;
}

.nav-list button.active,
.nav-list button:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.nav-list button.active::before {
  content: "";
  position: absolute;
  inset: 6px auto 6px -1px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.nav-list .nav-group > .nav-group-title,
.nav-list .nav-group-marketing > .nav-group-title,
.nav-list .nav-group-analytics-data > .nav-group-title,
.nav-list .nav-group-active > .nav-group-title,
.nav-list .nav-group > .nav-group-title:hover,
.nav-list .nav-group > .nav-group-title:focus-visible {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    #10151a;
  color: #d6dbe1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  padding: 0 12px;
  text-align: left;
  text-transform: uppercase;
}

.nav-list .nav-group > .nav-group-title::after,
.nav-list .nav-group-marketing > .nav-group-title::after,
.nav-list .nav-group-analytics-data > .nav-group-title::after {
  flex: 0 0 auto;
  color: #8f98a7;
  float: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.workspace {
  min-height: 100vh;
  padding: 22px 26px 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    #050607;
}

.compact-page-header .workspace {
  padding-top: 18px;
}

.topbar {
  min-height: 46px;
  margin-bottom: 18px;
}

.topbar h2,
.section-title h1,
.crumb-current {
  color: #f5f6f8;
}

.topbar h2 {
  font-size: 22px;
}

.eyebrow,
.field label,
.store-header span,
.section-title span,
.mobile-report-title span,
.mobile-report-details dt {
  color: var(--muted);
}

.dashboard-band {
  margin-bottom: 16px;
}

.compact-page-header .dashboard-band {
  margin-bottom: 12px;
}

.page-title-row {
  align-items: center;
}

.compact-page-header #view-title {
  min-height: 30px;
}

.crumb-section,
.store-chip {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #b6bec8;
}

.crumb-arrow {
  color: #626b76;
}

.crumb-current {
  font-size: 24px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.compact-page-header .metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
}

.metric-card,
.module-board,
.table-section,
.owner-panel,
.settings-panel,
.stock-warehouse-panel,
.article-workbench,
.mobile-report-card,
.task-detail-panel,
.task-change-log article,
.task-detail-summary article,
.campaign-detail-kpis article,
.promo-filter-group,
.promotion-period-board,
.columns-dialog,
.attribute-dialog,
.cell-editor,
.sync-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.metric-card {
  min-height: 116px;
  padding: 18px 20px;
}

.compact-page-header .metric-card {
  min-height: 84px;
  padding: 12px 16px;
}

.metric-card span {
  color: #a2abb5;
  font-size: 12px;
}

.metric-card strong {
  color: #f8f9fb;
  margin: 8px 0;
  font-size: 31px;
  font-weight: 800;
}

.compact-page-header .metric-card strong {
  margin: 4px 0;
  font-size: 25px;
}

.metric-card.warning {
  border-color: rgba(240, 165, 43, 0.28);
  background:
    linear-gradient(180deg, rgba(240, 165, 43, 0.08), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.metric-card.critical {
  border-color: rgba(238, 38, 50, 0.35);
  background:
    linear-gradient(180deg, rgba(238, 38, 50, 0.11), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.metric-card.clickable:hover,
.metric-card.clickable:focus-visible {
  border-color: rgba(238, 38, 50, 0.64);
  box-shadow: 0 24px 70px rgba(238, 38, 50, 0.12);
}

.module-board,
.table-section {
  padding: 16px;
}

.table-section {
  max-height: calc(100vh - 286px);
}

.compact-page-header .table-section {
  max-height: calc(100vh - 252px);
}

.table-section > .section-title {
  margin: -16px -16px 0;
  padding: 14px 16px 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    #0e1216;
}

.section-title.compact h2 {
  color: #f2f4f6;
  font-size: 17px;
}

.tool-strip {
  gap: 8px;
  margin-bottom: 12px;
}

.primary-action,
.secondary-action,
.ghost-button,
.tool-strip button,
.mode-chip,
.segmented-control button,
.table-caption-actions button,
.campaign-dialog-actions button,
.promotion-period-quick button,
.promotion-period-board > button,
.stock-warehouse-actions .ghost-button,
.stock-warehouse-toolbar .ghost-button,
.tasks-period-row button,
.task-status-pill,
.campaign-favorite-toggle,
.campaign-primary-toggle {
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    #11161b;
  color: #d6dce3;
  box-shadow: none;
}

.primary-action,
.secondary-action,
.segmented-control button.active,
.ghost-button.active,
.mode-chip.selected,
.tool-strip button:hover,
.ghost-button:hover,
.table-caption-actions button:hover,
.tasks-status-line .mode-chip.selected {
  border-color: rgba(238, 38, 50, 0.68);
  background:
    linear-gradient(180deg, rgba(238, 38, 50, 0.52), rgba(127, 18, 27, 0.78)),
    #1a0e12;
  color: #fff;
}

.campaign-select-visible,
.campaign-favorite-toggle,
.campaign-primary-toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  font-size: 0;
}

.campaign-favorite-toggle,
.campaign-primary-toggle {
  width: 30px;
  height: 30px;
  min-height: 30px;
}

.campaign-favorite-toggle.active,
.campaign-favorite-toggle:hover {
  border-color: rgba(245, 158, 11, 0.72);
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.16), rgba(255, 255, 255, 0.02)),
    #11161b;
}

.campaign-primary-toggle.active,
.campaign-primary-toggle:hover {
  border-color: rgba(142, 152, 165, 0.72);
  background:
    linear-gradient(180deg, rgba(142, 152, 165, 0.15), rgba(255, 255, 255, 0.02)),
    #11161b;
}

.campaign-select-visible::before,
.campaign-favorite-toggle::before,
.campaign-primary-toggle::before {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  line-height: 1;
}

.campaign-select-visible::before {
  content: "\2610";
  color: #d6dce3;
  font-size: 14px;
}

.campaign-favorite-toggle::before {
  content: "\2606";
  color: #8f98a3;
  font-size: 20px;
}

.campaign-favorite-toggle.active::before,
.campaign-favorite-toggle:hover::before {
  content: "\2605";
  color: #f5b942;
}

.campaign-primary-toggle::before {
  content: "+";
  color: #8f98a3;
  font-size: 18px;
}

.campaign-primary-toggle.active::before,
.campaign-primary-toggle:hover::before {
  content: "\2713";
  color: #d6dce3;
}

.secondary-action.danger,
.task-row-cell.status-deleted,
.task-status-pill.status-deleted {
  border-color: rgba(238, 38, 50, 0.25);
  color: #b8bec6;
}

button:disabled,
.tool-strip button:disabled {
  opacity: 0.45;
}

input,
select,
textarea,
.field input,
.tasks-period-row input,
.stock-period-field input,
.article-search input,
.settings-field input,
.settings-field textarea,
.attribute-field input,
.attribute-field select,
.attribute-field textarea,
.task-edit-row input,
.task-edit-row select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0a0d10;
  color: #f3f5f7;
  color-scheme: dark;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #8a94a0;
  opacity: 0.78;
}

input:focus,
select:focus,
textarea:focus,
.field input:focus {
  border-color: rgba(238, 38, 50, 0.72);
  box-shadow: 0 0 0 3px rgba(238, 38, 50, 0.12);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.72);
}

input:disabled,
select:disabled,
textarea:disabled {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(244, 245, 247, 0.48);
}

.preview-table input,
.preview-table select,
.preview-table textarea,
.task-table-grid input,
.task-table-grid select,
.task-table-grid textarea,
.price-input,
.price-date-field input,
.filter-popover input[type="search"],
.stock-warehouse-picker-tools input,
.columns-toolbar select,
.columns-toolbar input {
  border-color: var(--line);
  background: #080b0f;
  color: #f3f5f7;
  color-scheme: dark;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.preview-table input:focus,
.preview-table select:focus,
.preview-table textarea:focus,
.price-input:focus,
.price-date-field input:focus,
.filter-popover input[type="search"]:focus,
.stock-warehouse-picker-tools input:focus,
.columns-toolbar select:focus,
.columns-toolbar input:focus {
  border-color: rgba(238, 38, 50, 0.72);
  box-shadow: 0 0 0 3px rgba(238, 38, 50, 0.12);
}

.segmented-control {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0a0d10;
  overflow: hidden;
}

.segmented-control button {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.preview-table,
.task-table-grid,
.task-items-grid {
  border-color: var(--line);
  background: #0a0d10;
}

.preview-table > div,
.task-table-grid > div,
.task-items-grid > div,
.task-row-cell {
  border-color: var(--line);
  background: #0f1318;
  color: #dbe0e6;
}

.preview-cell,
.task-row-cell {
  font-size: 12px;
}

.preview-head,
.task-table-grid .preview-head,
.task-items-grid .preview-head {
  --preview-head-bg: #151a20;
  background: #151a20;
  color: #aeb6c0;
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

.preview-table:not(.mobile-card-table) > .preview-head {
  box-shadow:
    0 -1px 0 #151a20,
    0 1px 0 var(--line),
    0 8px 0 #151a20;
}

.preview-table:not(.mobile-card-table) > .preview-head.product-head.filtered {
  box-shadow:
    inset 0 -3px 0 var(--accent),
    0 -1px 0 #151a20,
    0 1px 0 var(--line),
    0 8px 0 #151a20;
}

.preview-table > div:hover,
.task-row-cell:hover {
  background: #171d23;
}

.task-row-cell.selected,
.selected-row,
.preview-cell.selected {
  background: rgba(238, 38, 50, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(238, 38, 50, 0.55);
}

.task-row-cell.status-done,
.task-status-pill.status-done {
  border-color: rgba(38, 194, 129, 0.32);
  background: rgba(38, 194, 129, 0.10);
}

.task-row-cell.status-started,
.task-status-pill.status-started {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.preview-table.task-page {
  display: grid;
  gap: 16px;
  overflow: visible;
}

.task-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0d10;
}

.task-table-wrap .task-table-grid {
  display: table;
  min-width: 100%;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #0a0d10;
}

.task-table-wrap .task-table-grid th,
.task-table-wrap .task-table-grid td {
  display: table-cell;
  min-height: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 9px 10px;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.task-table-wrap .task-table-grid th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 38px;
  background: #151a20;
  color: #aeb6c0;
  font-size: 11px;
  font-weight: 800;
}

.task-table-wrap .task-table-grid td {
  height: 42px;
  background: #0f1318;
  color: #dbe0e6;
  font-size: 12px;
}

.task-table-wrap .task-table-grid tr[data-task-id] {
  cursor: pointer;
}

.task-table-wrap .task-table-grid tr[data-task-id]:hover td {
  background: #171d23;
}

.task-table-wrap .task-table-grid tr.selected td,
.task-table-wrap .task-table-grid td.selected {
  background: rgba(238, 38, 50, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(238, 38, 50, 0.55);
}

.task-table-wrap .task-table-grid tr.status-done td {
  background: rgba(38, 194, 129, 0.08);
}

.task-table-wrap .task-table-grid tr.status-started td {
  background: rgba(255, 255, 255, 0.035);
}

.task-table-wrap .task-table-grid .column-title-button {
  width: calc(100% - 34px);
  min-height: 20px;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: hidden;
  padding: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-table-wrap .task-table-grid .column-filter-button {
  position: absolute;
  right: 22px;
  top: 8px;
  width: 20px;
  min-height: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 10px;
  padding: 0;
}

.task-table-wrap .task-table-grid .column-resizer {
  position: absolute;
  inset: 0 0 0 auto;
  width: 8px;
  cursor: col-resize;
}

.task-table-wrap .task-empty-row {
  display: table-cell;
  height: 52px;
  padding: 14px;
  color: var(--muted);
  background: #0f1318;
}

.product-thumb,
.mobile-report-card-head img,
.mobile-report-thumb,
.task-thumb {
  border-color: var(--line);
  background: #080a0d;
  box-shadow: none;
}

.columns-overlay,
.attribute-overlay,
.sync-overlay {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.columns-dialog,
.attribute-dialog,
.cell-editor,
.sync-dialog {
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.62);
}

.columns-head,
.store-header,
.section-title,
.topbar,
.topbar-actions {
  color: var(--ink);
}

.columns-item,
.columns-zone,
.columns-library-group,
.columns-visible-list,
.columns-library-grid,
.delete-note,
.empty-state,
.login-status,
.stock-warehouse-list,
.stock-warehouse-dialog-list,
.settings-users-list {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
}

.stock-warehouse-dialog-list {
  scrollbar-color: rgba(244, 245, 247, 0.34) rgba(255, 255, 255, 0.035);
}

.stock-warehouse-dialog-list::-webkit-scrollbar {
  width: 10px;
}

.stock-warehouse-dialog-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 999px;
}

.stock-warehouse-dialog-list::-webkit-scrollbar-thumb {
  border: 2px solid #11161b;
  border-radius: 999px;
  background: rgba(244, 245, 247, 0.36);
}

.stock-warehouse-chip {
  border-color: rgba(255, 255, 255, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    #10151a;
  color: #e4e9ee;
}

.stock-warehouse-chip:hover {
  border-color: rgba(238, 38, 50, 0.46);
  background: rgba(238, 38, 50, 0.09);
}

.stock-warehouse-chip.muted {
  background: rgba(255, 255, 255, 0.018);
  color: #8b95a1;
  opacity: 0.88;
}

.stock-warehouse-chip em {
  background: rgba(255, 255, 255, 0.055);
  color: #dce3ea;
}

.stock-warehouse-chip.muted em {
  color: #9ba5b0;
}

.stock-warehouse-select-empty,
.mobile-report-empty,
.task-empty-row,
.detail-empty,
.filter-empty,
.columns-empty,
.merge-empty {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    #0b0f13 !important;
  color: #9aa4af;
}

.stock-warehouse-select-empty strong {
  color: #f3f5f7;
}

.stock-warehouse-select-empty span {
  color: #9aa4af;
}

.stock-warehouse-select-empty button {
  border-color: rgba(238, 38, 50, 0.70);
  background: rgba(238, 38, 50, 0.11);
  color: #ff6a72;
}

.attribute-dialog button:not(.campaign-status-switch):not(.campaign-select-visible):not(.campaign-favorite-toggle):not(.campaign-primary-toggle),
.columns-dialog button,
.cell-editor button,
.filter-popover button,
.merge-metrics-dialog button,
.merge-settings-dialog button,
.merge-highlight-dialog button,
.merge-product-detail-dialog button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    #11161b;
  color: #d6dce3;
  box-shadow: none;
}

.attribute-dialog button:not(.campaign-status-switch):not(.campaign-select-visible):not(.campaign-favorite-toggle):not(.campaign-primary-toggle):hover,
.columns-dialog button:hover,
.cell-editor button:hover,
.filter-popover button:hover,
.merge-metrics-dialog button:hover,
.merge-settings-dialog button:hover,
.merge-highlight-dialog button:hover,
.merge-product-detail-dialog button:hover {
  border-color: rgba(238, 38, 50, 0.55);
  background:
    linear-gradient(180deg, rgba(238, 38, 50, 0.22), rgba(255, 255, 255, 0.02)),
    #151018;
  color: #fff;
}

.attribute-dialog button.primary,
.attribute-dialog .primary,
.attribute-dialog button.secondary-action,
.attribute-dialog .secondary-action,
.columns-dialog button.secondary-action,
.cell-editor button.secondary-action,
.filter-popover button.secondary-action,
.merge-metrics-dialog button.primary,
.merge-settings-dialog button.primary,
.merge-highlight-dialog button.primary {
  border-color: rgba(238, 38, 50, 0.68);
  background:
    linear-gradient(180deg, rgba(238, 38, 50, 0.52), rgba(127, 18, 27, 0.78)),
    #1a0e12;
  color: #fff;
}

.attribute-dialog button.secondary,
.attribute-dialog .ghost-button,
.columns-dialog .ghost-button,
.cell-editor .ghost-button,
.filter-popover .ghost-button,
.merge-metrics-dialog [data-merge-metrics-close],
.merge-settings-dialog [data-merge-settings-close],
.merge-highlight-dialog [data-merge-highlight-close],
.merge-product-detail-dialog [data-merge-product-detail-close] {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014)),
    #11161b;
  color: #d6dce3;
}

.attribute-dialog button:disabled,
.attribute-dialog button.disabled,
.columns-dialog button:disabled,
.columns-dialog button.disabled,
.cell-editor button:disabled,
.filter-popover button:disabled,
.merge-metrics-dialog button:disabled,
.merge-settings-dialog button:disabled,
.merge-highlight-dialog button:disabled {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(244, 245, 247, 0.44);
  cursor: not-allowed;
  opacity: 1;
}

.preview-table.article-cards-page {
  display: block;
  overflow: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.preview-table.article-cards-page.article-cards-page-bulk {
  overflow-x: auto;
  overflow-y: visible;
}

.article-cards-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
}

.article-cards-shell.article-cards-shell-bulk {
  grid-template-columns: minmax(0, 1fr);
}

.article-cards-shell.article-cards-shell-resizable {
  gap: 0;
  align-items: stretch;
}

.article-create-flow-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.article-create-flow-tabs button {
  border: 1px solid var(--line);
  background: #11181f;
  color: #c7d0d8;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
}

.article-create-flow-tabs button.active {
  border-color: rgba(238, 38, 50, 0.55);
  color: #ffffff;
  background: rgba(238, 38, 50, 0.12);
}

.article-create-standalone {
  padding: 16px;
}

.article-cards-list,
.article-cards-form,
.article-seo-dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.014)),
    #0f1419;
  box-shadow: var(--shadow);
}

.article-cards-list,
.article-cards-form {
  padding: 16px;
}

.article-cards-form.article-cards-form-bulk {
  min-width: 0;
  width: 100%;
}

.article-cards-shell-resizable .article-cards-list {
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.article-cards-shell-resizable .article-cards-form {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.article-cards-splitter {
  position: relative;
  cursor: col-resize;
  background: rgba(255, 255, 255, 0.04);
}

.article-cards-splitter::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4px;
  height: 82px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.article-cards-panel-head,
.article-seo-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.article-cards-panel-head strong,
.article-seo-head h2 {
  display: block;
  color: #f4f6f8;
}

.article-cards-panel-head span,
.article-seo-head .eyebrow,
.article-cards-form span,
.article-cards-list span {
  color: var(--muted);
}

.article-cards-panel-head input {
  width: min(320px, 100%);
}

.article-card-list-table {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.article-source-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #10161c;
  color: #dce2e8;
  padding: 10px;
  text-align: left;
}

.article-source-row.selected,
.article-source-row:hover {
  border-color: rgba(238, 38, 50, 0.55);
  background: rgba(238, 38, 50, 0.08);
}

.article-source-row img,
.article-source-empty {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #080b0f;
}

.article-source-empty {
  display: grid;
  place-items: center;
  color: #7f8a97;
  font-weight: 700;
}

.article-source-row strong,
.article-source-row em,
.article-source-row small,
.article-source-row span {
  display: block;
}

.article-source-row em {
  color: #f4f6f8;
  font-style: normal;
  margin-top: 4px;
}

.article-source-row small {
  color: #97a1ac;
  margin-top: 3px;
}

.article-source-row u {
  color: #ff7d83;
  text-decoration: none;
  font-weight: 700;
}

.article-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.article-cards-grid label {
  display: grid;
  gap: 6px;
}

.article-cards-grid label.wide {
  grid-column: 1 / -1;
}

.article-create-builder {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.article-create-media,
.article-create-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.article-photo-dropzone {
  position: relative;
  display: grid;
  min-height: 172px;
  place-items: center;
  gap: 6px;
  width: 100%;
  border: 1px dashed rgba(36, 153, 183, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(36, 153, 183, 0.14), rgba(14, 111, 146, 0.06) 48%, rgba(255, 255, 255, 0.018)),
    #0a0e12;
  color: #f5f7fa;
  cursor: pointer;
  text-align: center;
  padding: 18px;
}

.article-photo-dropzone:hover,
.article-photo-dropzone.dragover,
.article-photo-dropzone.uploading {
  border-color: rgba(76, 200, 214, 0.95);
  box-shadow: 0 0 0 3px rgba(36, 153, 183, 0.18);
}

.article-photo-dropzone.uploading {
  cursor: wait;
  opacity: 0.82;
}

.article-photo-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.article-photo-dropzone strong {
  font-size: 18px;
}

.article-photo-dropzone small,
.article-photo-dropzone span {
  color: var(--muted);
}

.article-photos-raw,
.article-json-raw {
  position: fixed;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.article-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.article-photo-grid article {
  position: relative;
  aspect-ratio: 3 / 4;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080b0f;
}

.article-photo-grid article.main-photo {
  border-color: rgba(245, 180, 49, 0.62);
  box-shadow: inset 0 0 0 1px rgba(245, 180, 49, 0.45);
}

.article-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-photo-grid button,
.article-size-row > button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(8, 11, 15, 0.78);
  color: #fff;
  cursor: pointer;
}

.article-photo-grid article.local-only {
  border-color: rgba(245, 180, 49, 0.38);
}

.article-photo-flags {
  position: absolute;
  left: 6px;
  top: 6px;
  right: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.article-photo-badge {
  border-radius: 999px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.article-photo-badge.main {
  background: rgba(245, 180, 49, 0.92);
  color: #120f05;
}

.article-photo-badge.local {
  background: rgba(36, 153, 183, 0.90);
  color: #f4fcff;
}

.article-photo-main-button {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  border: 1px solid rgba(245, 180, 49, 0.34);
  border-radius: 999px;
  background: rgba(245, 180, 49, 0.92);
  color: #161106;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.article-photo-main-button:hover {
  background: rgba(255, 198, 92, 0.96);
}

.article-photo-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.article-source-mini,
.article-create-section,
.article-create-readiness {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    #0d1217;
}

.article-source-mini {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-color: rgba(36, 153, 183, 0.18);
  background:
    linear-gradient(180deg, rgba(36, 153, 183, 0.06), rgba(255, 255, 255, 0.012)),
    #0d1217;
}

.article-source-mini small {
  color: var(--muted);
}

.article-source-mini .ghost-button {
  margin-top: 8px;
  width: 100%;
}

.article-create-section {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.article-create-section.hero {
  border-color: rgba(36, 153, 183, 0.34);
  background:
    linear-gradient(180deg, rgba(36, 153, 183, 0.10), rgba(255, 255, 255, 0.012)),
    #0d1217;
}

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

.article-create-section-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.article-create-section-head span {
  color: var(--muted);
}

.article-create-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.article-create-fields.dimensions {
  grid-template-columns: repeat(4, minmax(110px, 1fr));
}

.article-create-field {
  display: grid;
  gap: 6px;
}

.article-create-field span,
.article-size-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-create-field input,
.article-create-field textarea,
.article-size-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #070a0d;
  color: var(--ink);
  padding: 9px 10px;
  outline: none;
}

.article-create-field textarea {
  resize: vertical;
}

.article-create-field input:focus,
.article-create-field textarea:focus,
.article-size-row input:focus {
  border-color: rgba(36, 153, 183, 0.70);
  box-shadow: 0 0 0 3px rgba(36, 153, 183, 0.16);
}

.article-create-field.priority input {
  border-color: rgba(36, 153, 183, 0.46);
  background:
    linear-gradient(180deg, rgba(36, 153, 183, 0.09), rgba(255, 255, 255, 0.012)),
    #080b0f;
}

.article-create-status {
  border: 1px solid rgba(245, 180, 49, 0.35);
  border-radius: 999px;
  padding: 7px 10px;
  color: #f5c768;
  background: rgba(245, 180, 49, 0.08);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.article-create-status.green {
  border-color: rgba(38, 194, 129, 0.45);
  color: #7ce0b1;
  background: rgba(38, 194, 129, 0.12);
}

.article-create-status.red {
  border-color: rgba(36, 153, 183, 0.42);
  color: #8ad8ea;
  background: rgba(36, 153, 183, 0.11);
}

.article-create-mode-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(36, 153, 183, 0.22);
  border-radius: 10px;
  background: rgba(36, 153, 183, 0.06);
  padding: 12px;
}

.article-create-mode-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #2499b7;
}

.article-create-mode-toggle span {
  display: grid;
  gap: 4px;
}

.article-create-mode-toggle strong {
  color: #e6f7fb;
  font-size: 13px;
}

.article-create-mode-toggle small {
  color: #8ea4b1;
  line-height: 1.35;
}

.article-create-mode-toggle.disabled {
  border-color: rgba(255, 255, 255, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    #14181d;
  opacity: 0.72;
}

.article-create-mode-toggle.disabled strong {
  color: #b7c0c8;
}

.article-create-mode-toggle.disabled small {
  color: #83909c;
}

.article-create-mode-toggle.disabled input {
  accent-color: #5d6873;
  cursor: not-allowed;
}

.article-size-editor {
  display: grid;
  gap: 8px;
}

.article-size-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 130px 88px 34px;
  gap: 8px;
  align-items: end;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.article-size-row > button {
  position: static;
  align-self: end;
  background: rgba(238, 38, 50, 0.10);
}

.article-characteristics-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.article-characteristics-note {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 9px 10px;
}

.article-characteristics-note strong {
  color: #f4f6f8;
  font-size: 12px;
}

.article-characteristics-note span {
  color: var(--muted);
  font-size: 12px;
}

.article-characteristic-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1.2fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    #0a0e12;
}

.article-characteristic-row.required {
  border-color: rgba(245, 180, 49, 0.34);
}

.article-characteristic-row.status-filled {
  border-color: rgba(79, 181, 128, 0.34);
  background:
    linear-gradient(180deg, rgba(79, 181, 128, 0.10), rgba(255, 255, 255, 0.012)),
    #0a0e12;
}

.article-characteristic-row.status-partial,
.article-characteristic-row.status-recommended {
  border-color: rgba(229, 184, 92, 0.32);
  background:
    linear-gradient(180deg, rgba(229, 184, 92, 0.09), rgba(255, 255, 255, 0.012)),
    #0a0e12;
}

.article-characteristic-row.status-critical {
  border-color: rgba(226, 142, 176, 0.38);
  background:
    linear-gradient(180deg, rgba(226, 142, 176, 0.10), rgba(255, 255, 255, 0.012)),
    #0a0e12;
}

.article-characteristic-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.article-characteristic-row strong {
  overflow: hidden;
  color: #e9eef4;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-characteristic-row small {
  color: #74808c;
  font-size: 10px;
}

.article-characteristic-row input[data-characteristic-value] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #06090c;
  color: var(--ink);
  padding: 9px 10px;
  outline: none;
}

.article-characteristic-row.status-filled input[data-characteristic-value],
.article-characteristic-row.status-filled .article-characteristic-tags,
.article-characteristic-row.status-filled .article-characteristic-check {
  border-color: rgba(79, 181, 128, 0.38);
  background: rgba(79, 181, 128, 0.08);
}

.article-characteristic-row.status-partial input[data-characteristic-value],
.article-characteristic-row.status-partial .article-characteristic-tags,
.article-characteristic-row.status-partial .article-characteristic-check {
  border-color: rgba(229, 184, 92, 0.34);
  background: rgba(229, 184, 92, 0.07);
}

.article-characteristic-row.status-critical input[data-characteristic-value],
.article-characteristic-row.status-critical .article-characteristic-tags,
.article-characteristic-row.status-critical .article-characteristic-check {
  border-color: rgba(226, 142, 176, 0.40);
  background: rgba(226, 142, 176, 0.08);
}

.article-characteristic-row input:focus,
.article-characteristic-tags:focus-within {
  border-color: rgba(74, 164, 223, 0.64);
  box-shadow: 0 0 0 3px rgba(74, 164, 223, 0.14);
}

.article-characteristic-tags {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #06090c;
  padding: 7px;
}

.article-characteristic-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
  min-width: 0;
}

.article-characteristic-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
}

.article-characteristic-chip-value {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px 0 0 4px;
  background: rgba(255, 255, 255, 0.055);
  color: #f4f6f8;
  padding: 4px 9px;
  font-size: 12px;
  cursor: pointer;
}

.article-characteristic-chip-value:hover {
  border-color: rgba(36, 153, 183, 0.46);
  background: rgba(36, 153, 183, 0.12);
}

.article-characteristic-chip-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-characteristic-chip-list b {
  color: #ff7d83;
  font-size: 13px;
  line-height: 1;
}

.article-characteristic-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: rgba(255, 255, 255, 0.055);
  color: #aeb9c3;
  padding: 0;
  cursor: pointer;
}

.article-characteristic-chip-remove:hover {
  border-color: rgba(214, 115, 75, 0.44);
  background: rgba(214, 115, 75, 0.14);
  color: #ffd4c6;
}

.article-characteristic-chip-remove svg {
  width: 13px;
  height: 13px;
  display: block;
}

.article-template-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.article-template-toolbar select {
  min-width: min(320px, 100%);
  flex: 1 1 260px;
}

.article-edit-inspector,
.article-edit-section,
.article-edit-field,
.article-edit-summary,
.article-edit-before-after,
.article-edit-size-grid,
.article-edit-picker-list {
  display: grid;
  gap: 12px;
}

.article-edit-inspector {
  align-content: start;
}

.article-edit-section {
  margin-top: 4px;
}

.article-edit-field {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
}

.article-edit-field.unlocked {
  border-color: rgba(36, 153, 183, 0.42);
  box-shadow: inset 0 0 0 1px rgba(36, 153, 183, 0.18);
}

.article-edit-field.changed {
  border-color: rgba(73, 174, 124, 0.34);
  background: rgba(73, 174, 124, 0.04);
}

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

.article-edit-field-head strong {
  color: #f3f6f9;
}

.article-edit-field-head span {
  color: #8c9cab;
  font-size: 12px;
}

.article-edit-field-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.article-edit-readonly-tag {
  color: #8c9cab;
  font-size: 12px;
}

.article-edit-field-body {
  display: grid;
  gap: 10px;
}

.article-edit-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.article-edit-preview-block {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
  padding: 10px 12px;
  color: #d8e0e7;
}

.article-edit-preview-block strong {
  color: #f3f6f9;
}

.article-edit-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-edit-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(36, 153, 183, 0.26);
  border-radius: 999px;
  background: rgba(36, 153, 183, 0.08);
  color: #d7edf4;
  padding: 4px 10px;
  font-size: 12px;
}

.article-edit-empty,
.article-edit-hint {
  color: #8c9cab;
  font-size: 12px;
}

.article-edit-loading-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(105, 196, 255, 0.22);
  background: rgba(18, 59, 84, 0.28);
  color: #9ccae6;
  font-size: 12px;
}

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

.article-edit-summary-cards {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(220px, 1fr);
  gap: 12px;
  align-items: start;
}

.article-edit-size-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.article-edit-size-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.article-edit-size-card strong {
  color: #f3f6f9;
}

.article-edit-size-card span {
  color: #a5b2bf;
  font-size: 12px;
  line-height: 1.45;
}

.article-edit-table-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: #97a8b8;
  font-size: 12px;
}

.article-bulk-fill-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) auto minmax(240px, 1fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(80, 121, 145, 0.24);
  border-radius: 8px;
  background: rgba(11, 18, 24, 0.72);
}

.article-bulk-fill-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.article-bulk-fill-toolbar label span {
  color: #8fa3b6;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-bulk-fill-toolbar small {
  color: #8fa3b6;
  line-height: 1.35;
}

.article-bulk-fill-toolbar small.warning {
  color: #ffc45f;
}

.article-bulk-cache-dialog {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  width: min(520px, calc(100vw - 40px));
  padding: 18px;
}

.article-bulk-cache-dialog strong {
  display: block;
  color: #f4f7fb;
  font-size: 16px;
  margin-bottom: 4px;
}

.article-bulk-cache-dialog small {
  color: #93a6b8;
}

.stock-warehouse-load-dialog {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  width: min(560px, calc(100vw - 40px));
  padding: 18px;
}

.stock-warehouse-load-dialog strong {
  display: block;
  color: #f4f7fb;
  font-size: 16px;
  margin-bottom: 4px;
}

.stock-warehouse-load-dialog small {
  color: #93a6b8;
  line-height: 1.4;
}

.stock-warehouse-load-actions {
  margin-top: 12px;
}

.article-edit-grid-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 0 10px;
  padding-bottom: 2px;
}

.article-edit-grid-scroll-bottom {
  position: sticky;
  bottom: 8px;
  z-index: 6;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 10px 0 0;
  padding-top: 2px;
  background: linear-gradient(180deg, rgba(15, 20, 25, 0), rgba(15, 20, 25, 0.96) 45%);
}

.article-edit-grid-scroll-width {
  height: 1px;
}

.article-edit-grid-wrap,
.article-edit-review-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a1015;
}

.article-edit-grid-wrap.article-edit-grid-wrap-bulk {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  scrollbar-width: none;
}

.article-edit-grid-wrap.article-edit-grid-wrap-bulk::-webkit-scrollbar {
  height: 0;
}

.article-edit-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.article-edit-grid th,
.article-edit-grid td {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.article-edit-grid th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 28px 10px 12px;
  background: #121a22;
  color: #eef4f8;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}

.article-edit-grid th span {
  display: block;
}

.article-edit-column-hide {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #8191a1;
  font-size: 14px;
}

.article-edit-grid-cell {
  min-width: 120px;
  padding: 6px;
  background: #10161d;
}

.article-edit-grid-cell.readonly {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.012) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.012) 50%, rgba(255, 255, 255, 0.012) 75%, transparent 75%, transparent 100%),
    #131920;
  background-size: 14px 14px;
  opacity: 0.85;
}

.article-edit-grid-cell.editable {
  background: rgba(67, 154, 107, 0.14);
}

.article-edit-grid-cell.editable.changed {
  background: rgba(37, 122, 79, 0.32);
  box-shadow: inset 0 0 0 1px rgba(119, 223, 164, 0.16);
}

.article-edit-grid-cell input,
.article-edit-grid-cell textarea {
  width: 100%;
  border: 1px solid rgba(132, 216, 163, 0.22);
  border-radius: 8px;
  background: rgba(9, 18, 13, 0.66);
  color: #eff9f1;
  padding: 8px 10px;
  resize: vertical;
}

.article-edit-grid-readonly {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: #b8c5d0;
  white-space: pre-wrap;
  user-select: text;
}

.article-edit-grid-photo,
.article-edit-grid-photo-empty {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #070b0f;
  object-fit: cover;
}

.article-edit-grid-photo-empty {
  display: grid;
  place-items: center;
  color: #7d8b98;
  font-weight: 700;
}

.article-edit-columns-popover {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 7, 10, 0.48);
}

.article-edit-columns-card {
  position: absolute;
  top: 120px;
  right: 40px;
  width: min(420px, calc(100vw - 80px));
  max-height: calc(100vh - 160px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #11181f;
  box-shadow: var(--shadow);
}

.article-edit-columns-card.wb-like {
  top: 72px;
  right: 20px;
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 96px);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.article-edit-columns-toolbar {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.article-edit-columns-toolbar strong {
  display: block;
  color: #f3f7fa;
}

.article-edit-columns-toolbar span {
  display: block;
  margin-top: 4px;
  color: #98a8b5;
  line-height: 1.45;
}

.article-edit-columns-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  gap: 8px;
}

.article-edit-columns-search {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #0a1015;
  color: #eef5f8;
  padding: 10px 12px;
}

.article-edit-columns-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #8fa1af;
  font-size: 12px;
}

.article-edit-columns-sections {
  display: grid;
  gap: 14px;
  overflow: auto;
}

.article-edit-columns-section {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.article-edit-columns-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.article-edit-columns-section-head strong {
  color: #eef5f8;
}

.article-edit-columns-section-head span {
  color: #89a2b3;
  font-size: 12px;
}

.article-edit-columns-list {
  display: grid;
  gap: 10px;
}

.article-edit-columns-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #d6e0e7;
  padding: 6px 0;
}

.article-edit-columns-item span {
  display: grid;
  gap: 3px;
}

.article-edit-columns-item strong {
  color: #edf4f8;
  font-size: 13px;
  font-weight: 600;
}

.article-edit-columns-item small {
  color: #8ea1af;
  font-size: 11px;
}

.article-edit-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 24px;
  background: rgba(3, 6, 8, 0.76);
}

.article-edit-review-dialog {
  width: 100%;
  height: calc(100vh - 48px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: #0d1318;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.article-edit-grid-review td {
  min-height: 72px;
}

.article-edit-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 10, 0.66);
}

.article-edit-picker-dialog {
  width: min(720px, calc(100vw - 48px));
  max-height: min(70vh, 760px);
  display: grid;
  gap: 12px;
}

.article-edit-picker-list {
  max-height: 54vh;
  overflow: auto;
}

.article-edit-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.018);
}

.article-edit-picker-row span {
  color: #d8e0e7;
  line-height: 1.45;
  word-break: break-word;
}

.article-value-menu {
  position: fixed;
  z-index: 120;
  display: grid;
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #10161c;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.article-field-settings-note {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.article-field-settings-note strong {
  color: #f0f4f8;
}

.article-field-settings-note span {
  color: var(--muted);
}

.article-field-settings-list {
  display: grid;
  gap: 10px;
  max-height: 60vh;
  overflow: auto;
}

.article-field-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.article-field-settings-row span {
  display: grid;
  gap: 4px;
}

.article-field-settings-row strong {
  color: #eef3f7;
}

.article-field-settings-row small {
  color: var(--muted);
}

.article-value-menu button {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.article-value-menu button:last-child {
  border-bottom: 0;
}

.article-value-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.article-characteristic-tags input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 3px 2px;
  outline: none;
}

.article-characteristic-tags small {
  color: #8f98a3;
  font-size: 11px;
  white-space: nowrap;
}

.article-characteristic-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #06090c;
  padding: 7px 10px;
}

.article-characteristic-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.article-characteristic-check em {
  color: #dbe0e6;
  font-style: normal;
  font-weight: 800;
}

.article-characteristics-empty {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
}

.article-create-readiness {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.article-create-readiness strong {
  color: var(--ink);
}

.article-create-footer-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 0;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(15, 20, 25, 0), #0f1419 42%);
}

.article-cards-actions,
.article-seo-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.article-cards-actions.compact {
  margin-top: 0;
}

.article-cards-actions span {
  color: var(--muted);
}

.article-cards-drafts {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.article-cards-draft-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.article-draft-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.article-draft-card > button:first-child {
  min-width: 0;
  width: 100%;
  text-align: left;
  padding: 10px;
}

.article-draft-card > button:first-child strong,
.article-draft-card > button:first-child span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-draft-card.active > button:first-child {
  border-color: rgba(238, 38, 50, 0.68);
}

.article-draft-delete {
  border-color: rgba(238, 38, 50, 0.26);
  background: rgba(238, 38, 50, 0.08);
  color: #ffb8bd;
}

.article-ready-pill {
  border: 1px solid rgba(36, 153, 183, 0.34);
  border-radius: 999px;
  padding: 8px 12px;
  color: #8ad8ea;
  background: rgba(36, 153, 183, 0.10);
  font-size: 12px;
  font-weight: 700;
}

.article-ready-pill.ready {
  border-color: rgba(38, 194, 129, 0.45);
  color: #7ce0b1;
  background: rgba(38, 194, 129, 0.12);
}

.article-cards-empty {
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 26px;
  color: #99a3ae;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.article-seo-dialog {
  position: fixed;
  inset: 8px;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-width: none;
  max-height: none;
  padding: 18px;
  resize: both;
  overflow: auto;
}

.article-seo-workspace {
  max-width: none;
}

.article-seo-body {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: calc(100vh - 120px);
}

.article-seo-sidebar,
.article-seo-main,
.article-seo-detail,
.article-seo-generation-list,
.article-seo-keyword-groups {
  display: grid;
  gap: 12px;
}

.article-seo-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 100%;
}

.article-seo-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 14px;
  align-items: start;
}

.article-seo-detail-main,
.article-seo-detail-side,
.article-seo-mini-facts,
.article-seo-stat-grid {
  display: grid;
  gap: 12px;
}

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

.article-seo-mini-facts span,
.article-seo-selection-meta span,
.article-seo-keyword-summary span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.025);
  color: #d5dee7;
}

.article-seo-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-seo-stat-grid article {
  border: 1px solid rgba(36, 153, 183, 0.24);
  border-radius: 8px;
  padding: 12px;
  background: rgba(36, 153, 183, 0.08);
  display: grid;
  gap: 4px;
}

.article-seo-stat-grid strong {
  color: #eef7fb;
  font-size: 22px;
}

.article-seo-stat-grid span {
  color: var(--muted);
  font-size: 12px;
}

.article-seo-keyword-summary,
.article-seo-selection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.article-seo-card,
.article-seo-generation-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1015;
}

.article-seo-card {
  padding: 12px;
}

.article-seo-generation-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.article-seo-generation-item strong,
.article-seo-keyword-group strong {
  color: #eef3f7;
}

.article-seo-generation-item span,
.article-seo-toolbar span,
.article-seo-keyword-empty {
  color: var(--muted);
}

.article-seo-generation-item.active,
.article-seo-generation-item:hover {
  border-color: rgba(36, 153, 183, 0.62);
  background: rgba(36, 153, 183, 0.10);
}

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

.article-seo-photo-strip article {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #070b0f;
}

.article-seo-photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-seo-keyword-group {
  display: grid;
  gap: 10px;
}

.article-seo-keyword-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.article-seo-keyword-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(36, 153, 183, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(36, 153, 183, 0.08);
  color: #dbf4fb;
}

.article-seo-keyword-pill input {
  accent-color: #2499b7;
}

.article-seo-result {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.article-seo-result article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #0b1015;
}

.article-seo-result p,
.article-seo-result li {
  color: #d8dee5;
}

.article-seo-keywords {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.article-seo-keywords span {
  border: 1px solid rgba(238, 38, 50, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(238, 38, 50, 0.08);
  color: #ffd8da;
}

.article-seo-strengths {
  margin: 0;
  padding-left: 18px;
}

.article-seo-body {
  grid-template-columns: minmax(320px, 400px) minmax(740px, 1fr) minmax(360px, 460px);
}

.article-seo-center,
.article-seo-right,
.article-seo-right-grid {
  display: grid;
  gap: 12px;
  align-content: start;
}

.article-seo-summary-board {
  display: grid;
  gap: 12px;
}

.article-seo-stat-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-seo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-seo-table-card {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.article-seo-table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(5, 8, 11, 0.55);
}

.article-seo-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
}

.article-seo-table th,
.article-seo-table td {
  padding: 14px 12px;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  color: #d6dee6;
  font-size: 12px;
}

.article-seo-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111922;
  color: #8ea0b3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-seo-table tbody tr {
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.article-seo-table tbody tr:hover {
  background: rgba(36, 153, 183, 0.08);
}

.article-seo-table tbody tr.active {
  background: rgba(36, 153, 183, 0.14);
  box-shadow: inset 0 0 0 1px rgba(36, 153, 183, 0.38);
}

.article-seo-table tbody tr.archived {
  opacity: 0.75;
}

.article-seo-table-text {
  min-width: 320px;
  max-width: 520px;
  min-height: 152px;
  max-height: 164px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.article-seo-right {
  min-width: 0;
}

.article-seo-choice-preview,
.article-seo-choice-list {
  display: grid;
  gap: 10px;
}

.article-seo-choice-preview {
  grid-template-columns: 1fr;
}

.article-seo-choice-preview > div {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.article-seo-choice-preview strong,
.article-seo-choice-label {
  color: #e7edf3;
}

.article-seo-choice-preview span {
  color: #99a8b7;
  line-height: 1.45;
}

.article-seo-choice-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.article-seo-choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.article-seo-choice-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.article-seo-choice-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #99a8b7;
}

.article-seo-choice-check input {
  margin: 0;
}

.article-seo-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #dce7ef;
  font-size: 12px;
  text-transform: lowercase;
}

.article-seo-status-badge.source {
  border-color: rgba(113, 132, 152, 0.35);
  background: rgba(113, 132, 152, 0.12);
  color: #d7e1ea;
}

.article-seo-status-badge.in_work {
  border-color: rgba(226, 172, 70, 0.34);
  background: rgba(226, 172, 70, 0.12);
  color: #ffe2a1;
}

.article-seo-status-badge.success {
  border-color: rgba(73, 174, 124, 0.35);
  background: rgba(73, 174, 124, 0.12);
  color: #baf2cf;
}

.article-seo-status-badge.archived {
  border-color: rgba(149, 117, 205, 0.35);
  background: rgba(149, 117, 205, 0.12);
  color: #dcc8ff;
}

.article-seo-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  color: #8ea0b3;
}

.article-seo-flag.yes {
  border-color: rgba(73, 174, 124, 0.32);
  background: rgba(73, 174, 124, 0.1);
  color: #c6f7d8;
}

.article-seo-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-seo-seed-hint {
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.article-seo-context-menu {
  position: fixed;
  z-index: 50;
  min-width: 180px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d141c;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.article-seo-context-menu button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: #e6edf3;
  text-align: left;
  cursor: pointer;
}

.article-seo-context-menu button:hover {
  background: rgba(36, 153, 183, 0.12);
}

@media (max-width: 1100px) {
  .article-cards-shell,
  .article-seo-result,
  .article-seo-body,
  .article-seo-layout,
  .article-seo-detail-grid {
    grid-template-columns: 1fr;
  }

  .article-seo-dialog {
    position: static;
    inset: auto;
    resize: none;
  }

  .article-seo-stat-grid,
  .article-seo-mini-facts {
    grid-template-columns: 1fr;
  }

  .article-seo-table {
    min-width: 980px;
  }

  .article-create-builder {
    grid-template-columns: 1fr;
  }

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

  .article-create-fields,
  .article-create-fields.dimensions,
  .article-characteristics-editor,
  .article-size-row {
    grid-template-columns: 1fr;
  }

  .article-characteristic-row {
    grid-template-columns: 1fr;
  }

  .article-cards-panel-head {
    flex-direction: column;
  }
}

.settings-user-row,
.stock-header-settings-list,
.stock-header-setting-row,
.campaign-detail-chart,
.campaign-detail-chart.empty,
.campaign-query-table-wrap,
.campaign-detail-table-wrap,
.locality-table,
.detail-table,
.price-control-board {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    #0b0f13;
  color: var(--ink);
}

.stock-header-setting-row {
  background: transparent;
}

.stock-header-setting-row select,
.locality-cell select {
  border-color: var(--line);
  background: #080b0f;
  color: #f3f5f7;
  color-scheme: dark;
}

.campaign-detail-chart.empty,
.mobile-report-empty,
.task-empty-row,
.detail-empty {
  color: #9aa4af;
}

.price-cell.danger-stock {
  color: #ff7b84;
  background: rgba(238, 38, 50, 0.12);
}

.price-cell.warning-stock,
.stock-cell.warning-stock {
  color: #f5be5b;
  background: rgba(240, 165, 43, 0.11);
}

.columns-item.visible,
.columns-item.available:hover {
  border-color: rgba(238, 38, 50, 0.38);
  background: rgba(238, 38, 50, 0.08);
}

.promo-filter-group,
.promotion-period-board,
.promo-manage-group {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.promotion-period-board,
.promotion-period-board.needs-load {
  grid-template-columns: minmax(220px, 1fr) auto minmax(150px, 0.42fr) minmax(150px, 0.42fr) minmax(260px, 0.9fr) auto;
  align-items: end;
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.promotion-period-board.needs-load {
  border-color: rgba(238, 38, 50, 0.34);
  background:
    linear-gradient(180deg, rgba(238, 38, 50, 0.11), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.promotion-period-main,
.promotion-period-date,
.promotion-period-state {
  min-width: 0;
}

.promotion-period-main strong {
  color: #f6f8fa;
  font-size: 17px;
}

.promotion-period-main span,
.promotion-period-main em,
.promotion-period-date span,
.promotion-period-state span {
  color: #8e99a6;
}

.promotion-period-date input {
  width: 100%;
  border-color: var(--line);
  border-radius: 6px;
  background: #090c0f;
  color: #f2f5f8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.promotion-period-date input:focus {
  border-color: rgba(238, 38, 50, 0.58);
  box-shadow: 0 0 0 3px rgba(238, 38, 50, 0.16);
  outline: none;
}

.promotion-period-state {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.promotion-period-state strong {
  color: #dce2e8;
}

.promotion-period-board.needs-load .promotion-period-state strong {
  color: #ff5962;
}

.promotion-period-board > button.primary {
  border-color: #ee2632;
  background: linear-gradient(180deg, #ff3440, #cf1724);
  color: #fff;
}

.mobile-report-card.warning {
  border-color: rgba(240, 165, 43, 0.34);
  background:
    linear-gradient(180deg, rgba(240, 165, 43, 0.10), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.mobile-report-title strong,
.mobile-report-amount,
.store-option strong,
.funnel-card span {
  color: var(--ink);
}

.funnel-card span {
  background: rgba(255, 255, 255, 0.06);
}

.login-panel {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(16, 20, 25, 0.86), rgba(7, 9, 12, 0.92)),
    rgba(0, 0, 0, 0.7);
}

.screen-module-hub {
  background:
    radial-gradient(circle at 22% -12%, rgba(238, 38, 50, 0.12), transparent 34%),
    #050607;
}

.module-hub-meta,
.module-tile {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.016)),
    #101419;
}

.module-tile.primary {
  background:
    linear-gradient(145deg, rgba(238, 38, 50, 0.28), rgba(16, 20, 25, 0.94) 48%),
    #101419;
}

.module-tile:not(:disabled):hover {
  border-color: rgba(238, 38, 50, 0.58);
}

.merge-control-board {
  display: grid;
  grid-template-columns: 230px 126px 126px minmax(220px, 360px) auto;
  gap: 8px;
  align-items: end;
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.merge-control-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.merge-control-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.merge-control-field input,
.merge-control-field select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #080b0f;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.merge-control-field input:focus,
.merge-control-field select:focus {
  border-color: rgba(238, 38, 50, 0.58);
  box-shadow: 0 0 0 3px rgba(238, 38, 50, 0.14);
}

.merge-control-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  white-space: nowrap;
}

.merge-control-actions button,
.merge-metrics-dialog button {
  min-height: 36px;
}

.preview-table.merge-page {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  background: #0a0d10;
  overflow: auto;
}

.preview-table.merge-page > .merge-groups {
  display: grid;
  width: 100%;
  min-height: 0;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  border: 0;
  background: transparent;
}

.merge-block {
  display: grid;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.012)),
    #0f1419;
  overflow: hidden;
}

.merge-block.is-virtual {
  border-color: rgba(91, 141, 255, 0.54);
  background:
    linear-gradient(180deg, rgba(91, 141, 255, 0.10), rgba(255, 255, 255, 0.012)),
    #0f1419;
}

.merge-block.is-virtual .merge-block-title strong {
  color: #dbe6ff;
}

.merge-block-main {
  display: grid;
  min-width: 0;
  align-content: start;
}

.merge-block-head {
  display: grid;
  grid-template-columns: minmax(170px, 0.18fr) minmax(0, 1fr) max-content;
  gap: 14px;
  min-height: 60px;
  align-items: stretch;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.012));
}

.merge-block-title {
  display: grid;
  gap: 3px;
  min-width: 0;
  align-content: center;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.022);
}

.merge-block-head span,
.merge-card-title span,
.merge-metric span {
  color: var(--muted);
  font-size: 11px;
}

.merge-block-head strong {
  color: var(--ink);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-block-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
  min-width: max-content;
}

.merge-block-actions button {
  min-width: 32px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 0 8px;
}

.merge-block-actions button:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.merge-block-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.merge-block-tag {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 54, 74, 0.36);
  border-radius: 999px;
  background: rgba(255, 54, 74, 0.1);
  color: #ff8b96;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  padding: 3px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-block-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.merge-block-tags .merge-block-tag {
  flex: 0 1 auto;
  padding: 2px 6px;
}

.merge-metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, max-content));
  gap: 7px;
  align-content: center;
  justify-content: start;
  min-width: 0;
  background: transparent;
}

.merge-metric {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 96px;
  min-height: 44px;
  border: 1px solid rgba(128, 146, 166, 0.2);
  border-radius: 8px;
  padding: 6px 9px;
  background: linear-gradient(180deg, rgba(128, 146, 166, 0.085), rgba(128, 146, 166, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.merge-metric span {
  letter-spacing: 0;
  line-height: 1.1;
}

.merge-metric strong {
  color: #f5f7fa;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.merge-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(48px, calc(86px * var(--merge-card-scale, 1)), 104px), 1fr));
  gap: clamp(5px, calc(8px * var(--merge-card-scale, 1)), 9px);
  padding: 10px;
}

.merge-product-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.merge-product-card:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.merge-block.is-drop-target {
  border-color: rgba(91, 141, 255, 0.78);
  box-shadow: inset 0 0 0 2px rgba(91, 141, 255, 0.22);
}

.merge-product-card.is-dragging {
  opacity: 0.55;
}

.merge-product-card.is-selected {
  border-color: #f5f7fa;
  box-shadow: 0 0 0 2px rgba(245, 247, 250, 0.22);
}

.merge-product-card.is-clone {
  border-style: dashed;
  border-color: rgba(91, 141, 255, 0.76);
}

.merge-clone-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  border: 1px solid rgba(91, 141, 255, 0.75);
  border-radius: 999px;
  background: rgba(7, 10, 14, 0.88);
  color: #cddaff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 5px;
  pointer-events: none;
}

.merge-comment-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 204, 0, 0.84);
  border-radius: 999px;
  background: rgba(7, 10, 14, 0.9);
  color: #ffd866;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.merge-product-card.has-comment:hover::before {
  content: attr(data-merge-comment);
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 5;
  max-height: 72px;
  overflow: hidden;
  border: 1px solid rgba(255, 204, 0, 0.54);
  border-radius: 6px;
  background: rgba(7, 10, 14, 0.94);
  color: #f5f7fa;
  font-size: 11px;
  line-height: 1.35;
  padding: 6px 7px;
  pointer-events: none;
}

.merge-product-card.has-highlight {
  border-color: var(--merge-card-highlight-solid, #ffcc00);
  background:
    linear-gradient(180deg, var(--merge-card-highlight, rgba(255, 204, 0, 0.32)), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.025);
}

.merge-product-card.has-highlight::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: 2px solid var(--merge-card-highlight-solid, #ffcc00);
  border-radius: 6px;
  opacity: 0.86;
}

.merge-product-card.has-marker-mismatch .merge-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px 4px 0 0;
  background: rgba(255, 54, 74, 0.26);
  pointer-events: none;
}

.merge-photo-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #07090c;
}

.merge-photo-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.merge-no-photo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 12px;
}

.merge-card-badges {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  display: grid;
  gap: 3px;
}

.merge-badge {
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--merge-badge-border, rgba(255, 255, 255, 0.18));
  border-radius: 4px;
  background: var(--merge-badge-bg, rgba(5, 7, 10, 0.78));
  color: #f5f7fa;
  font-size: var(--merge-badge-font-size, 9px);
  font-weight: 800;
  line-height: 1.2;
  padding: 2px 4px;
}

.merge-card-title {
  display: grid;
  gap: 2px;
  min-height: 38px;
  padding: 6px;
}

.merge-card-title strong {
  color: var(--ink);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-card-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-card-ad-kinds {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 3px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.merge-ad-kind {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  color: #f5f7fa;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.merge-ad-kind-ark {
  background: linear-gradient(180deg, rgba(255, 70, 88, 0.96), rgba(166, 20, 35, 0.9));
  border-color: rgba(255, 93, 108, 0.72);
  color: #fff6f7;
}

.merge-ad-kind-rk {
  background: linear-gradient(180deg, rgba(83, 132, 255, 0.95), rgba(39, 75, 176, 0.9));
  border-color: rgba(117, 157, 255, 0.72);
  color: #f5f8ff;
}

.merge-more-card,
.merge-empty {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.merge-empty {
  min-height: 220px;
  margin: 12px;
}

.merge-metrics-dialog {
  width: min(760px, calc(100vw - 36px));
}

.merge-dialog-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
}

.merge-dialog-tabs button {
  min-height: 34px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.merge-dialog-tabs button.active {
  border-color: rgba(238, 38, 50, 0.72);
  background: linear-gradient(180deg, rgba(238, 38, 50, 0.34), rgba(238, 38, 50, 0.16));
  color: #fff;
}

.merge-settings-dialog {
  width: min(460px, calc(100vw - 36px));
}

.merge-highlight-dialog {
  width: min(480px, calc(100vw - 36px));
}

.merge-product-detail-dialog {
  width: min(1120px, calc(100vw - 36px));
}

.merge-product-navigator {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

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

.merge-product-navigator-head strong {
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-product-navigator-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.merge-product-navigator-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.merge-product-navigator-strip button {
  flex: 0 0 82px;
  display: grid;
  gap: 5px;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  padding: 6px;
  text-align: left;
  cursor: pointer;
}

.merge-product-navigator-strip button:hover,
.merge-product-navigator-strip button.active {
  border-color: rgba(238, 38, 50, 0.72);
  background: linear-gradient(180deg, rgba(238, 38, 50, 0.22), rgba(255, 255, 255, 0.025));
}

.merge-product-navigator-strip img,
.merge-product-navigator-empty {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  object-fit: cover;
  background: #07090c;
}

.merge-product-navigator-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.merge-product-navigator-strip strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-product-navigator-strip em {
  justify-self: start;
  border: 1px solid rgba(240, 165, 43, 0.42);
  border-radius: 999px;
  color: var(--amber);
  font-size: 10px;
  font-style: normal;
  line-height: 1;
  padding: 3px 5px;
}

.merge-product-detail-body {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.merge-product-detail-photo {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 10px;
}

.merge-detail-main-photo,
.merge-product-detail-photo .merge-no-photo.merge-detail-main-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  object-fit: cover;
  background: #07090c;
}

.merge-detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 6px;
}

.merge-detail-thumbs button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  padding: 2px;
}

.merge-detail-thumbs button.active {
  border-color: #f5f7fa;
  box-shadow: 0 0 0 2px rgba(245, 247, 250, 0.18);
}

.merge-detail-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  object-fit: cover;
}

.merge-product-detail-photo strong {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-product-detail-photo span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.merge-product-detail-main {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.merge-product-detail-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 8px;
}

.merge-detail-kpi {
  display: grid;
  gap: 4px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  padding: 9px 10px;
}

.merge-detail-kpi span {
  color: var(--muted);
  font-size: 11px;
}

.merge-detail-kpi strong {
  color: #f5f7fa;
  font-size: 16px;
}

.merge-size-detail {
  display: grid;
  gap: 8px;
}

.merge-size-detail h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.merge-size-table {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.merge-size-table > div {
  min-height: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 10px;
}

.merge-size-table > div:nth-child(-n + 2) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.035);
}

.merge-warehouse-size-table {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 72px minmax(180px, 1.7fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.merge-warehouse-size-table > div {
  min-height: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 10px;
}

.merge-warehouse-size-table > div:nth-child(-n + 3) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.035);
}

.merge-size-empty {
  grid-column: 1 / -1;
  color: var(--muted) !important;
}

.merge-comment-view,
.merge-comment-editor {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 204, 0, 0.34);
  border-radius: 8px;
  background: rgba(255, 204, 0, 0.06);
  color: #f5f7fa;
  padding: 10px;
}

.merge-comment-editor h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.merge-comment-editor textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090c11;
  color: var(--ink);
  padding: 9px 10px;
}

.merge-comment-editor > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.merge-settings-body {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.merge-card-footer-options,
.merge-name-check-options {
  display: grid;
  gap: 8px;
}

.merge-card-footer-options h3,
.merge-name-check-options h3 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.merge-scale-control,
.merge-font-size-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 12px;
}

.merge-scale-control span,
.merge-font-size-control span {
  color: var(--ink);
  font-weight: 800;
}

.merge-scale-control strong,
.merge-font-size-control strong {
  color: #f5f7fa;
}

.merge-scale-control input,
.merge-font-size-control input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #ee2632;
}

.merge-visualization-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.merge-metrics-columns[hidden],
.merge-visualization-panel[hidden] {
  display: none;
}

.merge-visual-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  padding: 8px 10px;
}

.merge-visual-toggle input,
.merge-metric-option input {
  accent-color: #ee2632;
}

.merge-badge-style-list,
.merge-highlight-body {
  display: grid;
  gap: 10px;
}

.merge-badge-style-list h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.merge-badge-style-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 44px minmax(130px, 1fr) 54px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  padding: 8px 10px;
}

.merge-badge-style-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-badge-style-row input[type="color"] {
  width: 40px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #080b0f;
  padding: 2px;
}

.merge-badge-style-row input[type="range"] {
  width: 100%;
  accent-color: #ee2632;
}

.merge-badge-style-row strong {
  color: #f5f7fa;
  text-align: right;
}

.merge-highlight-body p {
  margin: 0;
  color: var(--muted);
}

.article-create-source-status {
  margin: 10px 0 12px;
}

.article-source-table-wrap {
  display: block;
  overflow: auto;
  max-height: 720px;
  padding-right: 0;
}

.article-source-table {
  display: grid;
  gap: 0;
  align-items: stretch;
  min-width: 100%;
}

.article-source-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #151c24;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.article-source-table-head.action {
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}

.article-source-head-button,
.article-source-filter-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.article-source-head-button {
  font-weight: 700;
  text-align: left;
  flex: 1 1 auto;
}

.article-source-filter-button {
  color: #97a1ac;
  font-size: 11px;
}

.article-source-table-head.filtered .article-source-filter-button {
  color: #ff8d92;
}

.article-source-table-cell {
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #10161c;
  color: #dce2e8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-source-table-cell.title {
  font-weight: 600;
}

.article-source-table-cell.selected {
  background: rgba(238, 38, 50, 0.08);
}

.article-source-table-cell.action {
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-source-table-photo {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.article-create-columns-list {
  max-height: 360px;
  overflow: auto;
}

.article-create-filter-dialog {
  width: min(340px, calc(100vw - 32px));
}

.article-create-filter-values {
  max-height: 280px;
  overflow: auto;
}

.merge-metrics-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.merge-metrics-columns section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.merge-metrics-columns h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.merge-metric-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  padding: 6px 8px;
}

.merge-metric-option input {
  accent-color: #ee2632;
}

body.replenishment-view .workspace {
  padding-top: 10px;
}

body.replenishment-view .dashboard-band {
  margin-bottom: 8px;
}

body.replenishment-view .dashboard-band .section-title {
  margin-bottom: 6px;
}

body.replenishment-view.compact-page-header #view-title {
  min-height: 24px;
}

body.replenishment-view .crumb-section {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

body.replenishment-view .crumb-arrow {
  font-size: 18px;
}

body.replenishment-view .crumb-current {
  font-size: 16px;
}

body.replenishment-view .metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
}

body.replenishment-view .metric-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  padding: 7px 10px;
}

body.replenishment-view .metric-card span {
  min-width: 0;
  font-size: 10px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.replenishment-view .metric-card strong {
  margin: 0;
  font-size: 17px;
  line-height: 1;
}

body.replenishment-view .metric-card span:last-child {
  grid-column: 1 / -1;
  margin-top: 3px;
  opacity: 0.72;
}

body.replenishment-view .metric-card.replenishment-color-card {
  border-color: rgba(148, 163, 184, 0.34);
  background: linear-gradient(180deg, rgba(20, 26, 32, 0.98), rgba(13, 17, 22, 0.96));
}

body.replenishment-view .tool-strip {
  gap: 6px;
  margin: 0 0 8px;
}

body.replenishment-view .tool-strip button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}

body.replenishment-view .content-grid {
  gap: 8px;
  margin-bottom: 8px;
}

body.replenishment-view .module-board {
  padding: 8px 10px;
}

body.replenishment-view .module-board .section-title.compact {
  display: none;
}

body.replenishment-view .mode-grid {
  display: none;
}

body.replenishment-view .mode-chip {
  min-height: 26px;
  min-width: 120px;
  flex: 1 1 120px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
}

body.replenishment-view .table-section {
  max-height: calc(100vh - 176px);
  padding: 12px;
}

body.replenishment-view .table-section > .section-title {
  margin: -12px -12px 0;
  padding: 10px 12px 12px;
}

body.replenishment-view .section-title.compact h2 {
  font-size: 14px;
}

body.replenishment-view .preview-table > div {
  min-height: 34px;
}

.replenishment-control-board {
  padding: 8px 10px;
}

.replenishment-table-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) repeat(6, max-content);
  gap: 7px;
  align-items: center;
  margin-top: 8px;
}

.replenishment-table-tools input,
.replenishment-table-tools select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #080b0f;
  color: var(--ink);
  padding: 0 9px;
  outline: none;
}

.replenishment-table-tools input:focus,
.replenishment-table-tools select:focus {
  border-color: rgba(238, 38, 50, 0.58);
  box-shadow: 0 0 0 3px rgba(238, 38, 50, 0.14);
}

.replenishment-table-tools button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}

.replenishment-controls {
  display: grid;
  grid-template-columns:
    minmax(160px, 220px)
    minmax(150px, 210px)
    repeat(4, minmax(96px, 140px))
    auto
    auto
    auto
    auto
    minmax(180px, 1fr);
  gap: 8px;
  align-items: end;
}

.replenishment-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.replenishment-controls label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.replenishment-controls input,
.replenishment-controls select {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.replenishment-controls button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.replenishment-order-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
}

.replenishment-order-columns label {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.replenishment-order-columns input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.replenishment-data-warning {
  margin-top: 7px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.11);
  color: #f8d796;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
}

#replenishment-status {
  min-width: 0;
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replenishment-info-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(86vh, 820px);
  overflow: auto;
}

.replenishment-info-body {
  display: grid;
  gap: 12px;
}

.replenishment-info-body section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.42);
  padding: 12px;
}

.replenishment-info-body h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
}

.replenishment-info-body p,
.replenishment-info-body li {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.replenishment-info-body ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.replenishment-formula {
  display: grid;
  gap: 6px;
}

.replenishment-formula span {
  border: 1px solid rgba(111, 129, 152, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 12px;
}

.replenishment-info-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  font-size: 12px;
}

.replenishment-info-table th,
.replenishment-info-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

.replenishment-info-table th {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.replenishment-target-board {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.replenishment-target-board.hidden {
  display: none;
}

.replenishment-target-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.replenishment-target-head > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.replenishment-target-head strong {
  font-size: 12px;
}

.replenishment-target-head span {
  color: var(--muted);
  font-size: 11px;
}

.replenishment-target-head > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.replenishment-target-head button {
  min-height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

.replenishment-target-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  max-height: 166px;
  overflow: auto;
  padding-right: 2px;
}

.replenishment-selected-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
  max-height: 96px;
  overflow: auto;
  padding-right: 2px;
}

.replenishment-selected-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(74, 94, 116, 0.72);
  border-radius: 6px;
  background: rgba(35, 48, 62, 0.44);
}

.replenishment-selected-item.missing {
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(245, 158, 11, 0.08);
}

.replenishment-selected-item strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replenishment-selected-item span,
.replenishment-selected-item em,
.replenishment-selected-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replenishment-target-dialog {
  width: min(1180px, calc(100vw - 42px));
}

.replenishment-picker-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.replenishment-picker-tools label {
  display: grid;
  gap: 3px;
  min-width: 126px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.replenishment-picker-tools input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #080c10;
  color: var(--text);
}

.replenishment-picker-tools label input {
  min-width: 0;
}

.replenishment-picker-tools > input {
  min-width: min(360px, 100%);
  flex: 1 1 300px;
}

.replenishment-dialog-list {
  max-height: min(58vh, 520px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0f14;
  padding-right: 4px;
}

.replenishment-target-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  table-layout: fixed;
}

.replenishment-target-table th,
.replenishment-target-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.replenishment-target-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #151a20;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.replenishment-target-table th:first-child,
.replenishment-target-table td:first-child {
  width: 42px;
  text-align: center;
}

.replenishment-target-table th button {
  width: 100%;
  min-height: 20px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.replenishment-target-table td {
  color: var(--text);
  font-size: 12px;
}

.replenishment-target-table td strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replenishment-target-table tr.selected td {
  background: rgba(47, 128, 237, 0.12);
}

.replenishment-target-table tr.missing td {
  background: rgba(236, 72, 153, 0.12);
}

.replenishment-target-table tr.selected.missing td {
  background: linear-gradient(90deg, rgba(47, 128, 237, 0.14), rgba(236, 72, 153, 0.12));
}

.replenishment-target-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 3px 7px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.replenishment-target-item.missing {
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(245, 158, 11, 0.08);
}

.replenishment-target-item input {
  width: 14px;
  height: 14px;
}

.replenishment-target-item strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replenishment-target-item span,
.replenishment-target-item em,
.replenishment-target-item small {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.replenishment-target-item span {
  grid-column: 2 / 3;
}

.replenishment-target-item em {
  white-space: nowrap;
}

.replenishment-target-item small {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replenishment-target-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  padding: 8px 0;
}

@media (max-width: 1500px) {
  .replenishment-controls {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  #replenishment-status {
    grid-column: 1 / -1;
  }
}

.preview-table.replenishment-table {
  font-size: 12px;
}

.preview-table.replenishment-table > div {
  min-height: 36px;
  padding: 7px 9px;
}

.preview-table.replenishment-table .product-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px 6px;
  gap: 5px;
  align-items: center;
  min-height: 38px;
  padding: 6px 7px;
  overflow: hidden;
}

.preview-table.replenishment-table .product-head button[data-sort] {
  min-width: 0;
  min-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}

.preview-table.replenishment-table .column-filter-button {
  width: 20px;
  min-height: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.preview-table.replenishment-table .column-filter-button.active {
  color: #fff;
  border-color: rgba(238, 38, 50, 0.7);
  background: rgba(238, 38, 50, 0.22);
}

.preview-table.replenishment-table .replenishment-photo-cell {
  align-items: stretch;
  justify-content: center;
  padding: 2px;
}

.preview-table.replenishment-table .replenishment-photo-cell .product-thumb {
  width: 100%;
  height: 100%;
  max-height: 42px;
  object-fit: contain;
  border-radius: 4px;
}

.replenishment-qty-input {
  width: 100%;
  min-height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(4, 8, 12, 0.78);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.replenishment-qty-input:focus {
  border-color: rgba(238, 38, 50, 0.8);
  box-shadow: 0 0 0 2px rgba(238, 38, 50, 0.16);
}

.replenishment-cell.replenishment-need {
  color: #fff;
  background: rgba(238, 38, 50, 0.14);
}

.replenishment-cell.replenishment-warning {
  color: #ffd27a;
  background: rgba(245, 158, 11, 0.12);
}

.replenishment-cell.replenishment-manual {
  background: rgba(14, 165, 233, 0.18);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.replenishment-empty {
  color: var(--muted);
}

body.promo-campaigns-view .content-grid {
  gap: 8px;
}

body.promo-campaigns-view .metric-grid {
  gap: 8px;
}

body.promo-campaigns-view .metric-card {
  min-height: 48px;
  padding: 8px 10px;
}

body.promo-campaigns-view .metric-card span {
  font-size: 10px;
  line-height: 1.15;
}

body.promo-campaigns-view .metric-card strong {
  margin: 2px 0 4px;
  font-size: 22px;
  line-height: 1;
}

body.promo-campaigns-view .promotion-period-board,
body.promo-campaigns-view .promotion-period-board.needs-load {
  grid-template-columns: minmax(170px, 0.7fr) auto minmax(120px, 0.34fr) minmax(120px, 0.34fr) minmax(220px, 0.82fr) auto;
  gap: 7px;
  margin-bottom: 6px;
  padding: 7px 9px;
}

body.promo-campaigns-view .promotion-period-main,
body.promo-campaigns-view .promotion-period-date,
body.promo-campaigns-view .promotion-period-state {
  gap: 2px;
}

body.promo-campaigns-view .promotion-period-main span,
body.promo-campaigns-view .promotion-period-main em,
body.promo-campaigns-view .promotion-period-date span,
body.promo-campaigns-view .promotion-period-state span {
  font-size: 10px;
  line-height: 1.15;
}

body.promo-campaigns-view .promotion-period-main strong {
  font-size: 15px;
  line-height: 1.05;
}

body.promo-campaigns-view .promotion-period-date input,
body.promo-campaigns-view .promotion-period-quick button,
body.promo-campaigns-view .promotion-period-board > button {
  min-height: 28px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 12px;
}

body.promo-campaigns-view .promotion-period-state {
  min-height: 28px;
  padding: 4px 8px;
}

body.promo-campaigns-view .promotion-period-state strong {
  font-size: 11px;
  line-height: 1.15;
}

body.promo-campaigns-view .promotion-period-quick {
  gap: 5px;
}

body.promo-campaigns-view .module-board:has(.promo-filter-panel) {
  padding: 10px 12px;
}

body.promo-campaigns-view .module-board:has(.promo-filter-panel) > .section-title {
  margin-bottom: 8px;
  font-size: 13px;
}

body.promo-campaigns-view .promo-filter-panel {
  gap: 8px;
}

body.promo-campaigns-view .promo-filter-group {
  gap: 7px;
  padding: 8px 10px;
}

body.promo-campaigns-view .promo-filter-group strong {
  font-size: 12px;
}

body.promo-campaigns-view .promo-filter-buttons {
  gap: 5px;
}

body.promo-campaigns-view .promo-filter-buttons .mode-chip,
body.promo-campaigns-view .promo-manage-group .mode-chip {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}

body.promo-campaigns-view .table-section {
  max-height: calc(100vh - 238px);
}

body.promo-clusters-view .table-section {
  max-height: calc(100vh - 156px);
}

body.promo-clusters-view .table-section > .section-title {
  display: none;
}

body.promo-finance-view {
  --finance-text: #f4f8ff;
  --finance-muted: #b8c4d6;
  --finance-panel: #151b23;
  --finance-soft: #10161d;
  --finance-line: rgba(178, 193, 214, 0.22);
}

body.promo-finance-view .metric-card,
body.promo-finance-view .module-board,
body.promo-finance-view .table-section,
body.promo-finance-view .preview-table > div {
  color: var(--finance-text);
}

body.promo-finance-view .metric-card span,
body.promo-finance-view .article-status-row,
body.promo-finance-view #table-caption,
body.promo-finance-view .main-report-period span,
body.promo-finance-view .main-report-period em {
  color: var(--finance-muted);
}

body.promo-finance-view .metric-card strong,
body.promo-finance-view .section-title h2,
body.promo-finance-view .preview-head,
body.promo-finance-view .product-head button {
  color: var(--finance-text);
}

body.promo-finance-view .finance-control-board {
  display: grid;
  gap: 12px;
  border-color: var(--finance-line);
  background: var(--finance-panel);
}

.promotion-finance-extra {
  display: grid;
  gap: 12px;
}

.finance-date-row {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.finance-date-row label {
  display: grid;
  gap: 5px;
  min-width: 150px;
  color: var(--finance-muted, var(--muted));
  font-size: 12px;
  font-weight: 700;
}

.finance-date-row input[type="date"] {
  min-height: 36px;
  border: 1px solid var(--finance-line, var(--line));
  border-radius: 8px;
  background: var(--finance-soft, var(--surface));
  color: var(--finance-text, var(--ink));
  padding: 0 10px;
}

.finance-compare-toggle {
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 36px;
  min-width: 280px !important;
  padding: 0 12px;
  border: 1px solid var(--finance-line, var(--line));
  border-radius: 8px;
  background: var(--finance-soft, var(--surface));
}

.finance-compare-toggle input {
  accent-color: var(--accent);
}

.finance-date-row button,
.finance-type-row button {
  min-height: 36px;
  border: 1px solid var(--finance-line, var(--line));
  border-radius: 8px;
  background: var(--finance-soft, var(--surface));
  color: var(--finance-text, var(--ink));
  padding: 0 12px;
}

.finance-date-row button:hover,
.finance-type-row button:hover,
.finance-type-row button.selected {
  border-color: var(--accent);
  background: rgba(197, 31, 93, 0.18);
  color: #fff;
}

body.promo-finance-view .preview-table {
  background: #080d12;
}

body.promo-finance-view .preview-table:not(.mobile-card-table) > .preview-head {
  border-color: var(--finance-line);
  background: #17202a;
}

body.promo-finance-view .preview-table > .preview-cell {
  border-color: rgba(178, 193, 214, 0.12);
  color: #e9f1ff;
}

.finance-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 8, 13, 0.74);
  backdrop-filter: blur(6px);
}

.finance-loader-window {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid rgba(222, 232, 247, 0.18);
  border-radius: 8px;
  background: #111820;
  color: #f6f9ff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.finance-loader-head {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.finance-loader-head span,
.finance-loader-head em {
  color: #b9c7da;
  font-size: 12px;
  font-style: normal;
}

.finance-loader-head strong {
  font-size: 22px;
}

.finance-loader-ring {
  width: 58px;
  height: 58px;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: finance-spin 0.9s linear infinite;
}

.finance-loader-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.finance-loader-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e12d68, #38bdf8);
  transition: width 0.35s ease;
}

.finance-loader-status {
  min-height: 20px;
  color: #f6f9ff;
  text-align: center;
  font-size: 14px;
}

.finance-loader-details {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(222, 232, 247, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #c8d5e7;
  font-size: 12px;
  text-align: center;
}

.finance-loader-steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.finance-loader-steps span {
  padding: 5px 9px;
  border: 1px solid rgba(222, 232, 247, 0.16);
  border-radius: 999px;
  color: #98a9bd;
  font-size: 12px;
}

.finance-loader-steps span.active {
  border-color: rgba(56, 189, 248, 0.46);
  color: #eef8ff;
  background: rgba(56, 189, 248, 0.1);
}

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

.cluster-control-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.module-board:has(.cluster-control-board.cluster-collapsed) {
  padding: 6px 10px;
}

.module-board:has(.cluster-control-board.cluster-collapsed) > .section-title {
  display: none;
}

.cluster-mini-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 32px;
  overflow: visible;
}

.cluster-mini-controls > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cluster-mini-controls .mode-chip {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.cluster-mini-controls .cluster-placement-block,
.cluster-mini-controls .cluster-chart-toggle {
  flex: 0 0 auto;
}

.cluster-chart-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--muted-strong) !important;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: none !important;
  white-space: nowrap;
}

.cluster-chart-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--danger);
}

.cluster-controls-row .cluster-chart-toggle {
  align-self: center;
}

.cluster-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.cluster-status-row {
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.cluster-status-row .mode-chip {
  min-height: 30px;
  padding: 0 10px;
}

.cluster-status-row .mode-chip.selected {
  border-color: rgba(95, 139, 183, 0.85);
  background: linear-gradient(180deg, rgba(59, 92, 128, 0.88), rgba(36, 60, 86, 0.9));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cluster-status-group {
  gap: 7px;
  padding: 8px 10px;
}

.cluster-status-group .promo-filter-buttons {
  gap: 6px;
}

.cluster-status-group .mode-chip {
  min-height: 30px;
  padding: 0 10px;
}

.cluster-status-group .mode-chip.selected {
  border-color: rgba(95, 139, 183, 0.85);
  background: linear-gradient(180deg, rgba(59, 92, 128, 0.88), rgba(36, 60, 86, 0.9));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cluster-controls-row label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.cluster-controls-row input[type="date"],
.cluster-search {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
  background: #070a0e;
}

.cluster-search {
  min-width: 320px;
  flex: 1 1 320px;
}

.cluster-control-label {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.cluster-placement-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.cluster-placement-block > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.cluster-placement-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  width: 148px;
  min-height: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #070a0e;
}

.cluster-placement-toggle button {
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 10px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.cluster-placement-toggle button:last-child {
  border-right: 0;
}

.cluster-placement-toggle button.active {
  color: #fff;
  background: linear-gradient(180deg, #31445a, #223243);
}

.preview-table.cluster-page {
  display: block;
  overflow: hidden;
  background: #080c10;
}

.preview-table.cluster-page > .cluster-workspace {
  display: grid;
  align-items: stretch;
  min-height: 0;
  padding: 12px;
  border: 0;
  background: transparent;
}

.cluster-workspace {
  display: grid;
  gap: 12px;
  min-width: 0;
  height: 100%;
  min-height: 0;
}

.cluster-workspace.with-detail {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.cluster-workspace.with-detail.detail-bottom {
  grid-template-rows: minmax(180px, var(--cluster-campaign-height, 42%)) 8px minmax(260px, 1fr);
}

.cluster-workspace.with-detail.detail-right {
  grid-template-columns: minmax(520px, 1fr) 8px minmax(320px, var(--cluster-detail-side-width, 420px));
  align-items: stretch;
}

.cluster-left-stack {
  display: grid;
  grid-template-rows: minmax(180px, var(--cluster-campaign-height, 46%)) 8px minmax(260px, 1fr);
  gap: 0;
  min-width: 0;
  min-height: 0;
}

.cluster-campaign-panel,
.cluster-detail-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24, 30, 37, 0.94), rgba(12, 16, 20, 0.96));
}

.cluster-workspace.detail-right .cluster-detail-panel {
  overflow: hidden;
}

.cluster-detail-panel.cluster-detail-hybrid {
  display: grid;
  min-height: 0;
}

.cluster-detail-hybrid.placement-bottom {
  grid-template-columns: minmax(0, 1fr) 8px minmax(260px, var(--cluster-detail-side-width, 390px));
}

.cluster-detail-hybrid.placement-right {
  grid-template-rows: minmax(180px, 34%) minmax(0, 1fr);
}

.cluster-detail-main-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.cluster-detail-main,
.cluster-detail-products {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.cluster-detail-main {
  display: flex;
  flex-direction: column;
}

.cluster-detail-products {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 0%, rgba(47, 128, 237, 0.08), transparent 28%),
    rgba(10, 14, 18, 0.88);
}

.cluster-workspace.detail-right > .cluster-detail-products {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cluster-detail-side-splitter {
  align-self: stretch;
  min-width: 8px;
  border-left: 1px solid rgba(121, 151, 184, 0.14);
  border-right: 1px solid rgba(121, 151, 184, 0.14);
  background:
    linear-gradient(180deg, transparent, rgba(96, 80, 255, 0.72), transparent) center / 2px 190px no-repeat,
    rgba(255, 255, 255, 0.025);
  cursor: col-resize;
}

.cluster-detail-side-splitter:hover {
  border-color: rgba(121, 151, 184, 0.38);
  background:
    linear-gradient(180deg, transparent, rgba(96, 80, 255, 0.95), transparent) center / 3px 220px no-repeat,
    rgba(47, 128, 237, 0.07);
}

.cluster-detail-hybrid.placement-bottom .cluster-detail-products {
  border-left: 0;
}

.cluster-detail-hybrid.placement-right .cluster-detail-products {
  border-right: 0;
  border-bottom: 1px solid var(--line);
  border-left: 0;
}

.cluster-workspace.detail-right > .cluster-detail-side-splitter {
  min-height: 0;
}

.cluster-products-head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px 10px;
}

.cluster-products-head strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.cluster-products-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.cluster-products-count {
  display: inline-flex !important;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(121, 151, 184, 0.22);
  border-radius: 999px;
  padding: 0 8px;
  color: #d8e7ff !important;
  background: rgba(47, 128, 237, 0.12);
  font-size: 10px !important;
  font-weight: 900;
  white-space: nowrap;
}

.cluster-products-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.cluster-detail-hybrid.placement-right .cluster-products-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cluster-products-kpis div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cluster-products-kpis span {
  color: var(--muted);
  font-size: 10px;
}

.cluster-products-kpis strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-products-section-title {
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 14px 8px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.cluster-products-table-wrap {
  flex: 1 1 180px;
  min-height: 120px;
  overflow: auto;
}

.cluster-workspace.detail-right > .cluster-detail-products .cluster-products-table-wrap {
  flex: 1 1 46%;
  min-height: 220px;
}

.cluster-products-table {
  width: max-content;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.cluster-associated-table {
  min-width: 620px;
}

.cluster-products-table th,
.cluster-products-table td {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 7px 8px;
  color: var(--text);
  font-size: 11px;
  text-align: left;
  vertical-align: middle;
}

.cluster-products-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted-strong);
  background: #151a20;
}

.cluster-products-table td strong {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-products-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.cluster-campaign-product-photo {
  width: 50px;
}

.cluster-campaign-product-photo img,
.cluster-campaign-product-photo span {
  display: inline-grid;
  width: 36px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  object-fit: cover;
  color: var(--muted);
  background: #070a0e;
}

.cluster-associated-list,
.cluster-associated-table-wrap {
  display: grid;
  flex: 0 0 auto;
  max-height: 240px;
  overflow: auto;
}

.cluster-workspace.detail-right > .cluster-detail-products .cluster-associated-table-wrap {
  display: block;
  flex: 0 0 220px;
  max-height: none;
  min-height: 140px;
}

.cluster-associated-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 12px;
}

.cluster-associated-item img,
.cluster-associated-no-photo {
  display: inline-grid;
  width: 34px;
  height: 44px;
  place-items: center;
  border-radius: 4px;
  object-fit: cover;
  color: var(--muted);
  background: #070a0e;
}

.cluster-associated-item strong,
.cluster-associated-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-associated-item strong {
  color: var(--text);
  font-size: 11px;
}

.cluster-associated-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.cluster-associated-item b {
  color: #e7f1ff;
  font-size: 11px;
  white-space: nowrap;
}

.cluster-panel-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.cluster-campaign-panel .cluster-panel-head {
  display: grid;
  grid-template-columns: max-content minmax(260px, 1fr) max-content;
  align-items: end;
}

.cluster-panel-head strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.cluster-panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.cluster-panel-head .cluster-query-source-note {
  color: #f8d37a;
  font-size: 12px;
}

.cluster-detail-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.cluster-panel-search {
  min-width: 260px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
  background: #070a0e;
}

.cluster-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.cluster-table-wrap,
.cluster-query-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.cluster-table-wrap {
  max-height: none;
}

.cluster-workspace.detail-bottom .cluster-campaign-panel {
  max-height: none;
}

.cluster-workspace.detail-bottom .cluster-table-wrap {
  max-height: none;
}

.cluster-workspace.detail-bottom .cluster-detail-panel {
  min-height: 280px;
}

.cluster-splitter {
  align-self: stretch;
  min-height: 8px;
  border: 1px solid rgba(121, 151, 184, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(121, 151, 184, 0.58), transparent) center / 180px 2px no-repeat,
    rgba(255, 255, 255, 0.025);
  cursor: row-resize;
}

.cluster-splitter:hover {
  border-color: rgba(121, 151, 184, 0.38);
  background:
    linear-gradient(90deg, transparent, rgba(121, 151, 184, 0.86), transparent) center / 220px 2px no-repeat,
    rgba(47, 128, 237, 0.07);
}

.cluster-campaign-table,
.cluster-query-table {
  width: max-content;
  max-width: none;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.cluster-campaign-table {
  min-width: 1880px;
}

.cluster-query-table {
  min-width: 1120px;
}

.cluster-campaign-table th,
.cluster-campaign-table td,
.cluster-query-table th,
.cluster-query-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.cluster-campaign-table th,
.cluster-query-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #151a20;
}

.cluster-campaign-table th.product-head {
  position: sticky;
  overflow: hidden;
}

.cluster-campaign-table th button,
.cluster-query-table th button {
  width: 100%;
  border: 0;
  padding: 0;
  color: var(--muted-strong);
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.cluster-campaign-table th[draggable="true"] {
  cursor: grab;
}

.cluster-campaign-table th.dragging {
  opacity: 0.55;
}

.cluster-campaign-table tbody tr,
.cluster-query-table tbody tr {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
}

.cluster-campaign-table tbody tr.cluster-row-status-active {
  background:
    linear-gradient(90deg, rgba(42, 118, 86, 0.12), rgba(255, 255, 255, 0.01) 56%),
    rgba(255, 255, 255, 0.012);
}

.cluster-campaign-table tbody tr.cluster-row-status-pause {
  background:
    linear-gradient(90deg, rgba(132, 142, 155, 0.08), rgba(255, 255, 255, 0.006) 56%),
    rgba(255, 255, 255, 0.006);
}

.cluster-campaign-table tbody tr.cluster-row-status-finished {
  opacity: 0.74;
}

.cluster-campaign-table tbody tr:hover,
.cluster-query-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.045);
}

.cluster-campaign-table tbody tr.selected,
.cluster-query-table tbody tr.selected {
  background: linear-gradient(90deg, rgba(47, 128, 237, 0.14), rgba(74, 96, 120, 0.12));
  outline: 1px solid rgba(121, 151, 184, 0.62);
  outline-offset: -1px;
}

.cluster-ad-status-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 86px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    #11161b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.cluster-campaign-table .campaign-status-cell {
  padding: 0 4px;
  text-align: center;
}

.cluster-ad-status-icon-button {
  position: relative;
  width: 30px;
  min-width: 30px;
  height: 26px;
  min-height: 26px;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.cluster-ad-status-switch.active {
  border-color: rgba(72, 187, 120, 0.48);
  color: #d9ffe8;
  background:
    linear-gradient(180deg, rgba(72, 187, 120, 0.32), rgba(27, 92, 62, 0.58)),
    #102018;
}

.cluster-ad-status-switch.paused {
  border-color: rgba(142, 152, 165, 0.28);
  color: #c3cad3;
  background:
    linear-gradient(180deg, rgba(142, 152, 165, 0.16), rgba(71, 80, 91, 0.26)),
    #12161b;
}

.cluster-ad-status-switch.finished {
  border-color: rgba(170, 178, 190, 0.34);
  color: #d7dde7;
  background:
    linear-gradient(180deg, rgba(170, 178, 190, 0.14), rgba(72, 80, 91, 0.22)),
    #11161b;
}

.cluster-ad-status-switch.other {
  border-color: rgba(132, 152, 178, 0.28);
  color: #b8c4d4;
  background:
    linear-gradient(180deg, rgba(132, 152, 178, 0.12), rgba(52, 63, 78, 0.18)),
    #11161b;
}

.cluster-ad-status-switch:disabled {
  cursor: wait;
  opacity: 0.65;
}

.cluster-campaign-table td .cluster-ad-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 50%;
  color: inherit;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.cluster-campaign-table td .cluster-ad-status-text {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
  white-space: nowrap;
}

.cluster-campaign-table td .cluster-ad-status-icon {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
  margin: 0;
  color: inherit;
  font-size: 0;
}

.cluster-ad-status-icon-button.active .cluster-ad-status-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.cluster-ad-status-icon-button.paused .cluster-ad-status-icon::before,
.cluster-ad-status-icon-button.paused .cluster-ad-status-icon::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 4px;
  height: 10px;
  border-radius: 1px;
  background: currentColor;
}

.cluster-ad-status-icon-button.paused .cluster-ad-status-icon::before {
  left: 2px;
}

.cluster-ad-status-icon-button.paused .cluster-ad-status-icon::after {
  right: 2px;
}

.cluster-ad-status-icon-button.finished .cluster-ad-status-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 2px;
  background: currentColor;
}

.cluster-ad-status-icon-button.other .cluster-ad-status-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: currentColor;
}

.cluster-ad-status-switch .campaign-status-knob {
  display: none;
}

.cluster-campaign-table img {
  width: 44px;
  height: 58px;
  border-radius: 4px;
  object-fit: cover;
  background: #05070a;
}

.cluster-photo-cell {
  width: 64px;
  text-align: center;
}

.cluster-campaign-table td strong,
.cluster-query-table td strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-campaign-table td span,
.cluster-query-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.cluster-mini-mark,
.cluster-status-pill {
  display: inline-flex !important;
  width: fit-content;
  min-height: 22px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 7px;
  color: var(--muted) !important;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px !important;
  font-weight: 800;
}

.cluster-mini-mark.active {
  border-color: rgba(245, 158, 11, 0.55);
  color: #ffd27a !important;
  background: rgba(245, 158, 11, 0.16);
}

.ad-kind-badge {
  display: inline-flex !important;
  width: fit-content;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 3px 8px;
  color: #d8e7ff !important;
  background: rgba(47, 128, 237, 0.18);
  font-weight: 800;
}

.ad-kind-badge.ark {
  color: #ffd88a !important;
  background: rgba(245, 158, 11, 0.2);
}

.ad-kind-badge.rk {
  color: #b9d4ff !important;
  background: rgba(47, 128, 237, 0.22);
}

.cluster-empty {
  padding: 22px !important;
  color: var(--muted) !important;
  text-align: center !important;
}

.cluster-timeline {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.cluster-detail-summary {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  border-bottom: 1px solid var(--line);
}

.cluster-detail-summary div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.cluster-detail-summary span {
  color: var(--muted);
  font-size: 10px;
}

.cluster-detail-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-timeline.empty {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.cluster-timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.cluster-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.cluster-timeline-legend em {
  color: rgba(226, 232, 240, 0.72);
  font-style: normal;
  font-weight: 800;
}

.cluster-timeline-legend span::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  margin-right: 5px;
  vertical-align: middle;
  background: var(--chart-color);
}

.cluster-timeline-legend span[data-chart-kind="bar"]::before {
  width: 12px;
  height: 8px;
  border-radius: 2px;
}

.cluster-timeline svg {
  display: block;
  width: 100%;
  height: 170px;
}

.cluster-timeline line {
  stroke: rgba(255, 255, 255, 0.16);
}

.cluster-timeline polyline {
  fill: none;
  stroke: var(--line-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.cluster-timeline .metric-bar {
  fill: var(--bar-color);
  opacity: 0.78;
  rx: 3px;
}

.cluster-timeline .metric-bar-previous {
  opacity: 0.28;
  stroke: var(--bar-color);
  stroke-width: 1.5;
}

.cluster-timeline .metric-line-previous {
  opacity: 0.38;
  stroke-dasharray: 7 7;
}

.cluster-timeline .cluster-scale-labels text {
  fill: var(--scale-color);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0.9;
}

.cluster-timeline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.cluster-timeline text {
  fill: var(--muted);
  font-size: 10px;
}

.cluster-timeline .bar-value {
  fill: #fff;
  font-size: 9px;
  font-weight: 900;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(0, 0, 0, 0.55);
  stroke-width: 2px;
}

.cluster-chart-dialog {
  width: min(560px, calc(100vw - 32px));
}

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

.cluster-chart-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.cluster-chart-setting-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.cluster-chart-setting-row i {
  width: 16px;
  height: 8px;
  border-radius: 3px;
  background: var(--chart-color);
}

.cluster-chart-setting-row select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  color: var(--text);
  background: #070a0e;
}

.cluster-detail-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}

.cluster-query-mode-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.cluster-query-mode-toggle .mode-chip {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.cluster-query-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--danger);
}

@media (max-width: 1300px) {
  .cluster-workspace.with-detail.detail-right {
    grid-template-columns: 1fr;
  }

  .cluster-workspace.detail-right .cluster-detail-panel {
    position: static;
    max-height: none;
  }

  .cluster-detail-summary {
    grid-template-columns: repeat(3, minmax(92px, 1fr));
  }
}

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

  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    padding: 14px;
  }

  .metric-card {
    min-height: 88px;
  }

  .merge-control-board,
  .merge-metrics-columns {
    grid-template-columns: 1fr;
  }

  .merge-control-actions,
  .merge-block-head {
    justify-content: flex-start;
  }

  .merge-block-head {
    grid-template-columns: 1fr;
  }

  .merge-product-detail-body {
    grid-template-columns: 1fr;
  }
}
