:root {
  color-scheme: light;
  --sidebar-width: 205px;
  --sidebar-compact: 62px;
  --topbar-height: 50px;
  --tabbar-height: 40px;
  --brand: #2f9688;
  --primary: #009688;
  --primary-hover: #00877a;
  --active: #5fb878;
  --sidebar: #3a3d49;
  --sidebar-hover: rgba(255, 255, 255, 0.055);
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --workspace: #f4f6fa;
  --surface: #fff;
  --text: #596273;
  --heading: #343944;
  --muted: #98a1ad;
  --line: #e9edf2;
  --line-strong: #dce2e8;
  --soft: #fafbfc;
  --warning: #ffb800;
  --danger: #ff5722;
  --info: #1e9fff;
  --shadow: 0 1px 3px rgba(26, 35, 52, 0.06);
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--workspace);
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  background: var(--workspace);
}

.app-shell[hidden],
.auth-layer[hidden] {
  display: none;
}

.auth-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #eef1f5;
}

.auth-panel {
  width: min(380px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(34, 42, 54, 0.13);
}

.auth-brand {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  color: #fff;
  font-size: 17px;
  background: #3a3d49;
}

.auth-brand img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 2px;
}

.auth-form {
  display: grid;
  gap: 10px;
  padding: 25px 22px 22px;
}

.auth-form h1 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0;
}

.auth-form label {
  color: #606a78;
  font-size: 13px;
}

.auth-form .control {
  width: 100%;
  min-height: 40px;
}

.auth-error {
  min-height: 20px;
  margin: 0;
  color: #d4473e;
  font-size: 12px;
  line-height: 20px;
}

.auth-submit {
  width: 100%;
  min-height: 40px;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
summary,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  overflow: hidden;
  color: #fff;
  background: var(--sidebar);
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.08);
  transition: width 180ms ease, transform 180ms ease;
}

.brand {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 16px;
  font-weight: 300;
  white-space: nowrap;
  background: var(--brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.brand img {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  margin-right: 8px;
  object-fit: cover;
  border-radius: 2px;
}

.sidebar-scroll {
  position: absolute;
  inset: var(--topbar-height) -18px 0 0;
  width: calc(100% + 18px);
  padding: 5px 18px 18px 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-scroll::-webkit-scrollbar {
  display: none;
}

.nav-section {
  display: block;
  margin: 0;
}

.nav-section summary,
.nav-item {
  position: relative;
  display: flex;
  width: calc(var(--sidebar-width) - 16px);
  min-height: 50px;
  align-items: center;
  margin: 1px 8px;
  padding: 7px 31px 7px 44px;
  overflow: hidden;
  color: var(--sidebar-text);
  line-height: 36px;
  list-style: none;
  cursor: pointer;
  border-radius: 5px;
  transition: color 150ms ease, background 150ms ease;
}

.nav-section summary::-webkit-details-marker {
  display: none;
}

.nav-section summary:hover,
.nav-item:hover {
  color: #fff;
  background: var(--sidebar-hover);
}

.nav-section[open] > summary {
  color: #fff;
}

.nav-item.active,
.nav-child.active {
  color: #fff;
  background: var(--active);
}

.nav-icon {
  position: absolute;
  left: 17px;
  display: inline-flex;
  width: 18px;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-size: 15px;
  line-height: 1;
}

.nav-chevron {
  position: absolute;
  right: 14px;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 150ms ease;
}

.nav-section[open] .nav-chevron {
  transform: rotate(225deg) translate(-2px, -1px);
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-children {
  padding: 0 0 3px;
}

.nav-child {
  display: flex;
  width: var(--sidebar-width);
  height: 39px;
  align-items: center;
  padding: 0 16px 0 52px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.68);
  line-height: 39px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease;
}

.nav-child:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
}

.topbar {
  position: fixed;
  inset: 0 0 auto var(--sidebar-width);
  z-index: 30;
  display: flex;
  height: var(--topbar-height);
  align-items: stretch;
  justify-content: space-between;
  background: #fff;
  transition: left 180ms ease;
}

.topbar-left,
.topbar-right {
  display: flex;
  height: var(--topbar-height);
  align-items: center;
}

.topbar-left {
  min-width: 0;
  padding-left: 7px;
}

.topbar-right {
  flex: 0 0 auto;
  background: #fff;
}

.icon-button,
.refresh-button,
.account-button {
  position: relative;
  display: inline-flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: center;
  color: #353b45;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  flex: 0 0 50px;
  width: 50px;
  font-size: 17px;
}

.icon-button:hover,
.refresh-button:hover,
.account-button:hover {
  background: #f8f9fa;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 15px;
  height: 1px;
  background: currentColor;
  content: "";
}

.menu-lines::before {
  transform: translateY(-5px);
}

.menu-lines::after {
  transform: translateY(4px);
}

.refresh-button {
  gap: 5px;
  min-width: 82px;
  padding: 0 12px;
  border-bottom: 2px solid #333;
}

.refresh-icon {
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.refresh-icon::after {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2px 0 0 -2px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  content: "";
}

.more-icon {
  letter-spacing: 2px;
}

.play-icon {
  font-size: 13px;
}

.notice {
  width: min(36vw, 590px);
  margin: 0 14px;
  overflow: hidden;
  color: #ff5b62;
  font-size: 13px;
  font-weight: 600;
  line-height: var(--topbar-height);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bell-icon i {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 5px;
  height: 5px;
  background: #ff5b62;
  border-radius: 50%;
}

.account-button {
  min-width: 112px;
  gap: 8px;
  padding: 0 14px;
}

.tabbar {
  position: fixed;
  inset: var(--topbar-height) 0 auto var(--sidebar-width);
  z-index: 28;
  display: flex;
  height: var(--tabbar-height);
  align-items: stretch;
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: left 180ms ease;
}

.tab-edge,
.tab-home,
.tab-menu {
  flex: 0 0 40px;
  width: 40px;
  color: #75808e;
  background: #fff;
  cursor: pointer;
  border-right: 1px solid #f0f1f3;
}

.tab-edge:hover,
.tab-home:hover,
.tab-menu:hover {
  color: var(--primary);
  background: #fafafa;
}

.open-tabs {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.page-tab {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  min-width: 112px;
  max-width: 190px;
  align-items: center;
  gap: 7px;
  padding: 0 9px 0 13px;
  color: #586171;
  cursor: pointer;
  border-right: 1px solid #f0f1f3;
}

.page-tab > span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-tab.active {
  color: #333;
  box-shadow: inset 0 2px 0 var(--primary);
}

.tab-close {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  padding: 0;
  color: #a7afba;
  line-height: 18px;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}

.tab-close:hover {
  color: #fff;
  background: #ff6b6b;
}

.workspace {
  position: fixed;
  inset: calc(var(--topbar-height) + var(--tabbar-height)) 0 0 var(--sidebar-width);
  padding: 15px;
  overflow: auto;
  background: var(--workspace);
  transition: left 180ms ease;
  scrollbar-color: #cfd6dd transparent;
  scrollbar-width: thin;
}

.page-card,
.help-panel {
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(232, 236, 241, 0.75);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.page-header {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  margin: 0;
  color: var(--heading);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}

.page-meta {
  color: #b0b7c1;
  font-size: 12px;
}

.page-body {
  min-height: 220px;
  padding: 15px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 0 0 15px;
}

.button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: #555e6c;
  background: #fff;
  border: 1px solid #dce2e7;
  border-radius: 4px;
  cursor: pointer;
  transition: color 130ms ease, border-color 130ms ease, background 130ms ease;
}

.button:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.button:disabled,
.button:disabled:hover {
  color: #a3aab4;
  background: #f5f6f7;
  border-color: #e2e6ea;
  cursor: not-allowed;
}

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

.button-primary:hover {
  color: #fff;
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.button-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.button-danger:hover {
  color: #fff;
  background: #e64a19;
  border-color: #e64a19;
}

.button-muted {
  color: #697384;
  background: #f7f8fa;
}

.watermark-workspace {
  display: grid;
  grid-template-columns: minmax(440px, 0.92fr) minmax(480px, 1.08fr);
  gap: 20px;
  align-items: start;
}

.watermark-settings,
.watermark-preview-panel {
  min-width: 0;
}

.watermark-status-row,
.watermark-preview-heading,
.watermark-preview-actions,
.watermark-form-actions,
.watermark-logo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.watermark-status-row,
.watermark-preview-heading {
  justify-content: space-between;
  min-height: 40px;
  margin-bottom: 14px;
}

.watermark-enabled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--heading);
  font-weight: 500;
}

.watermark-enabled input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.watermark-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  margin: 0 0 18px;
  background: #f2f4f6;
  border: 1px solid #e4e8ec;
  border-radius: 5px;
}

.watermark-segmented label {
  min-width: 0;
  cursor: pointer;
}

.watermark-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.watermark-segmented span {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  color: #747d89;
  background: transparent;
  border-radius: 3px;
}

.watermark-segmented input:checked + span {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 1px 3px rgba(35, 45, 58, 0.1);
}

.watermark-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
}

.watermark-field,
.watermark-logo-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.watermark-field > span,
.watermark-logo-field > span {
  color: #555e6c;
  font-size: 13px;
}

.watermark-field-wide {
  grid-column: 1 / -1;
}

.watermark-slider-control {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 72px auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
}

.watermark-slider-control input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--primary);
}

.watermark-number {
  text-align: right;
}

.watermark-slider-control small {
  color: var(--muted);
}

.watermark-color-control {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
}

.watermark-color-control input[type="color"] {
  width: 44px;
  height: 38px;
  padding: 3px;
  background: #fff;
  border: 1px solid #e3e7eb;
  border-radius: 4px;
}

.watermark-form-actions {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.watermark-logo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.watermark-logo-preview img {
  width: 86px;
  height: 54px;
  object-fit: contain;
  background: #f2f4f6;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.watermark-logo-empty {
  color: var(--muted);
}

.watermark-logo-actions .button input,
.watermark-preview-actions .button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.watermark-preview-panel {
  position: sticky;
  top: 0;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.watermark-preview-heading h2 {
  margin: 0;
  color: var(--heading);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.watermark-preview-heading span,
.watermark-preview-actions > span {
  color: var(--muted);
  font-size: 12px;
}

.watermark-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #e7ebee;
  border: 1px solid #dce2e7;
  border-radius: 4px;
}

.watermark-preview-actions {
  min-height: 50px;
  padding: 8px 0;
}

.watermark-preview-actions > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watermark-preview-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #727b87;
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.watermark-preview-scope strong {
  color: var(--heading);
  font-weight: 500;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 230px));
  gap: 10px;
  align-items: end;
  margin: 0 0 15px;
}

.form-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 15px 24px;
  max-width: 1320px;
}

.form-layout.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 300px));
  max-width: none;
}

.field {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.filter-bar .field {
  display: block;
}

.field-label {
  padding-top: 9px;
  color: #4e5663;
  line-height: 20px;
  text-align: right;
}

.field-label.required::before {
  margin-right: 4px;
  color: #ff5722;
  content: "*";
}

.control-wrap {
  min-width: 0;
}

.control,
.textarea-control {
  width: 100%;
  color: #424a57;
  background: #fff;
  border: 1px solid #e3e7eb;
  border-radius: 4px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.control {
  height: 38px;
  padding: 0 10px;
}

select.control {
  padding-right: 30px;
  color: #707a88;
}

.textarea-control {
  min-height: 118px;
  padding: 10px;
  resize: vertical;
  line-height: 1.65;
}

.control::placeholder,
.textarea-control::placeholder {
  color: #bcc2ca;
}

.control:focus,
.textarea-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 150, 136, 0.08);
}

.control:disabled {
  color: #9aa2ad;
  background: #f5f6f7;
  cursor: not-allowed;
}

.field-hint {
  margin: 5px 0 0;
  color: #a3aab4;
  font-size: 12px;
  line-height: 1.5;
}

.wide-field,
.form-actions {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 10px;
  padding-left: 124px;
  margin-top: 2px;
}

.shelf-command-form {
  padding: 8px 0 4px;
}

.input-suffix {
  position: relative;
  min-width: 0;
}

.input-suffix .control {
  padding-right: 40px;
}

.input-suffix span {
  position: absolute;
  top: 0;
  right: 12px;
  height: 38px;
  color: #8a929d;
  line-height: 38px;
  pointer-events: none;
}

.switch-field {
  display: flex;
  height: 38px;
  align-items: center;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 23px;
  padding: 0;
  cursor: pointer;
  background: #c5cbd2;
  border-radius: 12px;
  transition: background 150ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  content: "";
  transition: transform 150ms ease;
}

.switch.is-on {
  background: var(--primary);
}

.switch.is-on::after {
  transform: translateX(21px);
}

.tab-strip {
  display: flex;
  gap: 0;
  margin: -2px 0 16px;
  border-bottom: 1px solid var(--line);
}

.inner-tab {
  position: relative;
  min-height: 38px;
  padding: 0 18px;
  color: #697383;
  background: transparent;
  cursor: pointer;
}

.inner-tab.active {
  color: var(--primary);
}

.inner-tab.active::after {
  position: absolute;
  inset: auto 10px -1px;
  height: 2px;
  background: var(--primary);
  content: "";
}

.upload-zone {
  display: flex;
  min-height: 132px;
  align-items: center;
  justify-content: center;
  margin: 0 0 15px;
  padding: 18px;
  color: #8b95a3;
  text-align: center;
  background: #fcfdfd;
  border: 1px dashed #cfd6de;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.upload-zone:hover,
.upload-zone.dragging {
  color: var(--primary);
  background: #f6fbfa;
  border-color: var(--primary);
}

.upload-symbol {
  display: block;
  margin-bottom: 8px;
  color: #9da6b2;
  font-size: 30px;
  line-height: 1;
}

.upload-title {
  color: #5f6876;
  line-height: 24px;
}

.upload-subtitle {
  margin-top: 2px;
  color: #adb4bd;
  font-size: 12px;
}

.table-shell {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.table-toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.table-toolbar-left,
.table-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.table-tool {
  width: 29px;
  height: 28px;
  padding: 0;
  color: #fff;
  font-size: 12px;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
}

.table-tool:hover {
  background: var(--primary-hover);
}

.table-scroll {
  width: 100%;
  overflow: auto;
}

.data-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  table-layout: auto;
  color: #666f7d;
}

.data-table thead {
  background: #fafafa;
}

.data-table th,
.data-table td {
  min-width: 118px;
  padding: 11px 13px;
  text-align: left;
  white-space: nowrap;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.data-table th {
  height: 45px;
  color: #4e5662;
  font-weight: 600;
}

.data-table td {
  height: 53px;
}

.data-table th:first-child,
.data-table td:first-child {
  min-width: 46px;
  width: 46px;
  text-align: center;
}

.data-table th:last-child,
.data-table td:last-child {
  border-right: 0;
}

.data-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.status-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  color: #fff;
  font-size: 12px;
  background: var(--active);
  border-radius: 3px;
}

.status-pill.waiting {
  background: #9aa3af;
}

.status-pill.warning {
  background: var(--warning);
}

.status-pill.info {
  background: var(--info);
}

.cell-action {
  padding: 0;
  color: var(--primary);
  background: transparent;
  cursor: pointer;
}

.cell-action + .cell-action {
  margin-left: 10px;
}

.cell-action.danger {
  color: var(--danger);
}

.cell-action.primary {
  font-weight: 600;
}

.cell-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cell-actions .cell-action + .cell-action {
  margin-left: 0;
}

.empty-table {
  height: 112px !important;
  color: #929ba8;
  text-align: center !important;
}

.live-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 180px)) minmax(180px, 1fr);
  min-height: 68px;
  align-items: center;
  margin: -15px -15px 15px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.summary-metric {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 9px;
}

.summary-metric span {
  overflow: hidden;
  color: #8b94a1;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-metric strong {
  color: #333b47;
  font-size: 22px;
  font-weight: 500;
}

.connection-state {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  color: #9aa2ad;
  font-size: 12px;
}

.connection-state i {
  width: 7px;
  height: 7px;
  background: #a6aeb8;
  border-radius: 50%;
}

.connection-state.connected {
  color: #438b66;
}

.connection-state.connected i {
  background: var(--active);
  box-shadow: 0 0 0 3px rgba(95, 184, 120, 0.13);
}

.live-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  color: #66707d;
  background: #f7faf9;
  border-left: 3px solid var(--primary);
}

.live-notice.error {
  color: #b24432;
  background: #fff7f5;
  border-left-color: var(--danger);
}

.live-filter {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(150px, 210px) auto auto;
  gap: 9px;
  align-items: center;
  margin-bottom: 15px;
}

.task-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) repeat(4, auto);
}

.pairing-panel {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 0 0 15px;
  padding: 13px 15px;
  background: #f7faf9;
  border: 1px solid #dbe9e5;
  border-radius: 4px;
}

.pairing-panel span,
.pairing-panel small {
  color: #697481;
}

.pairing-panel strong {
  color: var(--primary);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 2px;
}

.pairing-panel small {
  justify-self: end;
  font-size: 12px;
}

.task-command-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.task-command-bar label {
  display: grid;
  width: min(360px, 100%);
  gap: 6px;
  color: #687280;
  font-size: 12px;
}

.draft-command-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 15px;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--line);
}

.draft-command-form > label,
.draft-command-form > .draft-image-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #687280;
  font-size: 12px;
}

.draft-form-heading {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  gap: 10px;
}

.draft-form-heading h2 {
  margin: 0;
  color: #333b47;
  font-size: 15px;
  font-weight: 600;
}

.draft-form-heading span {
  color: #9199a4;
  font-size: 12px;
}

.draft-description-field {
  grid-column: 1 / 3;
}

.draft-description-field .textarea-control {
  min-height: 88px;
}

.draft-image-field {
  grid-column: 1 / 3;
}

.draft-image-picker {
  position: relative;
  display: block;
  width: min(100%, 520px);
  min-height: 132px;
  overflow: hidden;
  border: 1px dashed #cbd1d8;
  border-radius: 4px;
  background: #fafbfc;
  cursor: pointer;
}

.draft-image-picker:focus-within,
.draft-image-picker:not(.has-image):hover {
  border-color: var(--primary);
  background: #f6fbfa;
}

.draft-image-picker.has-image {
  cursor: default;
}

.draft-image-picker > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.draft-image-empty {
  display: grid;
  min-height: 132px;
  place-content: center;
  gap: 3px;
  color: #687280;
  text-align: center;
}

.draft-image-empty strong {
  color: #9da6b2;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.draft-image-empty small {
  color: #a1a9b3;
  font-size: 11px;
}

.draft-image-preview {
  position: relative;
  display: grid;
  min-height: 132px;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-right: 48px;
}

.draft-image-preview img {
  width: 132px;
  height: 132px;
  object-fit: cover;
}

.draft-image-remove {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #525b67;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.image-replace-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  overflow: hidden;
  border: 1px solid #c7ced7;
  border-radius: 4px;
  color: #4f5967;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.image-replace-button:hover,
.image-replace-button:focus-within {
  border-color: var(--primary);
  color: var(--primary);
}

.image-replace-button > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.draft-image-status {
  color: var(--primary);
  font-size: 12px;
}

.draft-image-status.failed {
  color: #d84a3a;
}

.draft-form-actions {
  display: flex;
  align-items: flex-end;
  align-self: stretch;
}

.live-device-table,
.live-task-table {
  min-width: 1300px;
}

.live-device-table code {
  color: #697483;
  font-size: 12px;
}

.live-task-table .task-note {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-toolbar {
  grid-template-columns: minmax(220px, 1fr) minmax(210px, 320px) repeat(5, auto);
}

.product-toolbar [data-product-action="dispatch-selected"],
.product-toolbar [data-product-action="publish-selected"] {
  white-space: nowrap;
}

.product-form-actions {
  gap: 8px;
}

.product-watermark-control {
  position: relative;
  display: flex;
  height: 38px;
  align-items: center;
  gap: 9px;
}

.product-watermark-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.product-watermark-track {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 44px;
  cursor: pointer;
  background: #b9c0c8;
  border-radius: 12px;
  transition: background 150ms ease;
}

.product-watermark-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(31, 45, 61, 0.25);
  content: "";
  transition: transform 150ms ease;
}

.product-watermark-control input:checked + .product-watermark-track {
  background: var(--primary);
}

.product-watermark-control input:checked + .product-watermark-track::after {
  transform: translateX(20px);
}

.product-watermark-control input:focus-visible + .product-watermark-track {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, white);
  outline-offset: 2px;
}

.product-watermark-control strong {
  color: #5f6975;
  font-size: 13px;
  font-weight: 600;
}

.tag-pool-preview {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 5px;
  padding: 8px 10px;
  border-left: 3px solid var(--primary);
  background: #f6fbfa;
}

.tag-pool-preview span {
  color: #7a8491;
  font-size: 12px;
}

.tag-pool-preview strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
}

.description-pool-preview {
  display: grid;
  grid-column: 1 / -1;
  min-width: 0;
  gap: 5px;
  padding: 8px 10px;
  border-left: 3px solid #d89526;
  background: #fff9ed;
}

.description-pool-preview span {
  color: #7a8491;
  font-size: 12px;
}

.description-pool-preview strong {
  max-height: 144px;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
}

.product-direct-tags-field {
  display: grid;
  grid-column: 1 / -1;
  min-width: 0;
  gap: 6px;
  color: #687280;
  font-size: 12px;
}

.product-tag-input-shell {
  display: flex;
  min-height: 42px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border: 1px solid #d7dce2;
  background: #fff;
}

.product-tag-input-shell:focus-within {
  border-color: var(--primary);
}

.product-tag-input-shell .control {
  width: auto;
  min-width: 150px;
  height: 30px;
  flex: 1 1 180px;
  padding: 0 6px;
  border: 0;
  box-shadow: none;
}

.product-tag-input-shell > button {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border: 1px solid var(--primary);
  border-radius: 3px;
  color: var(--primary);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.product-tag-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 4px;
  padding: 0 5px 0 8px;
  border-radius: 3px;
  color: #276d55;
  background: #edf7f4;
  font-size: 12px;
}

.product-tag-chip button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  color: #658076;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
}

.tag-pool-editor {
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
}

.description-pool-editor {
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
}

.tag-pool-items-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.description-pool-items-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
}

.tag-pool-items-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.description-pool-count {
  margin-left: auto;
  color: #7a8491;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tag-pool-item-row {
  display: grid;
  grid-template-columns: 30px minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.description-pool-item-row {
  display: grid;
  grid-template-columns: 30px minmax(240px, 1fr) auto auto;
  align-items: start;
  gap: 8px;
}

.description-pool-item-row .tag-pool-position,
.description-pool-item-row .tag-pool-enabled,
.description-pool-item-row .tag-pool-item-actions {
  margin-top: 6px;
}

.description-pool-item-row .textarea-control {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  overflow-wrap: anywhere;
}

.tag-pool-position {
  color: #7a8491;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.tag-pool-enabled {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tag-pool-item-actions {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  gap: 4px;
}

.tag-pool-item-actions button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.tag-pool-item-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}

.tag-pool-table-tags {
  display: flex;
  max-width: 520px;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.tag-pool-table-tags span {
  color: #276d55;
  font-size: 12px;
}

.tag-pool-table-tags span.disabled {
  color: #9aa2ad;
  text-decoration: line-through;
}

.description-pool-table {
  min-width: 860px;
}

.description-pool-table-items {
  display: grid;
  max-width: 680px;
  gap: 6px;
}

.description-pool-table-items span {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.5;
}

.description-pool-table-items span.disabled {
  color: #9aa2ad;
  text-decoration: line-through;
}

.product-table {
  min-width: 1510px;
}

.product-table .product-select-column {
  position: sticky;
  z-index: 3;
  left: 0;
  min-width: 46px;
  width: 46px;
  background: #fff;
}

.product-table thead .product-select-column {
  z-index: 5;
  background: #fafafa;
}

.product-table .product-actions-column {
  position: sticky;
  z-index: 3;
  left: 46px;
  min-width: 190px;
  width: 190px;
  background: #fff;
  box-shadow: 4px 0 8px rgba(31, 45, 61, 0.06);
}

.product-table thead .product-actions-column {
  z-index: 5;
  background: #fafafa;
}

.product-row-actions {
  max-width: 166px;
  flex-wrap: wrap;
  gap: 5px 9px;
}

.product-table .product-name-column {
  min-width: 230px;
  width: 230px;
}

.product-table .product-tags-column {
  min-width: 180px;
  width: 180px;
}

.product-tags-cell {
  display: grid;
  max-width: 180px;
  gap: 4px;
  white-space: normal;
}

.product-tags-cell small {
  color: #8993a0;
  font-size: 11px;
}

.product-tags-cell span {
  display: -webkit-box;
  overflow: hidden;
  color: #276d55;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-table .product-price-column,
.product-table .product-images-column,
.product-table .product-watermark-column {
  min-width: 76px;
  width: 76px;
}

.product-watermark-status {
  display: inline-flex;
  min-width: 44px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: #707985;
  background: #eef0f2;
  border-radius: 4px;
  font-size: 12px;
}

.product-watermark-status.enabled {
  color: #117b69;
  background: #e4f4ef;
}

.product-table .product-shipping-column,
.product-table .product-group-column {
  min-width: 96px;
  width: 96px;
}

.product-table .product-address-column {
  min-width: 170px;
  width: 170px;
}

.product-table .product-updated-column {
  min-width: 150px;
  width: 150px;
}

.table-subline {
  display: block;
  margin-top: 3px;
  color: #8a94a1;
  font-size: 11px;
  line-height: 1.35;
}

.shipping-mode-field {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
  min-height: 38px;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid var(--line);
}

.shipping-mode-field legend {
  padding: 0 4px;
  color: #687280;
  font-size: 12px;
}

.shipping-mode-field label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3e4651;
  font-size: 13px;
}

.address-device-bar {
  display: flex;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.address-device-bar label {
  display: grid;
  width: min(420px, 100%);
  gap: 6px;
  color: #687280;
  font-size: 12px;
}

.address-editor {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.product-title-cell {
  display: flex;
  min-width: 230px;
  align-items: center;
  gap: 10px;
}

.product-title-cell > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.product-title-cell strong {
  overflow: hidden;
  max-width: 260px;
  color: #333b47;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-title-cell small {
  color: #9aa2ad;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.product-table-thumb {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  object-fit: cover;
}

.product-table-thumb.empty {
  color: #a0a8b2;
  background: #f6f7f8;
  font-size: 11px;
}

.product-description {
  min-width: 200px !important;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-image-manager {
  display: grid;
  gap: 8px;
}

.product-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  width: min(100%, 880px);
}

.product-image-tile,
.product-image-add {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d7dce2;
  border-radius: 4px;
  background: #fafbfc;
}

.product-image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-order {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 22px;
  padding: 3px 6px;
  border-radius: 3px;
  color: #fff;
  background: rgb(32 38 46 / 78%);
  text-align: center;
  font-size: 11px;
}

.product-image-actions {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 30px 30px 1fr 30px;
  min-height: 32px;
  background: rgb(32 38 46 / 82%);
}

.product-image-actions button,
.product-image-actions label {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.product-image-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}

.product-image-actions input,
.product-image-add input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.product-image-add {
  display: grid;
  min-height: 148px;
  place-content: center;
  gap: 4px;
  border-style: dashed;
  color: #687280;
  cursor: pointer;
  text-align: center;
}

.product-image-add:hover,
.product-image-add:focus-within {
  border-color: var(--primary);
  color: var(--primary);
  background: #f6fbfa;
}

.product-image-add strong {
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.product-image-add small {
  color: #9ca5b0;
  font-size: 10px;
}

.collection-form {
  margin-bottom: 18px;
}

.collection-form .wide-field {
  grid-column: 1 / -1;
}

.collection-form .wide-field .textarea-control {
  min-height: 150px;
  resize: vertical;
}

.collection-checkbox {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  color: #606a77;
}

.collection-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.collection-results {
  margin-bottom: 18px;
}

.collection-results-heading {
  display: flex;
  min-height: 42px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.collection-result-actions {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.collection-results-heading h2 {
  margin: 0;
  color: #3f4854;
  font-size: 14px;
  font-weight: 500;
}

.collection-result-table {
  min-width: 1180px;
}

.collection-result-table td:nth-child(3) {
  min-width: 260px;
  white-space: normal;
}

.collection-description {
  display: -webkit-box;
  max-width: 420px;
  margin-top: 5px;
  overflow: hidden;
  color: #8b94a1;
  font-size: 12px;
  line-height: 18px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.collection-source-link {
  color: var(--primary);
}

.collection-task-shell {
  margin-top: 0;
}

.collection-edit-fields {
  display: grid;
  min-width: 360px;
  gap: 8px;
}

.collection-edit-fields .textarea-control {
  min-height: 104px;
  resize: vertical;
}

.collection-price-input {
  width: 112px;
}

.collection-result-table td:last-child {
  min-width: 190px;
}

.collection-progress-summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.collection-progress-summary strong {
  color: #333b47;
  font-size: 22px;
  font-weight: 500;
}

.collection-progress-summary .button:first-of-type {
  margin-left: auto;
}

.collection-task-table {
  min-width: 1280px;
}

.collection-task-table tr.is-active {
  background: #f7faf9;
}

.collection-task-table .collection-inline-result-row,
.collection-task-table .collection-inline-result-row:hover {
  background: #fbfcfd;
}

.collection-inline-result-row > td {
  padding: 10px 14px 16px;
  border-bottom: 2px solid #dfe5e8;
}

.collection-inline-result-row .collection-results {
  margin: 0;
}

.collection-source {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-action:disabled {
  color: #a3aab4;
  cursor: default;
}

.empty-cell {
  height: 78px !important;
  color: #a7aeb7;
  text-align: center !important;
}

.pagination {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 10px;
  color: #929aa6;
  border-top: 1px solid var(--line);
}

.page-button {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  color: #66707f;
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 3px;
  cursor: pointer;
}

.page-button.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.content-sections {
  max-width: 1280px;
}

.content-section {
  padding: 3px 0 17px;
  border-bottom: 1px solid #f0f2f4;
}

.content-section:last-child {
  border-bottom: 0;
}

.content-section h2 {
  margin: 0 0 9px;
  color: #434b58;
  font-size: 14px;
  font-weight: 600;
}

.content-section p,
.help-item p {
  margin: 0;
  color: #687281;
  line-height: 1.9;
}

.content-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 10px 26px;
}

.content-list .content-section {
  min-height: 72px;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.video-item {
  position: relative;
  min-height: 166px;
  overflow: hidden;
  color: #fff;
  cursor: pointer;
  background: #313742;
  border-radius: 5px;
}

.video-item::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(0, 150, 136, 0.35), transparent 50%), repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 8px);
  content: "";
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: translate(-50%, -58%);
}

.video-label {
  position: absolute;
  inset: auto 0 0;
  padding: 12px 14px;
  background: rgba(18, 22, 28, 0.72);
}

.help-panel {
  margin-top: 15px;
  padding: 16px 22px 18px;
  color: #5f6978;
  font-size: 13.5px;
}

.help-panel h2 {
  margin: 0 0 8px;
  color: #505966;
  font-size: 14px;
  font-weight: 600;
}

.help-items {
  display: grid;
  gap: 4px;
}

.help-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 28px;
}

.help-index {
  flex: 0 0 auto;
  min-width: 22px;
  height: 20px;
  margin-top: 3px;
  padding: 0 5px;
  color: #77818f;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  background: #f0f2f5;
  border-radius: 2px;
}

.route-loading,
.route-error {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  color: #9aa2ae;
  background: #fff;
  border-radius: 6px;
}

.toast-stack {
  position: fixed;
  top: 62px;
  right: 18px;
  z-index: 100;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 11px 14px;
  color: #fff;
  line-height: 1.5;
  background: rgba(49, 55, 66, 0.94);
  border-radius: 4px;
  box-shadow: 0 6px 22px rgba(22, 29, 39, 0.18);
  animation: toast-in 180ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(21, 26, 33, 0.38);
}

.modal-layer[hidden] {
  display: none;
}

.modal {
  width: min(480px, 100%);
  overflow: hidden;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 18px 50px rgba(21, 28, 38, 0.22);
}

.modal-header {
  display: flex;
  height: 47px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  color: #3f4652;
  font-size: 14px;
  font-weight: 500;
}

.modal-close {
  width: 30px;
  height: 30px;
  color: #8f98a5;
  font-size: 21px;
  background: transparent;
  cursor: pointer;
}

.modal-body {
  min-height: 92px;
  padding: 20px;
  color: #606a78;
  line-height: 1.8;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 11px 15px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
}

.published-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 14px;
}

.published-edit-form > label:not(.published-edit-preserve) {
  display: grid;
  gap: 6px;
  color: #505966;
  font-size: 13px;
}

.published-edit-description,
.published-edit-preserve {
  grid-column: 1 / -1;
}

.published-edit-preserve {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #505966;
  font-size: 13px;
}

.published-edit-description .textarea-control {
  min-height: 112px;
  resize: vertical;
}

.published-edit-description .textarea-control:disabled {
  color: #9aa3ae;
  background: #f4f6f8;
}

.sidebar-backdrop {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar {
  width: var(--sidebar-compact);
}

.app-shell.sidebar-collapsed .topbar,
.app-shell.sidebar-collapsed .tabbar,
.app-shell.sidebar-collapsed .workspace {
  left: var(--sidebar-compact);
}

.app-shell.sidebar-collapsed .brand {
  padding: 0 18px;
}

.app-shell.sidebar-collapsed .brand img {
  margin: 0;
}

.app-shell.sidebar-collapsed .brand span,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-chevron,
.app-shell.sidebar-collapsed .nav-children {
  display: none;
}

.app-shell.sidebar-collapsed .nav-section summary,
.app-shell.sidebar-collapsed .nav-item {
  width: 46px;
  margin-inline: 8px;
  padding: 7px 14px;
}

.app-shell.sidebar-collapsed .nav-icon {
  left: 14px;
}

@media (max-width: 1380px) {
  .notice {
    width: 330px;
  }

  .topbar-right .icon-button:nth-child(2),
  .topbar-right .icon-button:nth-child(3),
  .topbar-right .icon-button:nth-child(4) {
    display: none;
  }
}

@media (max-width: 1080px) {
  .notice {
    display: none;
  }

  .form-layout {
    grid-template-columns: 1fr;
  }

  .draft-command-form {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 230px);
  }

  .tag-pool-editor {
    grid-template-columns: 1fr;
  }

  .description-pool-editor {
    grid-template-columns: 1fr;
  }

  .product-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px) auto;
  }

  .draft-description-field,
  .draft-image-field,
  .draft-form-actions {
    grid-column: 1 / -1;
  }

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

  .connection-state {
    grid-column: 1 / -1;
    justify-self: start;
    padding-bottom: 12px;
  }

  .watermark-workspace {
    grid-template-columns: 1fr;
  }

  .watermark-preview-panel {
    position: static;
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .watermark-fields {
    grid-template-columns: 1fr;
  }

  .watermark-field-wide {
    grid-column: auto;
  }

  .watermark-slider-control {
    grid-template-columns: minmax(80px, 1fr) 68px auto;
  }

  .watermark-preview-actions > span {
    flex-basis: 100%;
  }
  .page-header {
    align-items: flex-start;
    gap: 8px;
    padding: 11px 12px;
  }

  .page-header h1 {
    min-width: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .page-meta {
    flex: 0 0 auto;
    padding-top: 1px;
    white-space: nowrap;
  }

  .sidebar {
    width: min(280px, 82vw);
    transform: translateX(-100%);
  }

  .app-shell.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    justify-content: flex-start;
    padding-left: 26px;
  }

  .nav-section summary,
  .nav-item,
  .nav-child {
    width: calc(min(280px, 82vw) - 16px);
  }

  .topbar,
  .tabbar,
  .workspace,
  .app-shell.sidebar-collapsed .topbar,
  .app-shell.sidebar-collapsed .tabbar,
  .app-shell.sidebar-collapsed .workspace {
    left: 0;
  }

  .topbar-right .icon-button,
  .refresh-button,
  .more-icon,
  .play-icon {
    display: none;
  }

  .account-button {
    min-width: 104px;
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace {
    padding: 10px;
  }

  .page-body {
    padding: 12px;
  }

  .filter-bar,
  .form-layout,
  .form-layout.compact,
  .draft-command-form {
    grid-template-columns: 1fr;
  }

  .draft-command-form > *,
  .draft-description-field,
  .draft-image-field,
  .draft-form-actions {
    grid-column: 1;
  }

  .tag-pool-item-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .description-pool-item-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .tag-pool-enabled,
  .tag-pool-item-actions {
    grid-column: 2;
  }

  .description-pool-item-row .tag-pool-enabled,
  .description-pool-item-row .tag-pool-item-actions {
    grid-column: 2;
    margin-top: 0;
  }

  .draft-form-heading {
    display: grid;
    gap: 3px;
  }

  .live-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 12px;
  }

  .summary-metric {
    display: grid;
    gap: 2px;
  }

  .summary-metric strong {
    font-size: 18px;
  }

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

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

  .product-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .product-toolbar [data-product-action="dispatch-selected"],
  .product-toolbar [data-product-action="publish-selected"] {
    grid-column: 1 / -1;
  }

  .live-filter .control {
    grid-column: 1 / -1;
  }

  .pairing-panel {
    grid-template-columns: auto 1fr;
  }

  .pairing-panel small {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .field {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .field-label {
    padding-top: 0;
    text-align: left;
  }

  .collection-form .wide-field {
    grid-column: 1;
  }

  .form-actions {
    padding-left: 0;
  }

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

  .table-toolbar {
    align-items: flex-start;
  }

  .help-panel {
    padding: 14px;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    visibility: hidden;
    padding: 0;
    background: rgba(17, 21, 27, 0.38);
    opacity: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .app-shell.mobile-sidebar-open .sidebar-backdrop {
    visibility: visible;
    opacity: 1;
  }
}
