:root {
  color-scheme: light;
  --brand: #2cd5c4;
  --brand-soft: #eafaf8;
  --brand-wash: #f4fcfb;
  --brand-line: #a9e9e2;
  --sky: #90c6de;
  --sky-soft: #eff8fc;
  --orange: #f39c5c;
  --orange-soft: #fff6ed;
  --yellow-soft: #fbfadf;
  --purple: #5e84a8;
  --jet: #4d4948;
  --ink: #242826;
  --muted: #697370;
  --muted-light: #89928f;
  --canvas: #f3f6f5;
  --surface: #ffffff;
  --surface-muted: #f8faf9;
  --line: #dce4e1;
  --line-strong: #cbd7d3;
  --line-soft: #edf1f0;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(36, 40, 38, 0.055);
  --shadow-hover: 0 16px 36px rgba(36, 40, 38, 0.075);
  --content-width: 1600px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Helvetica Neue", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: absolute;
  z-index: 60;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--brand);
  content: "";
}

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

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

button,
a,
select,
input,
summary,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(44, 213, 196, 0.35);
  outline-offset: 3px;
}

.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 18px max(28px, calc((100vw - var(--content-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(36, 40, 38, 0.02);
}

.brand-lockup,
.topbar-actions,
.page-nav {
  display: flex;
  align-items: center;
}

.brand-lockup {
  min-width: 0;
  gap: 18px;
}

.brand-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 112px;
  min-height: 36px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.brand-logo img {
  display: block;
  width: 94px;
  height: auto;
}

.topbar-title {
  min-width: 0;
}

.topbar h1 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 1.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.topbar-title .eyebrow::before {
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 0;
  background: url("/assets/tiktok-mark.svg") center / contain no-repeat;
}

.eyebrow,
.metric-label {
  margin: 0;
  color: var(--jet);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
}

.eyebrow::before {
  display: inline-block;
  width: 13px;
  height: 7px;
  border: 2px solid var(--brand);
  border-right-color: transparent;
  border-radius: 5px 0 0 5px;
  content: "";
}

.topbar-actions {
  justify-content: flex-end;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--jet);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  width: 11px;
  height: 11px;
  border: 2px solid var(--muted-light);
  border-radius: 50%;
  content: "";
}

.status-pill.live {
  border-color: var(--brand-line);
  background: var(--brand-wash);
}

.status-pill.live::before {
  border-color: var(--brand);
}

.status-pill.warn {
  border-color: #f3c9a5;
  background: var(--orange-soft);
}

.status-pill.warn::before {
  border-color: var(--orange);
}

.page-nav {
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.nav-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:active {
  transform: translateY(1px);
}

.nav-link.active {
  color: var(--jet);
  background: var(--brand);
  box-shadow: 0 3px 10px rgba(44, 213, 196, 0.2);
}

.dashboard-main,
.management-main {
  width: min(var(--content-width), calc(100% - 56px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.dashboard-main {
  display: grid;
  gap: 20px;
}

.management-main {
  display: grid;
  gap: 20px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 22px;
  min-width: 0;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 20px;
}

.hero::after {
  position: absolute;
  top: -64px;
  left: 68px;
  width: 214px;
  height: 214px;
  background: url("/assets/botslab-robot-mark.svg") center / contain no-repeat;
  content: "";
  opacity: 0.08;
  pointer-events: none;
  transform: rotate(45deg);
  transform-origin: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 7px 2px 3px;
}

.metric-label {
  color: var(--jet);
  font-size: 12px;
  text-transform: none;
}

.hero-copy h2 {
  margin: 14px 0 0;
  color: var(--ink);
  font-family: Rubik, Outfit, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(40px, 4vw, 60px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: pre-line;
}

.source-as-of {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.kpi-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kpi-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 112px;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 17px;
  overflow: hidden;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-md);
  background: var(--brand-wash);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.kpi-card:hover {
  border-color: var(--brand-line);
  background: #fbfefd;
  transform: translateY(-1px);
}

.kpi-card.accent {
  border-color: var(--brand-line);
  background: var(--brand-wash);
}

.kpi-card > span {
  position: relative;
  z-index: 1;
  max-width: 88%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.kpi-card > strong {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  color: var(--ink);
  font-family: Rubik, Outfit, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(26px, 2.25vw, 38px);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1.08;
  white-space: nowrap;
}

.gmv-card {
  background: var(--brand-wash);
}

.gmv-lines {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gmv-lines > div {
  min-width: 0;
}

.gmv-lines span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gmv-lines strong {
  display: block;
  color: var(--ink);
  font-family: Rubik, Outfit, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(17px, 1.35vw, 22px);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  white-space: nowrap;
}

.section-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.section-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--jet);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(36, 40, 38, 0.045);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.section-nav a::before {
  width: 10px;
  height: 10px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  content: "";
}

.section-nav a::after {
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  opacity: 0.55;
  transform: rotate(45deg) translateY(-1px);
}

.section-nav a:hover {
  border-color: var(--brand-line);
  color: var(--ink);
  background: var(--brand-wash);
  box-shadow: 0 4px 12px rgba(44, 213, 196, 0.12);
  transform: translateY(-1px);
}

.panel,
.controls,
.mapping-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 26px;
  scroll-margin-top: 18px;
}

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

.panel-head > div:first-child {
  position: relative;
  padding-left: 18px;
}

.panel-head > div:first-child::before {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 0;
  width: 7px;
  border: 2px solid var(--brand);
  border-right: 0;
  border-radius: 7px 0 0 7px;
  content: "";
}

.panel-head h2,
.panel-head h3 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: clamp(23px, 2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.panel-head > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.content-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  scroll-margin-top: 18px;
}

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

.table-wrap,
.trend-table-wrap {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--brand) var(--line-soft);
  scrollbar-width: thin;
}

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

.table-wrap::-webkit-scrollbar {
  height: 12px;
}

.table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: var(--line-soft);
}

.table-wrap::-webkit-scrollbar-thumb {
  min-width: 44px;
  border: 3px solid var(--line-soft);
  border-radius: 999px;
  background: var(--brand);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums lining-nums;
}

.table-wrap table {
  min-width: 760px;
}

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

th {
  color: var(--jet);
  background: var(--brand-wash);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

td {
  color: #46504d;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.4;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:not(.summary-row):hover td {
  background: #fbfefd;
}

.table-wrap th:nth-child(n + 3),
.table-wrap td:nth-child(n + 3) {
  text-align: right;
}

.summary-row td {
  border-top: 2px solid var(--brand);
  border-bottom: 0;
  color: var(--jet);
  background: var(--brand-wash);
  font-weight: 700;
}

.money-total {
  white-space: nowrap;
}

.value-state,
.state-present,
.state-missing,
.state-not-updated,
.state-blocked,
.state-failure {
  font-variant-numeric: tabular-nums lining-nums;
}

.state-present {
  color: var(--jet);
}

.state-missing,
.state-not-updated {
  color: var(--muted-light);
}

.state-blocked,
.state-failure {
  color: #9b4d20;
}

.partial-badge {
  display: inline-flex;
  min-height: 19px;
  align-items: center;
  margin-left: 7px;
  padding: 2px 6px;
  border: 1px solid #f1c6a3;
  border-radius: 6px;
  color: #935126;
  background: var(--orange-soft);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.blocking-note,
.intake-notice {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #f2c9a8;
  border-radius: var(--radius-sm);
  color: #815034;
  background: var(--orange-soft);
  font-size: 13px;
  line-height: 1.5;
}

.shop-trend-grid {
  display: grid;
  gap: 14px;
}

.shop-trend-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.shop-trend-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line-soft);
}

.shop-trend-head > div {
  display: grid;
  gap: 3px;
}

.shop-trend-head span {
  color: var(--jet);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-trend-head strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.shop-trend-head p {
  margin: 0;
  color: var(--muted-light);
  font-size: 9px;
  text-align: right;
}

.trend-table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  scrollbar-width: none;
}

.trend-table-wrap::-webkit-scrollbar {
  display: none;
}

.trend-table {
  width: 100%;
  min-width: 1380px;
  table-layout: fixed;
}

.trend-table th,
.trend-table td {
  padding: 11px 8px;
  text-align: right;
}

.trend-table th {
  height: 60px;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.trend-table td {
  font-size: 14px;
  white-space: nowrap;
}

.trend-table th:first-child,
.trend-table td:first-child {
  position: sticky;
  z-index: 2;
  left: 0;
  width: 120px;
  text-align: left;
}

.trend-table th:first-child {
  z-index: 3;
  background: var(--brand-wash);
}

.trend-table td:first-child {
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line-soft);
}

.trend-month-cell {
  color: var(--jet);
  font-weight: 700;
}

.trend-scrollbar {
  position: relative;
  height: 16px;
  margin-top: 10px;
  padding: 5px 0;
  cursor: ew-resize;
  touch-action: none;
}

.trend-scrollbar[hidden] {
  display: none;
}

.trend-scrollbar::before {
  position: absolute;
  top: 5px;
  right: 0;
  bottom: 5px;
  left: 0;
  border-radius: 6px;
  background: var(--line-soft);
  box-shadow: inset 0 1px 2px rgba(36, 40, 38, 0.06);
  content: "";
}

.trend-scrollbar-thumb {
  position: relative;
  z-index: 1;
  display: block;
  height: 6px;
  border-radius: 6px;
  background: var(--brand);
  box-shadow: 0 0 0 1px rgba(77, 73, 72, 0.08);
  transition: background 160ms ease;
}

.trend-scrollbar:hover .trend-scrollbar-thumb,
.trend-scrollbar.dragging .trend-scrollbar-thumb {
  background: var(--jet);
}

.creator-section {
  scroll-margin-top: 18px;
}

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

.product-creator-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.product-creator-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.product-creator-head {
  display: flex;
  min-height: 68px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--brand-wash);
}

.product-creator-head > div {
  min-width: 0;
}

.product-creator-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-creator-head strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.product-total {
  flex: 0 0 auto;
  text-align: right;
}

.product-total strong {
  color: var(--jet);
  font-family: Rubik, Outfit, "Helvetica Neue", Arial, sans-serif;
  font-size: 19px;
  font-variant-numeric: tabular-nums lining-nums;
}

.product-creator-card ol {
  margin: 0;
  padding: 0 15px;
  list-style: none;
}

.product-creator-card li {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.product-creator-card li:last-child {
  border-bottom: 0;
}

.creator-avatar-link,
.creator-avatar {
  width: 38px;
  height: 38px;
}

.creator-avatar-link {
  display: block;
  border-radius: 50%;
}

.creator-avatar {
  display: flex;
  object-fit: cover;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--jet);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 700;
}

.creator-content {
  min-width: 0;
}

.creator-content > strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.creator-content > p {
  margin: 4px 0 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.mini-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.mini-metrics span {
  color: var(--jet);
  font-size: 11px;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
}

.product-creator-card li > a:last-child {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 5px 7px 5px 10px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  color: var(--jet);
  background: var(--brand-wash);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.product-creator-card li > a:last-child::after {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--brand-soft);
  content: "↗";
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.product-creator-card li > a:last-child:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.weekly-review-section {
  scroll-margin-top: 18px;
}

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

.weekly-review-card {
  position: relative;
  min-width: 0;
  min-height: 330px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.weekly-review-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--brand);
  content: "";
}

.weekly-lowlight::before {
  background: var(--orange);
}

.weekly-actions::before {
  background: var(--sky);
}

.weekly-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line-soft);
}

.weekly-card-head > span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-line);
  border-radius: 50%;
  color: var(--jet);
  background: var(--brand-wash);
  font-family: Rubik, Outfit, "Helvetica Neue", Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.weekly-lowlight .weekly-card-head > span {
  border-color: #f1c6a3;
  color: #935126;
  background: var(--orange-soft);
}

.weekly-actions .weekly-card-head > span {
  border-color: #b9dbe8;
  color: #315f70;
  background: #f1f8fb;
}

.weekly-card-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.weekly-review-card ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.weekly-review-card li {
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.weekly-review-card li:last-child {
  border-bottom: 0;
}

.weekly-review-card li > strong,
.weekly-action-title strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.weekly-review-card li > p {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.weekly-review-card li > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

.weekly-review-card li > span em {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--jet);
  background: var(--brand-wash);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.weekly-action-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 7px;
}

.weekly-action-title b {
  display: inline-flex;
  min-width: 28px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 800;
}

.weekly-action-title b[data-priority="P0"] {
  border-color: #f1c6a3;
  color: #935126;
  background: var(--orange-soft);
}

.weekly-action-title b[data-priority="P1"] {
  border-color: #b9dbe8;
  color: #315f70;
  background: #f1f8fb;
}

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

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

.empty,
.field-placeholder {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 14px;
}

.empty-row td {
  height: 96px;
  color: var(--muted);
  text-align: center !important;
}

.management-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  min-height: 142px;
  padding: 24px 28px;
  overflow: hidden;
  border-top: 3px solid var(--brand);
  background: var(--brand-wash);
}

.management-hero::after {
  position: absolute;
  right: 15%;
  bottom: -88px;
  width: 210px;
  height: 210px;
  background: url("/assets/botslab-robot-mark.svg") center / contain no-repeat;
  content: "";
  opacity: 0.08;
  pointer-events: none;
  transform: rotate(45deg);
  transform-origin: center;
}

.management-hero > div {
  position: relative;
  z-index: 1;
}

.management-hero h2 {
  margin: 7px 0 6px;
  color: var(--ink);
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.management-hero > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.management-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: 380px;
  text-align: right;
}

.management-meta .source-as-of {
  margin: 0;
}

.controls {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(190px, 235px) minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.upload-copy {
  padding: 2px 20px 2px 0;
  border-right: 1px solid var(--line-soft);
}

.upload-copy > strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.upload-copy > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.intake-workflow {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.import-options {
  display: grid;
  grid-template-columns: 1fr 1fr 0.9fr 0.9fr;
  gap: 10px;
}

.import-options label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

select,
input[type="date"] {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--surface);
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

select:hover,
input[type="date"]:hover,
select:focus,
input[type="date"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(44, 213, 196, 0.12);
}

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

.intake-actions button,
.file-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
  color: var(--jet);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.intake-actions button:hover,
.file-action:hover {
  border-color: var(--brand);
  background: var(--brand-wash);
}

.intake-actions button:active,
.file-action:active {
  transform: translateY(1px);
}

.intake-actions .primary-action {
  border-color: var(--brand);
  color: var(--jet);
  background: var(--brand);
  box-shadow: 0 5px 12px rgba(44, 213, 196, 0.18);
}

.intake-actions button:disabled,
.file-action:has(+ input:disabled) {
  cursor: not-allowed;
  opacity: 0.52;
}

.upload-panel .intake-notice {
  grid-column: 1 / -1;
  margin-top: 0;
}

.mapping-panel {
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}

.mapping-panel summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  list-style: none;
}

.mapping-panel summary::-webkit-details-marker {
  display: none;
}

.mapping-panel summary::before {
  width: 9px;
  height: 9px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  content: "";
}

.mapping-panel summary span {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 500;
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 0 14px 14px;
}

.source-status-card {
  min-width: 0;
  min-height: 106px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.source-status-card > span {
  display: block;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.source-status-card > strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.source-status-card > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.quality-panel {
  padding-bottom: 22px;
}

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

.quality-item {
  position: relative;
  min-width: 0;
  padding: 14px 15px 14px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.quality-item::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--sky);
  content: "";
}

.quality-item.warn::before {
  background: var(--orange);
}

.quality-item > div {
  display: grid;
  gap: 3px;
}

.quality-item span {
  color: var(--muted-light);
  font-size: 11px;
}

.quality-item strong {
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.quality-item p {
  margin: 9px 0 0;
  color: var(--muted);
  font-family: "Helvetica Neue", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quality-item b {
  display: block;
  margin-top: 8px;
  color: #9b4d20;
  font-size: 12px;
  font-variant-numeric: tabular-nums lining-nums;
}

dialog {
  width: min(620px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(36, 40, 38, 0.24);
}

dialog::backdrop {
  background: rgba(36, 40, 38, 0.42);
  backdrop-filter: blur(3px);
}

dialog form {
  padding: 22px;
}

dialog p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.dialog-head h2 {
  margin: 6px 0 0;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.dialog-head button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

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

@media (min-width: 1700px) {
  .kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .kpi-card {
    min-height: 138px;
  }

  .kpi-card > strong {
    font-size: clamp(25px, 1.65vw, 34px);
  }

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

  .gmv-lines > div {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: end;
    gap: 5px;
  }

  .gmv-lines span {
    margin-bottom: 1px;
  }
}

@media (max-width: 1180px) {
  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .dashboard-main,
  .management-main {
    width: calc(100% - 40px);
  }

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

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

  .kpi-card {
    min-height: 102px;
  }

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

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

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

  .weekly-actions {
    grid-column: 1 / -1;
  }

  .weekly-review-card {
    min-height: 0;
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    gap: 16px;
  }

  .brand-logo {
    width: 96px;
    padding-right: 14px;
  }

  .brand-logo img {
    width: 80px;
  }

  .topbar-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 7px;
  }

  body[data-page="data-intake"] .topbar > .page-nav {
    margin-top: 1px;
  }

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

  .hero::after {
    top: -110px;
    right: 20px;
    left: auto;
  }

  .hero-copy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 18px;
  }

  .source-as-of {
    margin: 0;
    text-align: right;
  }

  .management-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .management-meta {
    max-width: none;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .management-meta .source-as-of {
    text-align: left;
  }

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

  .upload-copy {
    padding: 0 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

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

  .weekly-review-grid {
    grid-template-columns: 1fr;
  }

  .weekly-review-card {
    min-height: 0;
  }

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

@media (max-width: 640px) {
  .topbar {
    display: grid;
    min-height: auto;
    gap: 12px;
    padding: 16px 14px 13px;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-logo {
    width: 78px;
    min-height: 30px;
    padding-right: 12px;
  }

  .brand-logo img {
    width: 66px;
  }

  .topbar h1 {
    font-size: 19px;
  }

  .topbar .eyebrow {
    font-size: 9px;
  }

  .topbar-actions,
  body[data-page="data-intake"] .topbar > .page-nav {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .topbar-actions {
    gap: 7px;
  }

  .status-pill {
    min-height: 32px;
    justify-content: center;
    padding: 5px 9px;
    font-size: 12px;
  }

  .page-nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-link {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .dashboard-main,
  .management-main {
    width: calc(100% - 22px);
    padding: 12px 0 30px;
  }

  .dashboard-main,
  .management-main {
    gap: 12px;
  }

  .hero {
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
  }

  .hero-copy {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 0;
  }

  .hero-copy h2 {
    margin-top: 8px;
    font-size: 42px;
  }

  .source-as-of {
    margin: 0;
    font-size: 11px;
    text-align: left;
  }

  .kpi-grid {
    gap: 7px;
  }

  .kpi-card {
    min-height: 98px;
    padding: 13px;
  }

  .kpi-card:nth-child(5),
  .gmv-card {
    grid-column: span 2;
  }

  .kpi-card > span {
    max-width: 94%;
    font-size: 11px;
  }

  .kpi-card > strong {
    font-size: 25px;
  }

  .kpi-card:nth-child(5) > strong {
    font-size: 30px;
  }

  .gmv-lines strong {
    font-size: 18px;
  }

  .section-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .section-nav::-webkit-scrollbar {
    display: none;
  }

  .section-nav a {
    min-width: 0;
    justify-content: center;
    gap: 6px;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 11px;
  }

  .section-nav a::after {
    display: none;
  }

  .panel,
  .controls {
    padding: 15px;
    border-radius: 14px;
  }

  .panel-head {
    gap: 10px;
    margin-bottom: 13px;
  }

  .panel-head > div:first-child {
    padding-left: 14px;
  }

  .panel-head h2,
  .panel-head h3 {
    font-size: 21px;
  }

  .panel-head > span {
    min-height: 26px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .span-2 {
    grid-column: span 1;
  }

  .table-wrap table {
    min-width: 720px;
  }

  th,
  td {
    padding: 10px 11px;
  }

  .shop-trend-panel {
    padding: 12px;
  }

  .shop-trend-head {
    display: grid;
    gap: 5px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .shop-trend-head strong {
    font-size: 18px;
  }

  .shop-trend-head p {
    font-size: 8px;
    text-align: left;
  }

  .trend-scrollbar {
    height: 20px;
    margin-top: 8px;
    padding: 6px 0;
  }

  .trend-scrollbar::before {
    top: 6px;
    bottom: 6px;
  }

  .trend-scrollbar-thumb {
    height: 8px;
  }

  .product-creator-head {
    padding: 12px;
  }

  .product-creator-card ol {
    padding: 0 12px;
  }

  .product-creator-card li {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    padding: 12px 0;
  }

  .creator-avatar-link,
  .creator-avatar {
    width: 34px;
    height: 34px;
  }

  .product-creator-card li > a:last-child,
  .product-creator-card li > .muted:last-child {
    grid-column: 2;
    justify-self: start;
    min-height: 28px;
  }

  .weekly-review-card {
    padding: 13px;
  }

  .weekly-review-card li {
    padding: 12px 0;
  }

  .management-hero {
    gap: 14px;
    min-height: auto;
    padding: 18px;
  }

  .management-hero h2 {
    font-size: 27px;
  }

  .management-meta {
    grid-template-columns: 1fr;
  }

  .upload-panel {
    gap: 14px;
    padding: 13px;
  }

  .upload-copy > strong {
    font-size: 20px;
  }

  .import-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .intake-actions .primary-action {
    grid-column: span 2;
  }

  .mapping-panel {
    border-radius: 14px;
  }

  .mapping-panel summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 8px;
    padding: 12px;
  }

  .mapping-panel summary span {
    grid-column: 2;
  }

  .mapping-grid,
  .quality-list {
    grid-template-columns: 1fr;
  }

  .mapping-grid {
    padding: 0 10px 10px;
  }

  .source-status-card {
    min-height: 96px;
  }

  .quality-item {
    padding: 12px 13px 12px 16px;
  }
}

@media (max-width: 350px) {
  .topbar h1 {
    font-size: 17px;
  }

  .brand-logo {
    width: 70px;
    padding-right: 10px;
  }

  .brand-logo img {
    width: 58px;
  }

  .kpi-card {
    min-height: 92px;
    padding: 11px;
  }

  .gmv-lines {
    gap: 6px;
  }

  .gmv-lines strong {
    font-size: 16px;
  }

  .section-nav a {
    gap: 4px;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 10px;
  }

  .intake-actions {
    grid-template-columns: 1fr;
  }

  .intake-actions .primary-action {
    grid-column: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
