:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --line: #e2e5ea;
  --line-strong: #c8ced7;
  --text: #15181e;
  --muted: #68707d;
  --subtle: #8a93a1;
  --brand: #781b1f;
  --brand-dark: #5f1518;
  --brand-soft: #f6eaeb;
  --teal: #0f766e;
  --teal-soft: #e8f5f3;
  --amber: #a16207;
  --amber-soft: #fff7e6;
  --danger: #c2413b;
  --danger-soft: #fff0ef;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei UI", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(120, 27, 31, 0.14);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 17px;
  line-height: 1.1;
}

.brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 5px;
  margin-top: 16px;
}

.nav-group {
  display: grid;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.nav.active,
.nav:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-parent {
  font-weight: 600;
  color: var(--text);
}

.nav-chevron {
  font-size: 20px;
  line-height: 1;
  transition: transform 160ms ease;
}

.nav-children {
  display: none;
  gap: 3px;
  padding: 3px 0 4px 12px;
}

.nav-group.open .nav-children {
  display: grid;
}

.nav-group.open .nav-chevron {
  transform: rotate(90deg);
}

.nav-child {
  min-height: 36px;
  padding-left: 22px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.nav-leaf {
  font-weight: 600;
  color: var(--text);
}

.nav.active .nav-leaf,
.nav-leaf.active {
  color: var(--brand);
}

.main {
  min-width: 0;
  padding: 22px 26px 34px;
}

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

.page-heading {
  min-width: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 25px;
  line-height: 1.2;
}

h2 {
  font-size: 16px;
  line-height: 1.3;
}

p {
  margin-top: 5px;
  color: var(--muted);
}

.top-actions,
.actions,
.inline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 14px;
}

[hidden] {
  display: none !important;
}

.notice {
  min-height: 30px;
  margin-bottom: 12px;
  padding: 0 2px;
  color: var(--muted);
}

.notice:empty {
  display: none;
}

.notice.error {
  color: var(--danger);
}

.notice.success {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  width: fit-content;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid #b7ddce;
  border-radius: 8px;
  color: #067647;
  background: #f2faf7;
  font-weight: 800;
}

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

.metrics.five {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.metrics.four {
  grid-template-columns: repeat(4, minmax(148px, 1fr));
}

.metric,
.panel,
.table-wrap,
.list-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  min-height: 104px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
}

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

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  line-height: 1;
}

.panel {
  padding: 18px;
}

.compact-panel {
  padding: 14px 16px;
}

.action-panel,
.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.panel-header {
  margin-bottom: 16px;
}

.panel-header.tight {
  margin-bottom: 10px;
}

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

.subpanel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.step {
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-weight: 750;
}

.step.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.section-title {
  margin: 4px 0 -2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

.field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.field.compact {
  width: 210px;
}

.field.wide {
  grid-column: span 2;
}

.field.grow {
  flex: 1 1 260px;
}

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

.input.mini {
  width: 92px;
}

.filter-grid,
.form-grid,
.settings-grid {
  display: grid;
  gap: 12px;
}

.filter-grid {
  grid-template-columns: minmax(240px, 2fr) repeat(5, minmax(132px, 1fr));
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.form-grid.three,
.settings-grid {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.btn,
.input,
select,
.textarea {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 88px;
  padding: 0 14px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 4px 12px rgba(120, 27, 31, 0.08);
}

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

.btn.primary:hover {
  color: #fff;
  background: var(--brand-dark);
}

.btn.tiny {
  min-width: 56px;
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.input,
select {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  outline: none;
}

.textarea {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
}

.input:focus,
select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(120, 27, 31, 0.11);
}

.table-wrap {
  overflow: auto;
  box-shadow: var(--shadow);
}

.table-empty {
  line-height: 1.7;
  white-space: pre-line;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #4a5360;
  background: #f7f8fa;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

td {
  color: #252a32;
  font-size: 13px;
}

tbody tr:hover {
  background: #fbf7f7;
}

tbody tr.danger-row {
  background: var(--danger-soft);
}

.check-col {
  width: 42px;
}

.order-id {
  display: block;
  max-width: 150px;
  color: #111827;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tracking {
  max-width: 150px;
  overflow-wrap: anywhere;
}

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

.list-item {
  padding: 14px 15px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
}

.list-item strong {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

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

.item-line strong {
  margin-bottom: 0;
}

.list-item .body-text {
  color: #2e3440;
  white-space: pre-wrap;
}

.template-library {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.template-sidebar {
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 140px);
  padding: 12px;
}

.template-sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.template-sidebar-header .btn {
  flex: 0 0 auto;
}

.template-sidebar-header h2 {
  margin: 0;
}

.template-sidebar-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.template-tree,
.template-folder,
.template-folder-children,
.template-workspace {
  display: grid;
  gap: 6px;
}

.template-tree {
  margin-top: 14px;
}

.template-folder-button,
.template-conversation {
  display: grid;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 7px;
  color: #374151;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.template-folder-button {
  grid-template-columns: minmax(0, 1fr) 28px 28px;
  gap: 8px;
  min-height: 36px;
  padding: 0 8px;
}

.template-folder-button > button,
.template-conversation > button {
  min-width: 0;
  min-height: 30px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.template-folder-button .folder-action,
.template-conversation .folder-action {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 5px;
  font-size: 16px;
}

.template-folder-button .folder-action:hover,
.template-conversation .folder-action:hover {
  background: #fff;
}

.folder-mark {
  width: 14px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.template-folder-children {
  padding-left: 18px;
}

.template-conversation {
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px;
  min-height: 32px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 13px;
}

.template-conversation > button:first-child {
  grid-template-columns: minmax(0, 1fr) auto;
}

.template-folder-button:hover,
.template-folder-button.active,
.template-conversation:hover,
.template-conversation.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.template-empty {
  padding: 12px 8px;
  color: var(--muted);
  font-size: 13px;
}

.template-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.template-card[draggable="true"] {
  cursor: grab;
}

.template-card[draggable="true"]:active {
  cursor: grabbing;
}

.template-path {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.multi-select {
  position: relative;
  min-width: 0;
}

.multi-select summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  list-style: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select summary::-webkit-details-marker {
  display: none;
}

.multi-select summary::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-left: auto;
  margin-right: 3px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}

.multi-select[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.multi-select-menu {
  position: absolute;
  z-index: 12;
  top: calc(100% + 4px);
  left: 0;
  width: max(100%, 220px);
  max-height: 280px;
  padding: 6px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.multi-select-menu label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
}

.multi-select-menu label:hover {
  background: #f5f6f8;
}

.delivery-range-field {
  min-width: 300px;
}

.delivery-range {
  position: relative;
  min-height: 54px;
  padding-top: 12px;
}

.delivery-range-track {
  position: absolute;
  top: 18px;
  left: 7px;
  right: 7px;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(to right, #e5e7eb 0 var(--delivery-range-start, 0%), var(--brand) var(--delivery-range-start, 0%) var(--delivery-range-end, 100%), #e5e7eb var(--delivery-range-end, 100%) 100%);
}

.delivery-range input[type="range"] {
  position: absolute;
  top: 8px;
  left: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  pointer-events: none;
  appearance: none;
  background: transparent;
}

.delivery-range input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  pointer-events: auto;
  appearance: none;
  cursor: grab;
}

.delivery-range-marks {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.creator-selection-bar .inline-controls {
  justify-content: flex-end;
}

.creator-selection-bar .field {
  width: 150px;
}

.template-cascade {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr) auto minmax(150px, 1.2fr);
  align-items: center;
  gap: 7px;
}

.template-cascade > span {
  color: var(--brand);
  font-size: 22px;
  font-weight: 700;
}

.file-import-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

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

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill,
.badge.neutral {
  color: #4d5562;
  background: #f0f2f5;
}

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

.badge.warning {
  color: var(--amber);
  background: var(--amber-soft);
}

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

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

button.danger:hover {
  background: #b91c1c;
}

button.small {
  padding: 4px 12px;
  font-size: 12px;
}

.shop-actions {
  margin-top: 0;
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

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

.shop-card-main {
  min-width: 0;
}

.shop-card .danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  min-height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  white-space: nowrap;
}

.scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.scope-list.tight {
  margin-top: 6px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.status-item span {
  color: var(--muted);
}

.status-item strong {
  font-size: 12px;
}

.status-item strong.ok {
  color: var(--teal);
}

.status-item strong.waiting {
  color: var(--amber);
}

.progress {
  width: 180px;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f3;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--teal));
}

.username-resolver-upload {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.username-resolver-upload .btn {
  min-height: 42px;
}

.username-resolver-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #eef0f3;
}

.username-resolver-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--brand);
  transition: width 180ms ease;
}

.username-resolver-metrics {
  margin-top: 16px;
}

.username-resolver-note {
  margin-top: 16px;
}

.creator-table {
  min-width: 1380px;
}

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

.affiliate-profile-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.affiliate-profile-card strong,
.affiliate-profile-card span,
.affiliate-profile-card small {
  display: block;
  min-width: 0;
}

.affiliate-profile-card span,
.affiliate-profile-card small {
  color: var(--muted);
}

.affiliate-profile-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.affiliate-profile-metrics span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.affiliate-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.affiliate-product-card,
.affiliate-info-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.affiliate-product-copy,
.affiliate-product-copy strong,
.affiliate-product-copy span,
.affiliate-product-copy small,
.affiliate-info-card strong,
.affiliate-info-card span,
.affiliate-info-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.affiliate-product-copy strong,
.affiliate-info-card strong {
  display: block;
}

.affiliate-product-copy span,
.affiliate-product-copy small,
.affiliate-info-card span,
.affiliate-info-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.affiliate-card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.avatar-name,
.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.avatar,
.product-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
}

.product-thumb.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

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

.product-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 100px 100px 80px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .48);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  gap: 14px;
  padding: 20px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-table {
  max-height: 520px;
  box-shadow: none;
}

.creator-item label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.text-link {
  color: var(--brand);
  font-weight: 700;
}

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

.customer-service-status-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.customer-service-status-card > div {
  min-height: 72px;
  padding: 13px 15px;
  background: #fff;
}

.customer-service-status-card strong,
.customer-service-status-card span {
  display: block;
}

.customer-service-status-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.customer-service-status-card.error {
  border-color: #efc7c5;
  background: #efc7c5;
}

.customer-review-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #b9dcd6;
  border-left: 4px solid #008f7f;
  border-radius: 6px;
  background: #eef9f7;
}

.customer-review-banner strong {
  flex: 0 0 auto;
  color: #006f63;
}

.customer-review-banner span {
  color: #365a55;
  font-size: 13px;
}

.customer-service-layout {
  min-height: min(680px, calc(100vh - 260px));
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr) minmax(280px, 360px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.creator-service-layout {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
}

.checkbox-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 66px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
}

.content-ai-field {
  align-self: end;
  min-height: 72px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.content-ai-field span {
  display: grid;
  gap: 4px;
}

.content-ai-field strong {
  color: var(--text);
  font-size: 13px;
}

.content-ai-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.customer-conversation-panel,
.customer-context-panel {
  min-width: 0;
  background: var(--surface-soft);
}

.customer-conversation-panel {
  border-right: 1px solid var(--line);
}

.customer-conversation-search {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.customer-conversations {
  height: 100%;
  max-height: none;
  overflow: auto;
}

.customer-conversation {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.customer-conversation:hover,
.customer-conversation.active {
  background: var(--brand-soft);
}

.customer-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}

.customer-conversation-copy,
.customer-conversation-copy strong,
.customer-conversation-copy span,
.customer-conversation-copy small {
  min-width: 0;
  display: block;
}

.customer-conversation-copy span,
.customer-conversation-copy small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-conversation-copy small {
  margin-top: 4px;
  font-size: 11px;
}

.customer-unread {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-size: 11px;
}

.customer-conversation-empty,
.customer-chat-empty {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.customer-chat-panel {
  min-width: 0;
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(360px, 1fr) auto;
}

.customer-chat-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.customer-chat-header strong,
.customer-chat-header span {
  display: block;
}

.customer-chat-header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.customer-messages {
  min-height: 360px;
  max-height: none;
  padding: 18px;
  overflow: auto;
  background: #f7f8fa;
}

.customer-message-row {
  display: flex;
  margin-bottom: 13px;
}

.customer-message-row.outbound {
  justify-content: flex-end;
}

.customer-message-bubble {
  max-width: min(76%, 680px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow-wrap: anywhere;
}

.customer-message-row.outbound .customer-message-bubble {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.customer-message-bubble.failed {
  color: var(--danger);
  border-color: #efc7c5;
  background: var(--danger-soft);
}

.customer-message-bubble small,
.customer-message-error {
  display: block;
  margin-top: 6px;
  opacity: .75;
  font-size: 11px;
}

.customer-message-error {
  opacity: 1;
  font-weight: 700;
}

.customer-composer {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.customer-composer .textarea {
  min-height: 100px;
  resize: vertical;
}

.customer-composer-tools,
.customer-composer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.customer-composer-tools .field {
  min-width: 220px;
  margin: 0;
}

.customer-composer-tools .btn,
.customer-composer-footer .btn {
  flex: 0 0 auto;
}

.customer-context-panel {
  padding: 16px;
  border-left: 1px solid var(--line);
}

.customer-context-heading {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.customer-context-list {
  margin: 0;
}

.customer-context-list > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.customer-context-list dt {
  color: var(--muted);
  font-size: 12px;
}

.customer-context-list dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.customer-context-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
}

.customer-context-tab {
  height: 34px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.customer-context-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.customer-context-note,
.customer-context-empty {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.customer-context-note {
  color: var(--danger);
  border-color: #efc7c5;
  background: var(--danger-soft);
}

.customer-context-card {
  display: grid;
  gap: 12px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-context-card.featured {
  border-color: #dce8e6;
}

.customer-context-card h4 {
  margin: 0;
  font-size: 14px;
}

.customer-side-product {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.customer-side-product .product-thumb {
  width: 58px;
  height: 58px;
}

.customer-side-product strong,
.customer-side-product span,
.customer-side-product small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-side-product strong {
  font-size: 13px;
  line-height: 1.35;
}

.customer-side-product span,
.customer-side-product small {
  color: var(--muted);
  font-size: 12px;
}

.customer-context-list.compact > div {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
}

.customer-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.video-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
}

.content-channel-status {
  display: grid;
}

.content-channel-status-copy {
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid #b7ddce;
  border-radius: 8px;
  background: #f2faf7;
}

.content-channel-status-copy strong,
.content-channel-status-copy span {
  display: block;
}

.content-channel-status-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.channel-shop-analytics,
.channel-shop-group {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.channel-shop-analytics-head,
.channel-shop-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.channel-shop-analytics-head strong,
.channel-shop-heading strong,
.channel-shop-analytics-head span,
.channel-shop-heading span {
  display: block;
}

.channel-shop-analytics-head span,
.channel-shop-heading span {
  color: var(--muted);
  font-size: 12px;
}

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

.shop-analysis-filters {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(150px, 190px) minmax(150px, 190px) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.shop-analysis-filters .btn {
  min-height: 40px;
}

.channel-shop-assign {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.channel-shop-assign span {
  color: var(--muted);
  font-size: 12px;
}

.channel-shop-assign .input {
  width: min(220px, 100%);
  height: 32px;
  padding: 4px 8px;
}

.channel-account-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.channel-account-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.channel-account-summary-main {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.channel-account-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.channel-account-summary-metrics span {
  display: grid;
  gap: 2px;
  min-width: 78px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.channel-account-summary-metrics b {
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.channel-account-summary strong,
.channel-account-summary span,
.channel-account-summary small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-account-summary span,
.channel-account-summary small {
  color: var(--muted);
  font-size: 12px;
}

.video-status-card {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.video-status-card strong,
.video-status-card span {
  display: block;
}

.video-status-card strong {
  margin-bottom: 7px;
}

.video-status-card span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.video-status-card.ready {
  border-color: #b7ddce;
  background: #f2faf7;
}

.video-status-card.waiting {
  border-color: #ead6a6;
  background: #fffaf0;
}

.video-compose-grid,
.video-publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 22vw, 350px);
  gap: 14px;
  align-items: stretch;
}

.video-compose-main,
.video-compose-side {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-content: stretch;
}

.video-channel-list,
.video-asset-list,
.video-product-list,
.content-music-list {
  display: grid;
  gap: 10px;
}

.content-step-panel {
  min-height: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segment {
  min-width: 74px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.segment.active {
  color: #fff;
  background: var(--brand);
}

.content-setup-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.content-setup-grid.video-mode {
  grid-template-columns: minmax(0, 1fr);
}

.content-setup-grid.photo-mode {
  grid-template-columns: minmax(0, 1fr);
}

.content-material-column,
.content-pick-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.content-inline-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.inline-panel-header,
.content-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.inline-actions,
.pagination-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inline-panel-header strong,
.inline-panel-header small {
  display: block;
  min-width: 0;
}

.inline-panel-header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

#content-product-picked-label,
#content-music-picked-label {
  display: inline-block;
  max-width: min(100%, 72ch);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.content-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 10px;
}

.content-product-grid .video-product-option {
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  min-height: 96px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.content-product-grid .video-product-option > span,
#content-products-list-modal .video-product-option > span {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
}

.content-product-grid .video-product-option span,
.content-product-grid .video-product-option strong,
.content-product-grid .video-product-option small,
#content-products-list-modal .video-product-option span,
#content-products-list-modal .video-product-option strong,
#content-products-list-modal .video-product-option small {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed;
}

#content-products-list-modal .video-product-option {
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.content-product-grid .video-product-option.selected,
#content-products-list-modal .video-product-option.selected {
  border-color: #e8d8aa;
  background: #fffaf0;
  box-shadow: 0 8px 20px rgba(139, 30, 40, .06);
}

.content-product-grid .video-product-option .product-thumb,
#content-products-list-modal .video-product-option .product-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
}

.content-product-grid .video-product-option .product-thumb img,
#content-products-list-modal .video-product-option .product-thumb img {
  width: 52px;
  height: 52px;
}

.content-product-grid .video-channel-actions,
#content-products-list-modal .video-channel-actions {
  grid-column: 1 / -1;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding-top: 2px;
}

.content-product-grid .video-channel-actions .btn,
#content-products-list-modal .video-channel-actions .btn {
  width: auto;
  min-width: 74px;
}

.inline-music-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: start;
  max-height: 330px;
  overflow: auto;
}

.preview-duration {
  width: min(100%, 280px);
  margin: 0 auto 12px;
}

.preview-editor-button {
  width: min(100%, 280px);
  margin: 0 auto;
}

.content-material-meta {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
}

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

.content-pick-card {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.content-pick-card:hover {
  border-color: #8b1e28;
  box-shadow: 0 0 0 3px rgba(139, 30, 40, .08);
}

.content-pick-card span,
.content-pick-card small {
  color: var(--muted);
}

.video-channel-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: default;
}

.video-channel-card[data-action="open-content-channel-videos"],
.video-channel-card[data-action="open-content-channel-analysis"] {
  cursor: pointer;
}

.video-channel-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: #f7f8fa;
}

.video-channel-avatar.placeholder {
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 18px;
  font-weight: 700;
}

.video-channel-copy,
.video-channel-copy span,
.video-channel-copy small {
  display: block;
  min-width: 0;
}

.video-channel-copy span,
.video-channel-copy small {
  color: var(--muted);
}

.video-channel-actions {
  display: flex;
  gap: 6px;
}

.video-channel-card.selected,
.video-asset-card.selected,
.video-product-option.selected {
  border-color: #8b1e28;
  box-shadow: inset 0 0 0 1px #8b1e28;
}

.video-channel-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 56px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.content-preview-panel .video-channel-summary {
  flex: 1;
  align-content: start;
}

.video-channel-summary > .muted,
.video-selected-product > .muted {
  grid-column: 1 / -1;
  white-space: normal;
  writing-mode: horizontal-tb;
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.video-channel-summary .video-channel-avatar {
  width: 40px;
  height: 40px;
}

.video-channel-summary span,
.video-channel-summary small {
  display: block;
  color: var(--muted);
}

.video-selected-product {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 8px;
  border: 1px dashed #d5a6a8;
  border-radius: 8px;
  background: #fffafa;
}

.video-selected-product .product-thumb {
  width: 36px;
  height: 36px;
}

.video-selected-product span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.video-product-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 260px;
  overflow: auto;
}

.content-music-list {
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  max-height: 260px;
  overflow: auto;
}

.video-product-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  text-align: left;
  min-height: 54px;
}

.video-product-option .product-thumb,
.video-product-option .product-thumb img {
  width: 38px;
  height: 38px;
}

.video-product-option .product-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #f7f8fa;
}

.video-product-option .product-thumb img {
  display: block;
  object-fit: cover;
}

.order-product-cell {
  min-width: 220px;
}

.order-product-cell .product-thumb {
  width: 36px;
  height: 36px;
}

.customer-product-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  margin-bottom: 10px;
}

.customer-product-card .product-thumb {
  width: 48px;
  height: 48px;
}

.customer-product-card strong,
.customer-product-card span {
  display: block;
  overflow-wrap: anywhere;
}

.customer-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.video-product-option span,
.video-product-option strong,
.video-product-option small {
  display: block;
  min-width: 0;
  writing-mode: horizontal-tb;
  word-break: normal;
}

.video-product-option strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-product-option span,
.video-product-option small {
  overflow-wrap: anywhere;
}

.video-product-option small {
  color: var(--muted);
}

.video-file-drop {
  display: grid;
  place-items: center;
  min-height: 126px;
  padding: 18px;
  border: 1px dashed #c9b1b2;
  border-radius: 8px;
  color: var(--muted);
  background: #fafafa;
  text-align: center;
}

.portrait-drop {
  width: 100%;
  min-height: 330px;
  aspect-ratio: 9 / 16;
  margin-inline: 0;
}

.compact-drop {
  padding: 14px;
}

.video-file-drop strong {
  color: var(--text);
  font-size: 16px;
}

.video-file-drop.dragging {
  border-color: #8b1e28;
  background: #fff5f5;
  box-shadow: inset 0 0 0 1px #8b1e28;
}

.video-preview {
  width: 100%;
  max-height: 420px;
  border-radius: 8px;
  background: #111;
}

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

.video-asset-list.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 260px;
  overflow: auto;
}

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

.video-asset-card video {
  width: 100%;
  height: 150px;
  margin-bottom: 8px;
  border-radius: 6px;
  object-fit: cover;
  background: #111;
}

.video-asset-list.compact .video-asset-card video {
  aspect-ratio: 9 / 16;
  height: auto;
}

.content-preview-panel {
  position: sticky;
  top: 16px;
  align-self: stretch;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.content-phone-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  aspect-ratio: 9 / 16;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 10px solid #151515;
  border-radius: 28px;
  background: #090909;
  color: #fff;
}

.content-phone-preview.dragging {
  border-color: #8b1e28;
  box-shadow: 0 0 0 4px rgba(139, 30, 40, .16);
}

.content-phone-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.content-phone-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-photo-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-phone-upload {
  display: grid;
  gap: 12px;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 24px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, #151515 0%, #080808 100%);
  text-align: center;
  cursor: pointer;
}

.content-phone-upload strong,
.content-phone-upload span {
  display: block;
}

.content-phone-upload span {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  line-height: 1.5;
}

.preview-upload-action {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .48);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.preview-remove-action {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 4;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, .58);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.photo-preview-state {
  position: absolute;
  left: 12px;
  bottom: 82px;
  z-index: 4;
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  font-size: 11px;
  font-weight: 700;
}

.photo-preview-state.ready {
  background: rgba(22, 101, 52, .88);
}

.photo-preview-state.error {
  background: rgba(153, 27, 27, .9);
}

.photo-preview-strip {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  display: flex;
  gap: 6px;
  height: 64px;
  overflow-x: auto;
  padding: 4px;
  background: rgba(0, 0, 0, .58);
  scrollbar-width: thin;
}

.photo-preview-thumb {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 56px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  background: #111;
  cursor: pointer;
}

.photo-preview-thumb.active {
  border-color: #fff;
}

.photo-preview-thumb.error {
  border-color: #dc2626;
}

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

.photo-preview-thumb span {
  position: absolute;
  right: 2px;
  bottom: 2px;
  min-width: 16px;
  padding: 1px 3px;
  border-radius: 4px;
  color: #fff;
  background: rgba(0, 0, 0, .72);
  font-size: 10px;
  line-height: 14px;
}

.tiktok-cart-badge {
  position: absolute;
  left: 14px;
  right: auto;
  bottom: 70px;
  z-index: 3;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: min(74%, 206px);
  min-height: 38px;
  padding: 5px 11px 5px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(24, 24, 24, .84);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .32);
  backdrop-filter: blur(10px);
  font-size: 12px;
}

.cart-icon {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #ffd640;
  box-shadow: inset 0 -3px 0 rgba(137, 91, 0, .2), 0 2px 6px rgba(0, 0, 0, .18);
}

.cart-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  width: 13px;
  height: 9px;
  border: 2px solid #171717;
  border-top: 0;
  border-radius: 0 0 4px 4px;
  transform: skewX(-8deg);
}

.cart-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 10px;
  height: 7px;
  border: 2px solid #171717;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  box-shadow: 3px 13px 0 -1px #171717, 11px 13px 0 -1px #171717;
}

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

.tiktok-cart-badge strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tiktok-cart-badge small {
  display: none;
}

.content-bgm-badge {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 48px;
  z-index: 3;
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .54);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-phone-empty {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 18px;
  color: rgba(255,255,255,.78);
  text-align: center;
}

.content-phone-empty strong,
.content-phone-empty span {
  display: block;
}

.content-final-panel {
  margin-top: 16px;
}

.content-final-grid {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(340px, 1.25fr) minmax(220px, .78fr) minmax(250px, .95fr) auto;
  gap: 12px;
  align-items: end;
}

.content-title-field {
  grid-column: 1;
}

.content-title-field .textarea {
  height: 72px;
  min-height: 72px;
}

.content-anchor-field {
  grid-column: 2;
}

.content-ai-field {
  grid-column: 3;
}

.content-schedule-field {
  grid-column: 4;
}

#content-scheduled-at-field {
  grid-column: 4 / span 2;
}

.content-final-actions {
  grid-column: 5;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  align-self: end;
}

.content-final-actions .input {
  min-width: 180px;
}

.content-final-actions .btn {
  min-height: 40px;
  white-space: nowrap;
}

.content-preview-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 280px);
  margin: 0 auto 10px;
}

.range {
  width: 100%;
  accent-color: var(--brand);
}

.content-editor-modal {
  width: min(1480px, calc(100vw - 28px));
  height: min(900px, calc(100vh - 36px));
  max-height: calc(100vh - 36px);
  grid-template-rows: auto minmax(300px, 420px) minmax(320px, 1fr);
  gap: 12px;
}

.editor-workbench {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  border-radius: 14px;
  background: #0d1320;
  align-items: stretch;
}

.editor-preview {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
  min-height: 0;
  color: #fff;
}

.editor-phone-preview {
  width: min(100%, 250px);
  margin-bottom: 0;
  border-width: 8px;
  border-radius: 24px;
}

.editor-controls {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: #111827;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .05);
}

.editor-tool {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .075);
  font-weight: 700;
  cursor: pointer;
}

.editor-tool.active {
  color: #fff;
  border-color: rgba(32, 183, 167, .7);
  background: rgba(32, 183, 167, .22);
}

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

.editor-volume {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
}

.editor-volume span {
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  font-weight: 800;
}

.editor-timeline {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 320px;
  align-content: start;
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: #111827;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.timeline-playhead {
  position: absolute;
  top: 52px;
  bottom: 18px;
  z-index: 5;
  width: 2px;
  background: rgba(255, 255, 255, .9);
  pointer-events: none;
}

.timeline-playhead span {
  position: absolute;
  left: 50%;
  top: -9px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.timeline-ruler {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-width: 900px;
  padding-left: 128px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
}

.timeline-ruler span {
  text-align: right;
  border-left: 1px solid rgba(255, 255, 255, .08);
}

.timeline-track {
  display: grid;
  grid-template-columns: 116px minmax(900px, 1fr);
  gap: 12px;
  align-items: center;
}

.timeline-track-label {
  display: grid;
  gap: 2px;
  min-height: 64px;
  align-content: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
}

.timeline-track-label strong,
.timeline-track-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-track-label span {
  color: rgba(255, 255, 255, .64);
  font-size: 12px;
}

.timeline-rail {
  position: relative;
  height: 76px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
  cursor: crosshair;
}

.timeline-clip {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px rgba(32, 183, 167, .95);
  cursor: pointer;
}

.timeline-clip.video {
  background: #0f766e;
}

.timeline-clip.bgm {
  background: rgba(32, 183, 167, .2);
}

.clip-frames,
.clip-waveform {
  position: absolute;
  inset: 5px 14px;
  display: grid;
  gap: 2px;
}

.clip-frames {
  grid-template-columns: repeat(12, minmax(18px, 1fr));
}

.clip-frames i {
  display: block;
  border-radius: 2px;
  background-position: center;
  background-size: cover;
  background:
    linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,0)),
    linear-gradient(180deg, #d6d1ca, #475569);
}

.clip-frames i.has-frame {
  background-position: center;
  background-size: cover;
}

.clip-frames i:nth-child(3n) {
  background:
    linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,0)),
    linear-gradient(180deg, #e5c2b5, #6b7280);
}

.clip-waveform {
  grid-template-columns: repeat(42, minmax(2px, 1fr));
  align-items: center;
}

.clip-waveform i {
  display: block;
  height: var(--h);
  min-height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
}

.clip-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 16px;
  background: #d9fbf8;
  cursor: ew-resize;
}

.clip-handle::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .55);
}

.clip-handle.left {
  left: 0;
}

.clip-handle.right {
  right: 0;
}

.timeline-dragging {
  user-select: none;
}

.content-picker-modal {
  width: min(1080px, calc(100vw - 32px));
}

.content-channel-videos-modal {
  width: min(1120px, calc(100vw - 32px));
}

.content-channel-videos-modal .list,
.channel-modal-pane {
  max-height: min(560px, calc(100vh - 240px));
  overflow: auto;
}

.channel-modal-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.channel-modal-tab {
  min-width: 84px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.channel-modal-tab.active {
  color: #fff;
  background: var(--brand);
}

.channel-profile-head,
.channel-analysis-toolbar {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
}

.channel-analysis-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.channel-profile-head strong,
.channel-profile-head span,
.channel-analysis-toolbar strong,
.channel-analysis-toolbar span {
  display: block;
  min-width: 0;
}

.channel-profile-head span,
.channel-analysis-toolbar span {
  color: var(--muted);
}

.tiktok-profile {
  min-width: 0;
}

.tiktok-profile-header {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 18px 24px 24px;
}

.tiktok-profile-avatar {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: #f5f5f5;
  object-fit: cover;
  font-size: 34px;
  font-weight: 800;
}

img.avatar,
img.video-channel-avatar,
img.tiktok-profile-avatar {
  display: block;
  object-fit: cover;
}

.tiktok-profile-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.tiktok-profile-title {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.tiktok-profile-title h2,
.tiktok-profile-title span {
  display: block;
  min-width: 0;
}

.tiktok-profile-title h2 {
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tiktok-profile-title span,
.tiktok-profile-meta {
  color: var(--muted);
}

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

.tiktok-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.tiktok-profile-stats div {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.tiktok-profile-stats strong {
  font-size: 19px;
}

.tiktok-profile-stats span {
  color: var(--muted);
  font-size: 13px;
}

.tiktok-profile-bio {
  max-width: 640px;
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
}

.tiktok-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
}

.tiktok-profile-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tiktok-profile-tabs strong {
  min-width: 120px;
  padding: 12px 20px;
  border-bottom: 2px solid var(--text);
  text-align: center;
}

.channel-analysis-filters {
  display: grid;
  grid-template-columns: minmax(140px, .7fr) minmax(140px, .7fr) minmax(140px, .7fr) minmax(240px, 1.3fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.channel-analysis-apply {
  min-height: 40px;
  white-space: nowrap;
}

.channel-analysis-period {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.channel-analysis-compare {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.channel-analysis-section-title {
  margin: 4px 0 10px;
  font-size: 14px;
  font-weight: 800;
}

.channel-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.channel-video-card {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 9 / 14;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: #151515;
}

.channel-video-cover-link,
.channel-video-media,
.channel-video-card > img,
.channel-video-cover-link > img,
.channel-video-media > img,
.channel-video-media > iframe,
.channel-video-card > iframe,
.channel-video-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-video-cover-link {
  color: inherit;
  text-decoration: none;
}

.channel-video-media {
  position: absolute;
  inset: 0;
}

.channel-video-card > iframe {
  display: block;
  border: 0;
  background: #111;
}

.channel-video-media > iframe {
  border: 0;
  background: #111;
}

.channel-video-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
  line-height: 54px;
  transform: translate(-50%, -50%);
}

.channel-video-play-button:hover {
  background: rgba(137, 24, 31, .9);
}

.channel-video-placeholder {
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(255, 255, 255, .78);
  background: #202020;
  text-align: center;
}

.channel-video-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 26px 10px 9px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .84));
  font-size: 12px;
}

.channel-video-overlay strong {
  font-size: 13px;
}

.channel-video-gmv {
  font-size: 18px;
  font-weight: 900;
}

.channel-video-open-link {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.channel-video-open-link:hover {
  background: rgba(137, 24, 31, .88);
}

.channel-video-empty {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 160px;
  margin-bottom: 14px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.channel-video-empty strong {
  color: var(--text);
}

.channel-video-load-more {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.channel-metric-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.channel-metric-picker > strong {
  margin-right: 4px;
}

.metric-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-weight: 700;
}

.metric-toggle input {
  margin: 0;
}

.channel-profile-grid,
.channel-analysis-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.channel-field,
.channel-metric,
.channel-chart,
.channel-note {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.channel-field span,
.channel-metric span,
.channel-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.channel-field strong,
.channel-metric strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
}

.channel-metric strong {
  margin-top: 4px;
  font-size: 20px;
}

.channel-raw-json {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.channel-raw-json summary {
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.channel-raw-json pre {
  max-height: 260px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-top: 1px solid var(--line);
  font-size: 12px;
  white-space: pre-wrap;
}

.channel-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.channel-chart {
  display: grid;
  gap: 10px;
  background: #fff;
}

.channel-chart-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
  gap: 8px;
  min-height: 160px;
  align-items: end;
}

.channel-chart-bar {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto;
  gap: 6px;
  min-width: 0;
  align-items: end;
  text-align: center;
}

.channel-chart-bar span {
  display: block;
  min-height: 5px;
  border-radius: 6px 6px 0 0;
  background: #20b7a7;
}

.channel-chart-bar small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-video-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.channel-metric-table-wrap {
  margin-bottom: 12px;
}

.channel-video-table {
  min-width: 1180px;
}

.channel-performance-table {
  min-width: 1320px;
}

.channel-performance-table th {
  font-size: 16px;
  font-weight: 900;
}

.channel-table-sort {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  padding: 0;
  text-align: left;
  white-space: nowrap;
}

.channel-table-sort b {
  color: var(--brand);
  font-size: 24px;
  line-height: 1;
}

.channel-table-sort.active {
  color: var(--brand);
}

.channel-table-sort:hover {
  text-decoration: underline;
}

.channel-metric-table {
  min-width: 760px;
}

.channel-video-table td strong,
.channel-video-table td small {
  display: block;
  min-width: 0;
}

.channel-video-table td small {
  color: var(--muted);
}

.channel-table-video-cell,
.channel-table-product-cell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 260px;
}

.channel-table-product-cell {
  min-width: 220px;
}

.channel-table-thumb,
.channel-table-product-image {
  display: block;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #151515;
}

.channel-table-thumb img,
.channel-table-product-image img,
.channel-table-thumb iframe {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-music-pagination {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  bottom: 0;
  padding: 12px 4px 4px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
}

.content-music-pagination > div {
  display: flex;
  gap: 8px;
}

.channel-table-thumb iframe {
  width: 320px;
  height: 568px;
  border: 0;
  pointer-events: none;
  transform: scale(.175);
  transform-origin: top left;
}

.channel-table-thumb-placeholder,
.channel-table-product-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  text-align: center;
}

.channel-table-product-placeholder {
  color: var(--muted);
  background: var(--surface-soft);
}

.channel-table-video-cell > div,
.channel-table-product-cell > span:last-child {
  min-width: 0;
}

.channel-table-link {
  display: inline-block;
  margin-top: 3px;
  color: #0f8f86;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.channel-table-link:hover {
  text-decoration: underline;
}

.channel-table-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.channel-table-pagination > div {
  display: flex;
  gap: 8px;
}

.channel-hot-video-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.channel-hot-video-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  justify-content: stretch;
}

.channel-hot-video-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  text-decoration: none;
}

.channel-hot-thumb {
  position: relative;
  aspect-ratio: 9 / 12;
  overflow: hidden;
  background: #111;
}

.channel-hot-video-grid.compact .channel-hot-thumb {
  aspect-ratio: 9 / 11;
}

.channel-hot-thumb > img,
.channel-hot-thumb > iframe,
.channel-hot-thumb > .channel-video-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-hot-thumb > iframe {
  display: block;
  border: 0;
}

.channel-hot-copy {
  display: grid;
  gap: 4px;
  padding: 9px;
}

.channel-hot-copy strong,
.channel-hot-copy span,
.channel-hot-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-hot-copy span,
.channel-hot-copy small {
  color: var(--muted);
  font-size: 12px;
}

.picker-list {
  margin-top: 12px;
  max-height: 58vh;
  overflow: auto;
}

.music-option {
  grid-template-columns: 44px minmax(160px, 1fr) minmax(180px, 260px) auto;
  align-items: center;
  min-width: 0;
}

.music-option > .product-thumb {
  grid-column: 1;
}

.music-option > span {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
}

.music-option span,
.music-option strong,
.music-option small {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed;
}

.music-actions {
  grid-column: 3 / 5;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

.music-actions audio {
  min-width: 0;
  width: 100%;
  max-width: none;
  height: 34px;
}

.music-actions .btn {
  flex: 0 0 auto;
}

.content-music-list .music-option {
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
}

.content-music-list .music-option.selected {
  border-color: #e8d8aa;
  background: #fffaf0;
  box-shadow: none;
}

.content-music-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.chip.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

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

.video-option-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.video-rule-list {
  margin: 0;
  padding: 0;
  color: var(--muted);
  line-height: 1.7;
}

.video-rule-list > div {
  display: grid;
  gap: 2px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.video-rule-list > div:last-child {
  border-bottom: 0;
}

.video-status-card small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.video-task-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.video-task-preview {
  display: grid;
  place-items: center;
  width: 92px;
  height: 124px;
  overflow: hidden;
  border-radius: 6px;
  color: var(--muted);
  background: #151515;
}

.video-task-preview img,
.video-task-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-task-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.video-task-error {
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.video-task-error.neutral {
  color: #4d5562;
  background: #f0f2f5;
}

.content-bulk-progress {
  margin: -4px 0 14px;
}

.content-bulk-progress:empty {
  display: none;
}

.content-bulk-progress-card,
.content-bulk-hint {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.content-bulk-progress-card {
  display: grid;
  gap: 8px;
}

.content-bulk-progress-card strong,
.content-bulk-progress-card span {
  display: block;
}

.content-bulk-progress-card span,
.content-bulk-hint {
  color: var(--muted);
  font-size: 12px;
}

.content-task-progress {
  display: grid;
  gap: 6px;
  max-width: 520px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid #d9e7ef;
  border-radius: 8px;
  background: #f6fbfd;
}

.content-task-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #4d5562;
  font-size: 12px;
  font-weight: 700;
}

.content-task-progress-bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf2;
}

.content-task-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--teal));
  transition: width 220ms ease;
}

.video-task-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.video-published-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #067647;
  background: #e9f8ef;
  font-weight: 800;
  white-space: nowrap;
}

.creator-approval-hero {
  padding-bottom: 14px;
}

.creator-approval-reminder {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 54px;
  padding: 10px 14px;
  border-left: 4px solid #169c91;
  background: #f1f8f7;
  color: #43515b;
}

.creator-approval-reminder strong {
  color: #172027;
  white-space: nowrap;
}

.creator-sample-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.creator-sample-tabs button {
  min-width: 88px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.creator-sample-tabs button.active {
  border-bottom-color: #159c91;
  color: #102f2c;
}

.creator-sample-filters {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.4fr) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.creator-sample-bulkbar,
.creator-sample-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
}

.creator-sample-bulkbar {
  padding: 8px 0;
}

#creator-sample-selected-text {
  margin-left: 12px;
}

.creator-sample-table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.creator-sample-table {
  min-width: 1460px;
}

.creator-sample-table th {
  padding: 12px 10px;
  background: #f5f6f7;
  color: #4d5861;
  font-size: 13px;
  white-space: nowrap;
}

.creator-sample-table td {
  padding: 14px 10px;
  vertical-align: middle;
}

.creator-sample-creator,
.creator-sample-product {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 245px;
}

.creator-sample-avatar,
.creator-sample-product-image {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f4f5f6;
  object-fit: cover;
}

.creator-sample-product-image {
  border-radius: 6px;
}

.creator-sample-avatar-fallback {
  display: grid;
  place-items: center;
  color: #75808a;
  font-size: 20px;
  font-weight: 800;
}

.creator-sample-identity strong,
.creator-sample-product strong {
  display: block;
  max-width: 235px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-sample-identity .muted,
.creator-sample-product .muted,
.creator-sample-meta {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
}

.creator-sample-identity > span,
.creator-sample-identity small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.creator-sample-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.creator-sample-tags span {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f7f8f9;
  color: #56636c;
  font-size: 11px;
}

.creator-sample-avatar-wrap,
.creator-sample-product-image-wrap {
  display: block;
  width: 52px;
  height: 52px;
}

.creator-sample-product-image.fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.creator-sample-pps {
  margin-top: 4px;
  color: #1e2930;
  font-size: 12px;
  font-weight: 700;
}

.creator-sample-score {
  color: #172027;
  font-size: 18px;
  font-weight: 800;
}

.creator-sample-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.creator-sample-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eef1f3;
  color: #4b5963;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.creator-sample-status.pending {
  background: #fff3d9;
  color: #8b5d00;
}

.creator-sample-status.approved,
.creator-sample-status.completed {
  background: #e6f6f1;
  color: #16735f;
}

.creator-sample-status.rejected {
  background: #fae9e9;
  color: #9f2f2f;
}

.creator-sample-empty {
  padding: 54px 20px !important;
  color: var(--muted);
  text-align: center;
}

.creator-sample-reject-panel {
  width: min(520px, calc(100vw - 32px));
}

.creator-sample-reject-panel .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .username-resolver-upload {
    align-items: stretch;
    flex-direction: column;
  }
  .creator-sample-filters {
    grid-template-columns: 1fr 1fr;
  }

  .creator-sample-filters .btn {
    width: 100%;
  }
  .filter-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .field.wide {
    grid-column: span 3;
  }

  .form-grid.three,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }

  .customer-service-layout {
    grid-template-columns: minmax(240px, 300px) minmax(420px, 1fr);
  }

  .customer-context-panel {
    display: none;
  }

  .video-status-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .video-compose-grid,
  .video-publish-layout {
    grid-template-columns: 1fr;
  }

  .content-preview-panel {
    position: static;
  }

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

  .content-setup-grid.photo-mode {
    grid-template-columns: 1fr;
  }

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

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

  .channel-analysis-apply {
    width: fit-content;
  }

  .inline-music-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

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

  .content-title-field,
  .content-anchor-field,
  .content-ai-field,
  .content-schedule-field,
  #content-scheduled-at-field,
  .content-final-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .video-task-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .video-task-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

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

  .editor-preview {
    order: 1;
  }

  .editor-controls {
    order: 2;
  }
}

@media (max-width: 720px) {
  .tiktok-profile-header {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 10px 4px 18px;
  }

  .tiktok-profile-avatar {
    width: 82px;
    height: 82px;
    font-size: 24px;
  }

  .tiktok-profile-title {
    align-items: flex-start;
  }

  .tiktok-profile-title h2 {
    font-size: 20px;
  }

  .tiktok-profile-stats {
    gap: 10px 16px;
  }

  .channel-analysis-filters {
    grid-template-columns: 1fr;
  }

  .shop-analysis-filters {
    grid-template-columns: 1fr;
  }

  .channel-analysis-period {
    grid-column: auto;
  }

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

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

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }

  .brand {
    min-height: 52px;
    padding-bottom: 12px;
  }

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

  .nav {
    justify-content: space-between;
    padding: 0 12px;
  }

  .nav-children {
    padding-left: 12px;
  }

  .main {
    padding: 16px;
  }

  .content-pick-grid,
  .content-setup-grid,
  .content-final-grid,
  .content-product-grid,
  .creator-affiliate-sections,
  .affiliate-card-grid,
  .video-asset-list.compact,
  .video-product-list,
  .content-music-list {
    grid-template-columns: 1fr;
  }

  .content-title-field,
  .content-anchor-field,
  .content-ai-field,
  .content-schedule-field,
  #content-scheduled-at-field,
  .content-final-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .music-option {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .music-actions {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .music-actions audio {
    width: 100%;
  }

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

  .timeline-ruler {
    padding-left: 0;
  }

  .timeline-track {
    grid-template-columns: 1fr;
  }

  .topbar,
  .action-panel,
  .panel-header,
  .customer-service-toolbar,
  .customer-composer-tools,
  .customer-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

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

  .template-sidebar {
    position: static;
    min-height: 0;
  }

  .top-actions,
  .actions,
  .inline-controls {
    align-items: stretch;
  }

  .field.compact {
    width: 100%;
  }

  .metrics,
  .metrics.five,
  .metrics.four,
  .status-grid,
  .filter-grid,
  .form-grid.two,
  .form-grid.three,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .field.wide {
    grid-column: span 1;
  }

  .customer-service-status-card,
  .customer-service-layout {
    grid-template-columns: 1fr;
  }

  .customer-conversation-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .customer-conversations {
    max-height: 260px;
  }

  .customer-context-panel {
    display: block;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .video-status-grid,
  .video-asset-list,
  .video-publish-assets,
  .video-product-list,
  .video-option-grid {
    grid-template-columns: 1fr;
  }

  .video-task-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .video-task-preview {
    width: 72px;
    height: 96px;
  }

  .video-task-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .btn {
    width: 100%;
  }
}
