:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f8f9fa;
  --ink: #18202a;
  --ink-soft: #5c6673;
  --ink-faint: #8b95a1;
  --line: #dfe4e9;
  --line-soft: #edf0f2;
  --navy: #16283f;
  --navy-2: #203957;
  --primary: #176b55;
  --primary-dark: #125542;
  --primary-soft: #e8f4f0;
  --blue: #2563a8;
  --blue-soft: #eaf2fb;
  --amber: #b66a0b;
  --amber-soft: #fff3df;
  --danger: #c44141;
  --danger-soft: #fcecec;
  --purple: #7651a8;
  --purple-soft: #f1ecfa;
  --shadow: 0 8px 28px rgba(25, 39, 52, 0.07);
  --radius: 8px;
  --sidebar-width: 250px;
  --topbar-height: 64px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #eef2f4;
}

.login-screen.is-open {
  display: flex;
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(18, 32, 45, 0.16);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

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

.login-brand strong {
  font-size: 13px;
}

.login-brand span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.login-copy {
  margin: 24px 0 18px;
}

.login-copy h1 {
  margin: 0;
  font-size: 24px;
}

.login-copy p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

#loginForm {
  display: grid;
  gap: 13px;
}

#loginForm label {
  display: grid;
  gap: 7px;
}

#loginForm label > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

#loginForm input {
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
}

.login-button {
  width: 100%;
  min-height: 40px;
}

.login-remember {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
}

.login-remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.login-remember span {
  color: var(--ink-soft);
  font-size: 10px;
}

.login-error {
  padding: 9px 10px;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 10px;
}

.logout-button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 9px;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(23, 107, 85, 0.18);
  outline-offset: 1px;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  background: var(--navy);
  color: #fff;
}

.brand {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 11px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #f0d6ca;
  color: #7b302e;
  font-size: 18px;
  font-weight: 800;
}

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

.brand strong {
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
}

.brand span {
  margin-top: 3px;
  color: #9fb0c1;
  font-size: 11px;
}

.main-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 14px 10px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #bec9d5;
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

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

.nav-item.is-active {
  background: #263f5c;
  color: #fff;
  box-shadow: inset 3px 0 0 #75c6aa;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.nav-item span {
  flex: 1;
  font-size: 13px;
}

.nav-item em {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.nav-item em.danger-badge {
  background: #9c3939;
}

.sidebar-foot {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-state {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
  padding: 11px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
}

.ai-state .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64c89f;
  box-shadow: 0 0 0 4px rgba(100, 200, 159, 0.12);
}

.ai-state strong,
.ai-state span {
  display: block;
}

.ai-state strong {
  color: #eef4f8;
  font-size: 12px;
}

.ai-state span {
  margin-top: 2px;
  color: #8fa2b5;
  font-size: 10px;
}

.nav-item.compact {
  min-height: 36px;
  font-size: 12px;
}

.workspace {
  width: calc(100% - var(--sidebar-width));
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.global-search {
  display: flex;
  width: min(460px, 48vw);
  height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.global-search svg {
  color: var(--ink-faint);
}

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.global-search kbd {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink-faint);
  font-family: inherit;
  font-size: 10px;
}

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

.sync-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11px;
}

.sync-state span,
.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #42a77d;
}

.icon-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-soft);
}

.icon-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.icon-button i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--danger);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 2px;
}

.user-chip > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #dec5b8;
  color: #693b34;
  font-weight: 700;
}

.user-chip strong,
.user-chip small {
  display: block;
}

.user-chip strong {
  font-size: 12px;
}

.user-chip small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
}

.mobile-menu {
  display: none;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.mobile-menu span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
}

main {
  padding: 26px 28px 40px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: view-in 180ms ease;
}

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

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-heading h1 {
  margin: 3px 0 6px;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-heading p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.button svg {
  width: 16px;
  height: 16px;
}

.button.primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 9px rgba(23, 107, 85, 0.16);
}

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

.button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.button.secondary:hover,
.button.ghost:hover {
  background: var(--surface-soft);
}

.button.ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.text-button svg {
  width: 14px;
  height: 14px;
}

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

.metric {
  position: relative;
  min-height: 116px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(25, 39, 52, 0.025);
}

.metric::after {
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--surface-soft);
  content: "";
}

.metric.accent {
  border-color: #e8c7c7;
  background: #fffafa;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 11px;
}

.metric-label span {
  color: var(--ink-faint);
  font-size: 9px;
}

.metric > strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 9px;
  font-size: 29px;
  line-height: 1;
}

.metric-foot {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 10px;
}

.metric-foot.good {
  color: var(--primary);
}

.metric-foot.warn {
  color: var(--amber);
}

.metric-foot.danger {
  color: var(--danger);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.7fr);
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 9px rgba(25, 39, 52, 0.025);
}

.panel-head {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head h2 {
  margin: 0;
  font-size: 14px;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.pipeline-panel {
  grid-row: span 2;
}

.funnel {
  display: grid;
  gap: 12px;
  padding: 19px 17px 15px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 70px 1fr 28px;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 11px;
}

.funnel-row strong {
  color: var(--ink);
  text-align: right;
}

.funnel-track {
  height: 7px;
  overflow: hidden;
  border-radius: 5px;
  background: #edf0f2;
}

.funnel-track i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--blue);
}

.funnel-track.success i {
  background: var(--primary);
}

.stage-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
}

.stage-strip > div {
  min-width: 0;
  padding: 14px 11px;
  border-right: 1px solid var(--line-soft);
}

.stage-strip > div:last-child {
  border-right: 0;
}

.stage-strip span,
.stage-strip strong,
.stage-strip small {
  display: block;
}

.stage-strip span {
  color: var(--ink-soft);
  font-size: 10px;
}

.stage-strip strong {
  margin: 6px 0 4px;
  font-size: 20px;
}

.stage-strip small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-strip .is-warning {
  background: #fffcf6;
}

.stage-strip .is-warning strong {
  color: var(--amber);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 10px;
}

.compact-list {
  max-height: 312px;
  overflow: auto;
}

.task-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row:hover {
  background: var(--surface-soft);
}

.severity-bar {
  width: 4px;
  height: 34px;
  border-radius: 3px;
  background: var(--amber);
}

.severity-bar.danger {
  background: var(--danger);
}

.severity-bar.info {
  background: var(--blue);
}

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

.task-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-copy span {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.45;
}

.task-time {
  color: var(--ink-faint);
  font-size: 9px;
  white-space: nowrap;
}

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

.platform-cell {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-soft);
}

.platform-cell header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.platform-cell strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-cell i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #44a87f;
}

.platform-cell i.warn {
  background: var(--amber);
}

.platform-cell p {
  margin: 7px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.platform-cell b {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.activity-list {
  max-height: 326px;
  overflow: auto;
}

.activity-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.activity-icon.human {
  background: var(--blue-soft);
  color: var(--blue);
}

.activity-icon.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

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

.activity-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy span {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
}

.activity-item time {
  color: var(--ink-faint);
  font-size: 9px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

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

.segmented button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.segmented button.is-active {
  background: var(--navy);
  color: #fff;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-search {
  display: flex;
  width: 240px;
  height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.inline-search svg {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.inline-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.inline-select {
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 10px;
}

.date-input {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-faint);
  font-size: 9px;
}

.date-input input {
  min-width: 108px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px;
}

.table-panel {
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

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

th {
  background: #fafbfc;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

td {
  color: var(--ink-soft);
  font-size: 11px;
}

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

tbody tr:hover {
  background: #fbfcfc;
}

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

.candidate-cell,
.product-cell,
.listing-product {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-thumb {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f2ee;
}

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

.product-thumb span {
  position: absolute;
  width: 9px;
  height: 27px;
  border-radius: 5px 5px 3px 3px;
  transform: rotate(8deg);
}

.product-thumb span:nth-child(1) {
  top: 9px;
  left: 8px;
  background: #d09b92;
}

.product-thumb span:nth-child(2) {
  top: 7px;
  left: 18px;
  background: #e4c0b6;
}

.product-thumb span:nth-child(3) {
  top: 10px;
  left: 28px;
  background: #a9726d;
}

.product-thumb.v2 {
  background: #edf3f0;
}

.product-thumb.v2 span:nth-child(1) {
  background: #6f9b8a;
}

.product-thumb.v2 span:nth-child(2) {
  background: #a8c7ba;
}

.product-thumb.v2 span:nth-child(3) {
  background: #4c7465;
}

.product-thumb.v3 {
  background: #f5f0e8;
}

.product-thumb.v3 span:nth-child(1) {
  background: #d6a541;
}

.product-thumb.v3 span:nth-child(2) {
  background: #edd492;
}

.product-thumb.v3 span:nth-child(3) {
  background: #a27322;
}

.product-thumb.v4 {
  background: #f2eef7;
}

.product-thumb.v4 span:nth-child(1) {
  background: #876ca9;
}

.product-thumb.v4 span:nth-child(2) {
  background: #b8a5d0;
}

.product-thumb.v4 span:nth-child(3) {
  background: #654681;
}

.product-thumb.has-image img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.candidate-cell strong,
.product-cell strong,
.listing-product strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.candidate-cell small,
.product-cell small,
.listing-product small {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.candidate-note {
  display: block;
  max-width: 220px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--amber);
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-note.overdue-note {
  color: var(--danger);
  font-weight: 700;
}

.score {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.score-track {
  width: 46px;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line-soft);
}

.score-track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.approved,
.status-pill.done {
  background: var(--primary-soft);
  color: var(--primary);
}

.status-pill.failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.info,
.status-pill.running {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.manual {
  background: var(--purple-soft);
  color: var(--purple);
}

.designer-tag {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.designer-tag.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.selection-source {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.selection-source.ai {
  background: var(--purple-soft);
  color: var(--purple);
}

.selection-source.unknown {
  background: var(--line-soft);
  color: var(--ink-faint);
}

.table-action {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
}

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

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.table-action.danger-action {
  border-color: #e5bcbc;
  background: var(--danger-soft);
  color: var(--danger);
}

.table-action.danger-action:hover {
  border-color: var(--danger);
}

.empty-state {
  display: none;
  padding: 50px 20px;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(7, minmax(210px, 1fr));
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  min-height: 480px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #edf0f2;
}

.kanban-head {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f9;
}

.kanban-head > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.kanban-head strong {
  font-size: 11px;
}

.kanban-head span {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 10px;
  background: #e5e9ec;
  color: var(--ink-soft);
  font-size: 9px;
}

.kanban-head button {
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-size: 18px;
}

.kanban-body {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.product-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(25, 39, 52, 0.035);
  transition: border 140ms ease, transform 140ms ease;
}

.product-card:hover {
  border-color: #a7b8c9;
  transform: translateY(-1px);
}

.product-card.risk {
  border-left: 3px solid var(--danger);
}

.product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-card h3 {
  margin: 10px 0 4px;
  font-size: 12px;
}

.product-code {
  color: var(--ink-faint);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.product-meta span {
  color: var(--ink-faint);
  font-size: 9px;
}

.owner {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 9px;
}

.owner i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #e5e9ec;
  color: var(--ink-soft);
  font-size: 9px;
  font-style: normal;
}

.due {
  color: var(--amber);
  font-size: 9px;
  font-weight: 700;
}

.due.danger {
  color: var(--danger);
}

.media-summary,
.listing-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.media-summary > div,
.listing-stat {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.media-summary span,
.media-summary strong,
.media-summary small,
.listing-stat span,
.listing-stat strong,
.listing-stat small {
  display: block;
}

.media-summary span,
.listing-stat span {
  color: var(--ink-soft);
  font-size: 10px;
}

.media-summary strong,
.listing-stat strong {
  margin: 5px 0 3px;
  font-size: 21px;
}

.media-summary small,
.listing-stat small {
  color: var(--ink-faint);
  font-size: 9px;
}

.media-summary .media-risk strong,
.listing-stat.success strong {
  color: var(--danger);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.media-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.media-preview {
  position: relative;
  display: grid;
  min-height: 176px;
  place-items: center;
  overflow: hidden;
  background: #f7f2ee;
}

.media-preview.v2 {
  background: #edf3f0;
}

.media-preview.v3 {
  background: #f5f0e8;
}

.media-preview.v4 {
  background: #f2eef7;
}

.media-preview .nail-set {
  display: flex;
  gap: 7px;
  align-items: center;
  transform: rotate(-4deg);
}

.media-real-asset {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-preview .nail {
  width: 24px;
  height: 79px;
  border-radius: 14px 14px 7px 7px;
  background: #c99088;
  box-shadow: inset 0 9px 0 rgba(255, 255, 255, 0.22);
}

.media-preview.v2 .nail {
  background: #6f9b8a;
}

.media-preview.v3 .nail {
  background: #d6a541;
}

.media-preview.v4 .nail {
  background: #876ca9;
}

.media-preview .nail:nth-child(2) {
  height: 67px;
}

.media-preview .nail:nth-child(3) {
  height: 73px;
}

.media-preview .nail:nth-child(4) {
  height: 63px;
}

.media-preview .nail:nth-child(5) {
  height: 70px;
}

.media-type {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(24, 32, 42, 0.74);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
}

.media-ai {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 8px;
  font-weight: 800;
}

.media-card-body {
  padding: 12px;
}

.media-card-body strong {
  display: block;
  font-size: 11px;
}

.media-card-body span {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
}

.media-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 11px;
}

.listing-board {
  overflow: hidden;
}

.legend {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 9px;
}

.legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--primary);
}

.legend i.running {
  background: var(--blue);
}

.legend i.manual {
  background: var(--purple);
}

.legend i.failed {
  background: var(--danger);
}

.listing-table th,
.listing-table td {
  min-width: 96px;
}

.listing-table th:first-child,
.listing-table td:first-child {
  min-width: 210px;
}

.listing-table th:last-child,
.listing-table td:last-child {
  min-width: 120px;
}

.listing-table th:nth-child(3),
.listing-table td:nth-child(3) {
  min-width: 440px;
  max-width: 560px;
  white-space: normal;
}

.listing-store-list {
  display: flex;
  max-height: 158px;
  flex-wrap: wrap;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
}

.drawer-store-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.listing-store-chip {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 6px 6px 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.listing-store-chip > span {
  min-width: 0;
}

.listing-store-chip strong,
.listing-store-chip small {
  display: block;
}

.listing-store-chip strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-store-chip small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.listing-store-chip.done {
  border-color: #b8ddcf;
  background: var(--primary-soft);
}

.listing-store-chip.running {
  border-color: #bed3eb;
  background: var(--blue-soft);
}

.listing-store-chip.manual {
  border-color: #d8c7eb;
  background: var(--purple-soft);
}

.listing-store-chip.failed {
  border-color: #e8bebe;
  background: var(--danger-soft);
}

.listing-store-chip button {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 32, 42, 0.08);
  color: var(--ink-soft);
}

.listing-store-chip button:hover {
  background: var(--danger);
  color: #fff;
}

.listing-store-chip button svg {
  width: 11px;
  height: 11px;
}

.listing-store-empty {
  color: var(--ink-faint);
  font-size: 9px;
}

.listing-progress strong,
.listing-progress span {
  display: block;
}

.listing-progress strong {
  color: var(--ink);
  font-size: 14px;
}

.listing-progress span {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.5;
  white-space: normal;
}

.product-library-media {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 6px;
}

.product-library-assets {
  display: grid;
  gap: 7px;
}

.library-development {
  display: grid;
  min-width: 260px;
  gap: 8px;
}

.library-development-meta strong,
.library-development-meta span,
.library-development-meta small {
  display: block;
}

.library-development-meta strong {
  color: var(--ink);
  font-size: 10px;
}

.library-development-meta span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 8px;
}

.library-development-meta small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8px;
}

.library-development-assets {
  display: grid;
  grid-template-columns: repeat(4, 42px);
  gap: 6px;
}

.library-development-slot {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #c7ced5;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink-faint);
  font-size: 7px;
  text-align: center;
}

.library-development-slot.has-asset {
  border-style: solid;
}

.library-development-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.process-price strong,
.process-price small {
  display: block;
}

.process-price strong {
  color: var(--ink);
  font-size: 10px;
}

.process-price small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8px;
  white-space: normal;
}

.product-library-assets > .table-action {
  width: fit-content;
}

.product-library-slot {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #c7ced5;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--ink-faint);
  font-size: 8px;
  text-align: center;
}

.product-library-download {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 32, 42, 0.78);
  color: #fff;
}

.product-library-download svg {
  width: 10px;
  height: 10px;
  transform: rotate(180deg);
}

.product-library-slot.has-asset {
  border-style: solid;
}

.product-library-slot img,
.product-library-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.product-code-list span {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  white-space: nowrap;
}

#view-skus td:first-child,
#view-skus th:first-child {
  min-width: 240px;
}

#view-skus td:nth-child(2),
#view-skus th:nth-child(2) {
  min-width: 300px;
}

#view-skus td:nth-child(4),
#view-skus th:nth-child(4) {
  min-width: 210px;
}

.store-status {
  display: inline-grid;
  min-width: 32px;
  height: 25px;
  place-items: center;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
}

.store-status.running {
  background: var(--blue-soft);
  color: var(--blue);
}

.store-status.manual {
  background: var(--purple-soft);
  color: var(--purple);
}

.store-status.failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.store-status.none {
  background: var(--line-soft);
  color: var(--ink-faint);
}

.task-tabs {
  margin-bottom: 16px;
}

.task-cards {
  display: grid;
  gap: 11px;
}

.task-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.task-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
}

.task-card-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.task-card-icon.info {
  background: var(--blue-soft);
  color: var(--blue);
}

.task-card-copy {
  min-width: 0;
}

.task-card-copy strong {
  display: block;
  font-size: 12px;
}

.task-card-copy p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.task-card-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 9px;
}

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

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

.rule-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.rule-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rule-card-top > div {
  flex: 1;
}

.rule-card-top strong,
.rule-card-top small {
  display: block;
}

.rule-card-top strong {
  font-size: 12px;
}

.rule-card-top small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.platform-logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.platform-logo.douyin {
  background: #edf1f3;
  color: #20262c;
}

.platform-logo.shein {
  background: #f0eeee;
  color: #121212;
}

.platform-logo.temu {
  background: #fff0e9;
  color: #c65019;
}

.platform-logo.shopify {
  background: #eaf3e7;
  color: #3d7541;
}

.platform-logo.full {
  background: #f2ecf7;
  color: #73538f;
}

.rule-state {
  padding: 4px 7px;
  border-radius: 12px;
  font-size: 8px;
  font-weight: 800;
}

.rule-state.good {
  background: var(--primary-soft);
  color: var(--primary);
}

.rule-state.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.rule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}

.rule-meta span {
  padding: 5px 7px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 8px;
}

.permission-note {
  color: var(--ink-faint);
  font-size: 9px;
}

.account-department {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.account-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
}

.account-status.disabled {
  color: var(--ink-faint);
}

.account-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.job-level {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--purple-soft);
  color: var(--purple);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.permission-summary {
  color: var(--ink-soft);
  font-size: 9px;
}

.permission-masked {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: normal;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
  padding: 18px 20px;
}

.permission-group {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.permission-group > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 10px;
}

.permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.permission-actions label {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 9px;
}

.permission-actions input {
  accent-color: var(--primary);
}

.permission-admin-note {
  margin: 0 20px 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
}

.department-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.department-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 9px;
}

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

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

.permission-template-editor {
  margin-bottom: 18px;
}

.org-editor-panel {
  margin-bottom: 18px;
}

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

.org-editor-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.org-editor-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.org-editor-card header strong {
  font-size: 11px;
}

.org-editor-card header button {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
}

.org-editor-list {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
}

.org-editor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.org-editor-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-editor-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.org-editor-actions button {
  min-height: 22px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 8px;
}

.org-editor-actions button:last-child {
  color: var(--danger);
}

.permission-template-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px 0;
}

.permission-template-controls label {
  display: grid;
  gap: 7px;
}

.permission-template-controls label > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.permission-template-controls select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}

.position-function-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.position-function-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.position-function-card header strong,
.position-function-card header small {
  display: block;
}

.position-function-card header strong {
  font-size: 12px;
}

.position-function-card header small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
}

.position-function-card p {
  margin: 10px 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

.position-function-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.position-function-list li {
  position: relative;
  padding-left: 12px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.position-function-list li::before {
  position: absolute;
  top: 6px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  content: "";
}

.position-function-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.position-function-tags span {
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 8px;
}

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  background: rgba(17, 26, 37, 0.34);
}

.drawer-backdrop.is-open,
.modal-backdrop.is-open {
  display: block;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  width: min(580px, 92vw);
  flex-direction: column;
  background: #fff;
  box-shadow: -12px 0 36px rgba(17, 26, 37, 0.17);
  transform: translateX(102%);
  transition: transform 210ms ease;
}

.detail-drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 4px 0 0;
  font-size: 19px;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.detail-hero {
  display: flex;
  gap: 15px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-hero-copy {
  min-width: 0;
  flex: 1;
}

.detail-hero-copy h3 {
  margin: 1px 0 5px;
  font-size: 14px;
}

.detail-hero-copy p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

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

.detail-grid > div {
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

.detail-grid span {
  color: var(--ink-faint);
  font-size: 9px;
}

.detail-grid strong {
  margin-top: 5px;
  font-size: 12px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.section-label h3 {
  margin: 0;
  font-size: 12px;
}

.section-label span {
  color: var(--ink-faint);
  font-size: 9px;
}

.workflow-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.workflow-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.workflow-row:last-child {
  border-bottom: 0;
}

.workflow-step {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--line-soft);
  color: var(--ink-faint);
}

.workflow-step.done {
  background: var(--primary);
  color: #fff;
}

.workflow-step.active {
  background: var(--amber-soft);
  color: var(--amber);
}

.workflow-step svg {
  width: 13px;
  height: 13px;
}

.workflow-copy strong,
.workflow-copy span {
  display: block;
}

.workflow-copy strong {
  font-size: 10px;
}

.workflow-copy span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.workflow-row time {
  color: var(--ink-faint);
  font-size: 9px;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 90;
  display: none;
  width: min(620px, calc(100vw - 28px));
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 26, 37, 0.26);
  transform: translate(-50%, -50%);
}

.modal.is-open {
  display: block;
}

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

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

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 20px;
}

.form-grid label {
  display: grid;
  gap: 7px;
}

.form-grid label.full {
  grid-column: 1 / -1;
}

.form-grid label > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.form-grid input,
.form-grid select {
  height: 38px;
  padding: 0 10px;
}

.form-grid textarea {
  resize: vertical;
  padding: 10px;
}

.image-field {
  display: grid;
  gap: 7px;
}

.image-field > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.paste-zone {
  min-height: 122px;
  padding: 10px;
  border: 1px dashed #b8c2cc;
  border-radius: 8px;
  background: var(--surface-soft);
}

.paste-zone:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(23, 107, 85, 0.12);
}

.paste-empty {
  display: flex;
  min-height: 100px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--ink-faint);
}

.paste-empty svg {
  width: 25px;
  height: 25px;
  margin-bottom: 8px;
  color: var(--primary);
}

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

.paste-empty strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.paste-empty span {
  margin-top: 4px;
  font-size: 9px;
}

.paste-preview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.paste-preview-item {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.paste-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.paste-preview-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 32, 42, 0.76);
  color: #fff;
}

.paste-preview-item button svg {
  width: 11px;
  height: 11px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.review-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 20px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.review-summary > div {
  min-width: 0;
  flex: 1;
}

.review-summary strong,
.review-summary span {
  display: block;
}

.review-summary strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-summary div > span {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
}

.designer-capacity {
  margin: 0 20px 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--blue);
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  line-height: 1.55;
}

.asset-modal-intro {
  margin: 18px 20px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--primary);
  border-radius: 5px;
  background: var(--primary-soft);
}

.asset-modal-intro strong,
.asset-modal-intro span {
  display: block;
}

.asset-modal-intro strong {
  color: var(--primary-dark);
  font-size: 12px;
}

.asset-modal-intro span {
  margin-top: 4px;
  color: var(--primary);
  font-size: 9px;
}

.development-basic-info {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.9fr);
  gap: 12px;
  padding: 16px 20px 0;
}

.development-basic-info > label,
.process-choice label {
  display: grid;
  gap: 6px;
}

.development-basic-info > label > span,
.process-choice legend {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.development-basic-info input[type="text"],
.development-basic-info > label input,
.development-basic-info select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.process-choice {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.process-choice legend {
  padding: 0 5px;
}

.process-choice label {
  display: flex;
  min-height: 31px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-soft);
}

.process-choice label:has(input:checked) {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.process-choice input {
  accent-color: var(--primary);
}

.process-choice span {
  font-size: 9px;
}

.asset-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px;
}

.visual-submit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px;
}

.asset-upload-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.asset-upload-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(23, 107, 85, 0.1);
}

.asset-upload-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.asset-upload-card header strong {
  font-size: 11px;
}

.asset-upload-card header span {
  color: var(--ink-faint);
  font-size: 9px;
}

.asset-drop {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  border: 1px dashed #b8c2cc;
  border-radius: 7px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 10px;
}

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

.asset-drop svg {
  width: 15px;
  height: 15px;
}

.asset-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.asset-preview:empty {
  display: none;
}

.asset-preview-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.asset-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-preview-item button {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 32, 42, 0.76);
  color: #fff;
}

.asset-preview-item button svg {
  width: 10px;
  height: 10px;
}

.pricing-grid {
  padding-top: 16px;
}

#processPricePreview {
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  font-weight: 700;
}

.decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px 20px 8px;
}

.review-template-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 20px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.review-template-bar > span {
  margin-right: auto;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
}

.review-template-bar button {
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

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

.visual-review-groups {
  display: grid;
  gap: 12px;
  padding: 18px 20px 10px;
}

.visual-review-group {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.visual-review-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.visual-review-group header strong {
  font-size: 11px;
}

.visual-review-group header span {
  color: var(--ink-faint);
  font-size: 9px;
}

.visual-review-assets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.visual-review-asset {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.visual-review-asset img,
.visual-review-asset video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-review-empty {
  padding: 14px;
  color: var(--ink-faint);
  font-size: 9px;
  text-align: center;
}

.listing-task-modal {
  width: min(720px, calc(100vw - 28px));
}

.listing-task-body {
  padding: 18px 20px 8px;
}

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

.listing-task-summary > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.listing-task-summary span,
.listing-task-summary strong {
  display: block;
}

.listing-task-summary span {
  color: var(--ink-faint);
  font-size: 9px;
}

.listing-task-summary strong {
  margin-top: 5px;
  font-size: 18px;
}

.listing-task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 10px;
}

.listing-task-toolbar span {
  color: var(--ink-faint);
  font-size: 9px;
}

.listing-task-store-list {
  display: grid;
  gap: 7px;
  max-height: 48vh;
  overflow: auto;
}

.listing-task-store {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.listing-task-store strong,
.listing-task-store small {
  display: block;
}

.listing-task-store strong {
  font-size: 10px;
}

.listing-task-store small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.decision-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.decision-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.decision-option.rework:has(input:checked) {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.decision-option input {
  accent-color: var(--primary);
}

.decision-option strong,
.decision-option small {
  display: block;
}

.decision-option strong {
  font-size: 11px;
}

.decision-option small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
}

.rework-field {
  padding: 8px 20px 18px;
}

.rework-field label {
  display: grid;
  gap: 7px;
}

.rework-field label > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.rework-field textarea {
  width: 100%;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
}

.development-assets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.development-asset-group {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.development-asset-group > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-size: 8px;
}

.development-asset-group img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 5px;
  object-fit: cover;
}

.development-asset-group video {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 5px;
  object-fit: cover;
}

.price-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.price-summary > div {
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.price-summary span,
.price-summary strong {
  display: block;
}

.price-summary span {
  color: var(--ink-faint);
  font-size: 8px;
}

.price-summary strong {
  margin-top: 5px;
  font-size: 12px;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
}

.hover-image-preview {
  position: fixed;
  z-index: 220;
  display: none;
  width: min(390px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid #cfd6dc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(17, 26, 37, 0.24);
  pointer-events: none;
}

.hover-image-preview.is-visible {
  display: block;
}

.hover-image-preview img {
  display: block;
  width: 100%;
  max-height: min(68vh, 520px);
  border-radius: 5px;
  object-fit: contain;
  background: #f5f6f7;
}

.hover-image-preview span {
  display: block;
  padding: 7px 4px 2px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease;
}

.toast.warn {
  border-left-color: var(--amber);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
}

.toast.warn .toast-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.toast.error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

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

.toast strong {
  font-size: 11px;
}

.toast span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

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

@media (max-width: 1280px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .pipeline-panel {
    grid-row: auto;
  }

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

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

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .workspace {
    width: 100%;
    margin-left: 0;
  }

  .mobile-menu {
    display: block;
    flex: 0 0 auto;
  }

  .global-search {
    width: auto;
    flex: 1;
  }

  .sync-state,
  .user-chip div,
  .global-search kbd {
    display: none;
  }

  .topbar {
    padding: 0 16px;
  }

  main {
    padding: 20px 16px 34px;
  }

  .page-heading {
    align-items: flex-start;
  }

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

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

@media (max-width: 700px) {
  .page-heading {
    flex-direction: column;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .button {
    flex: 1;
  }

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

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

  .stage-strip > div {
    border-bottom: 1px solid var(--line-soft);
  }

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

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segmented button {
    flex: 0 0 auto;
  }

  .toolbar-right {
    width: 100%;
  }

  .inline-search {
    width: auto;
    flex: 1;
  }

  .media-grid,
  .rule-grid {
    grid-template-columns: 1fr;
  }

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

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

  .task-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

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

  .form-grid label.full {
    grid-column: auto;
  }
}

@media (max-width: 460px) {
  .metric-grid,
  .media-summary,
  .listing-overview {
    grid-template-columns: 1fr;
  }

  .top-actions .icon-button {
    display: none;
  }
}
