* {
  box-sizing: border-box;
}
html {
  --paper: #f6f5ef;
  --ink: #292d25;
  --muted: #646961;
  --line: #dcdfd4;
  --deep: #242821;
  --gold: #ffc45c;
  --green: #42664d;
  --white: #fffefa;
  --round: 12px;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.55 "Inter",
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    sans-serif;
  font-synthesis: none;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select,
input[type="checkbox"] {
  cursor: pointer;
}
button {
  background: none;
  border: 0;
  padding: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #91801e;
  outline-offset: 3px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  line-height: 1.35;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
td,
th {
  padding: 13px 15px;
  text-align: left;
  white-space: nowrap;
}
th {
  background: #f6f6f0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
td {
  border-top: 1px solid #e9ebe2;
}
tbody tr:hover {
  background: #fafaf5;
}
input,
select,
textarea {
  background: var(--white);
  border: 1px solid #c9cec1;
  border-radius: 7px;
  min-height: 39px;
  padding: 8px 10px;
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 75px;
}
input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  height: 16px;
  accent-color: #496a48;
  vertical-align: middle;
}
input::placeholder {
  color: #909489;
}
small,
.muted {
  font-size: 12px;
  color: var(--muted);
}
.num,
.money,
time,
.code {
  font-variant-numeric: tabular-nums;
}
.num,
.money {
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", sans-serif;
}
.code {
  font:
    500 12px/1.55 ui-monospace,
    Consolas,
    monospace;
  letter-spacing: 0.03em;
}
.icon {
  display: inline-flex;
  flex: none;
  width: 19px;
  height: 19px;
  align-items: center;
  justify-content: center;
}
.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn,
.icon-btn,
.link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn {
  border: 1px solid #cbd0c3;
  min-height: 38px;
  border-radius: 7px;
  background: var(--white);
  padding: 7px 13px;
  font-weight: 600;
  white-space: nowrap;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn:hover {
  background: #f1f2e9;
}
.btn.primary {
  background: var(--gold);
  border-color: #e9b85e;
  color: #302a1a;
}
.btn.primary:hover {
  background: #f4b54b;
}
.btn.dark {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
}
.btn.danger,
.link.danger {
  color: #a33b30;
}
.btn.small {
  font-size: 12px;
  min-height: 30px;
  padding: 3px 9px;
}
.link {
  color: #446244;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 0;
}
.link:hover {
  text-decoration: underline;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: var(--muted);
}
.icon-btn:hover {
  background: #eceee4;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.push {
  margin-left: auto;
}
.gap {
  display: grid;
  gap: 20px;
}
.boot {
  padding: 2rem;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--deep);
  color: #edefe5;
  display: flex;
  flex-direction: column;
  padding: 24px 15px 16px;
  z-index: 8;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 23px;
  border-bottom: 1px solid #41463c;
}
.brand-mark {
  width: 40px;
  height: 40px;
  background: var(--gold);
  color: #2c3326;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.brand-mark .icon {
  width: 28px;
  height: 28px;
}
.brand-mark img {
  max-width: 100%;
  max-height: 100%;
  border-radius: inherit;
  object-fit: contain;
}
.brand-copy {
  min-width: 0;
}
.brand strong {
  font-size: 18px;
  letter-spacing: 0.02em;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand small {
  color: #b9c1b2;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.nav {
  flex: 1;
  overflow: auto;
  padding-top: 14px;
}
.nav-group {
  padding: 12px 12px 7px;
  color: #a1aa99;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 7px;
  padding: 10px 12px;
  margin: 3px 0;
  color: #d0d5ca;
  font-size: 14px;
}
.nav a:hover {
  background: #33382f;
}
.nav a.active {
  background: #484938;
  color: #ffe2a3;
  font-weight: 600;
}
.nav a.active .icon {
  color: var(--gold);
}
.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #41463c;
  padding: 17px 4px 0;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e1e7c7;
  color: #3b4a36;
  font-weight: 700;
}
.side-user small {
  display: block;
  color: #a5ad9e;
  font-size: 11px;
}
.side-user strong {
  display: block;
  font-weight: 600;
  font-size: 13px;
}
.side-user .icon-btn {
  color: #c5ccbc;
}
.side-user .icon-btn:hover {
  background: #41483c;
}
.mobile-shade,
.mobile-nav {
  display: none;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 58px;
  padding: 0 clamp(20px, 3.3vw, 54px);
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
}
.crumb b {
  color: #42493e;
  font-weight: 600;
}
.crumb .icon {
  width: 13px;
  height: 13px;
}
.date {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.date .icon {
  width: 15px;
  height: 15px;
}
.main {
  margin: 0 auto;
  max-width: 1690px;
  padding: 30px clamp(20px, 3.3vw, 54px) 50px;
}
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 22px;
}
.page-head h1 {
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 720;
  letter-spacing: -0.045em;
}
.shell [hidden],
dialog [hidden] {
  display: none !important;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--round);
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}
.panel-head h2,
.section-title {
  font-size: 16px;
  letter-spacing: -0.02em;
}
.panel-head .link {
  font-size: 12px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.metric {
  padding: 17px 18px;
  position: relative;
}
.metric .label {
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.metric .label .icon {
  width: 16px;
  height: 16px;
  color: #78836e;
}
.metric strong {
  display: block;
  line-height: 1.25;
  font-size: clamp(21px, 2vw, 31px);
  letter-spacing: -0.045em;
  margin-top: 12px;
  overflow-wrap: anywhere;
  font-weight: 650;
}
.metric.hero {
  background: #343e30;
  border-color: #343e30;
  color: #fff8e8;
}
.metric.hero .label,
.metric.hero .label .icon {
  color: #e1e8d6;
}
.metric.hero strong {
  color: #ffda91;
}
.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(255px, 1fr);
  gap: 16px;
}
.chart-box {
  padding: 0 20px 10px;
  height: 216px;
  position: relative;
}
.chart-box canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.badge {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.45;
  padding: 3px 7px;
  background: #edefe8;
  color: #57604f;
  font-weight: 550;
}
.badge.green {
  background: #e5efe3;
  color: #3a6748;
}
.badge.amber {
  background: #fbefd9;
  color: #8a641b;
}
.badge.blue {
  background: #e4edf0;
  color: #3d626d;
}
.badge.red {
  background: #f4e8e4;
  color: #8c503f;
}
.badge.neutral {
  background: #edeee8;
  color: #62695e;
}
.queue {
  display: grid;
  padding: 0 20px 10px;
}
.queue button {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  border-top: 1px solid #e8ebe1;
  padding: 11px 0;
}
.queue button:first-child {
  border-top: 0;
}
.queue button > .icon {
  width: 15px;
  height: 15px;
  color: #8a9383;
}
.queue b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a6b8a4;
}
.dot.amber {
  background: #dfab4c;
}
.dot.green {
  background: #7f9c76;
}
.dot.blue {
  background: #87a8af;
}
.more-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 16px 6px;
}
.more-metrics > div {
  padding: 0 14px;
  border-left: 1px solid var(--line);
}
.more-metrics > div:first-child {
  border: 0;
}
.more-metrics strong {
  font-size: 19px;
  display: block;
  letter-spacing: -0.03em;
  margin-top: 3px;
}
.scroll {
  overflow: auto;
  max-width: 100%;
}
.tool-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 18px;
}
.tool-row input,
.tool-row select {
  width: auto;
  max-width: 100%;
}
.tool-row select {
  font-size: 13px;
}
.search {
  position: relative;
  max-width: 100%;
}
.search .icon {
  position: absolute;
  top: 10px;
  left: 11px;
  width: 17px;
  height: 17px;
  color: #77816f;
}
.search input {
  padding-left: 36px;
  width: 240px;
  font-size: 13px;
}
.inline-info {
  font-size: 12px;
  color: var(--muted);
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  color: var(--muted);
  font-size: 12px;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.pagination .actions {
  gap: 9px;
}
.empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
  white-space: normal;
}
.empty .icon {
  width: 27px;
  height: 27px;
  margin-bottom: 8px;
  color: #8c977e;
}
.empty b {
  font-size: 14px;
  display: block;
  font-weight: 600;
}
.error-box {
  padding: 25px;
}
.error-box p {
  margin: 6px 0 15px;
  color: #97493e;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.thumb,
.tile {
  width: 34px;
  height: 39px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #f0ead9;
  color: #8a7446;
  object-fit: cover;
}
.tile.green {
  background: #e5ecdb;
  color: #718054;
}
.name-cell strong {
  display: block;
}
.name-cell small {
  display: block;
}
.name-cell,
.wrap {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 90px;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  padding: 13px 11px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}
.tabs button.on {
  color: var(--ink);
  border-color: #bc8b2f;
  font-weight: 650;
}
dialog {
  border: 0;
}
.drawer,
dialog[open] {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(670px, 100%);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: -8px 0 30px #24282123;
}
dialog::backdrop {
  background: #1d231c63;
}
dialog article {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 23px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.drawer-head h2 {
  font-size: 20px;
}
.drawer-body {
  padding: 23px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.drawer-foot {
  border-top: 1px solid var(--line);
  padding: 14px 23px;
  background: var(--white);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  min-width: 0;
}
.field > span:first-child {
  font-weight: 600;
}
.field.wide,
.wide {
  grid-column: 1/-1;
}
.field small {
  line-height: 1.6;
}
.field-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 0;
}
.section {
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  margin-bottom: 15px;
}
.section h3 {
  font-size: 15px;
  margin-bottom: 13px;
}
.section:last-child {
  margin-bottom: 0;
}
.sku {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.sku:first-child {
  padding-top: 0;
}
.sku:last-child {
  border: 0;
}
.sku-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sku .actions {
  margin-bottom: 8px;
}
.desc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.desc-list dt {
  font-size: 12px;
  color: var(--muted);
}
.desc-list dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}
.form-error {
  color: #984536;
  background: #fbede8;
  padding: 8px 11px;
  border-radius: 6px;
  white-space: pre-line;
}
.form-error:empty {
  display: none;
}
.rule-row {
  display: grid;
  gap: 18px;
  grid-template-columns: 210px minmax(0, 570px);
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--round);
  padding: 22px;
}
.rule-row h2 {
  font-size: 16px;
}
.rule-row p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.settings {
  display: grid;
  gap: 14px;
}
.settings-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}
.hint {
  background: #edf0e5;
  color: #535f49;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 12px;
}
.progress-line {
  height: 6px;
  background: #e3e6d9;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-line i {
  display: block;
  height: 100%;
  background: #8da476;
}
.detail-block {
  margin-top: 16px;
}
.detail-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.small-list {
  display: grid;
  gap: 0;
}
.small-list > div {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.toast {
  padding: 10px 16px;
  color: white;
  background: #333e30;
  box-shadow: 0 3px 12px #21251f26;
  border-radius: 8px;
  max-width: min(90vw, 480px);
  white-space: pre-line;
}
.toast.bad {
  background: #854f40;
}
#notices {
  display: grid;
  gap: 6px;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  pointer-events: none;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(350px, 1fr);
}
.login-aside {
  background: var(--deep);
  color: #fff7e7;
  padding: clamp(28px, 6vw, 100px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-aside .brand {
  padding: 0;
  border: 0;
  align-self: flex-start;
}
.login-aside h1 {
  font-size: clamp(38px, 5.3vw, 80px);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 1.22;
  z-index: 1;
}
.login-aside h1 span {
  color: #ffd58a;
}
.login-aside .logo-wall {
  position: absolute;
  bottom: 10%;
  right: -62px;
  pointer-events: none;
  color: #a4ad8b;
  opacity: 0.08;
  transform: rotate(13deg);
}
.login-aside .logo-wall .icon {
  width: clamp(230px, 30vw, 440px);
  height: clamp(230px, 30vw, 440px);
}
.login-aside .logo-wall svg {
  stroke-width: 0.65;
}
.login-main {
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 30px;
}
.login-card {
  width: min(350px, 100%);
}
.login-card h2 {
  font-size: 27px;
  letter-spacing: -0.04em;
  margin-bottom: 26px;
}
.login-card .field {
  margin-bottom: 16px;
}
.login-card .btn {
  margin-top: 9px;
  width: 100%;
  min-height: 44px;
}
.login-card .form-error {
  margin: 9px 0;
}
.login-foot {
  font-size: 12px;
  color: #b3bca8;
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .side {
    padding-left: 12px;
    padding-right: 12px;
  }
  .metric-grid {
    gap: 10px;
  }
  .rule-row {
    grid-template-columns: 155px 1fr;
  }
  .more-metrics > div {
    padding: 0 10px;
  }
}
@media (max-width: 900px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-grid {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.75fr);
  }
  .more-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 0;
  }
  .more-metrics > div:nth-child(4) {
    border: 0;
  }
  .chart-box {
    padding-left: 12px;
    padding-right: 12px;
  }
  .main {
    padding-top: 22px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .side {
    position: fixed;
    left: 0;
    top: 0;
    width: 225px;
    transform: translateX(-100%);
    transition: transform 0.16s;
  }
  .side.shown {
    transform: none;
  }
  .mobile-shade.on {
    display: block;
    position: fixed;
    inset: 0;
    background: #24282166;
    z-index: 7;
  }
  .mobile-nav {
    display: inline-flex;
  }
  .topbar {
    height: 51px;
    padding: 0 14px;
    gap: 5px;
  }
  .main {
    padding: 20px 14px 35px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .chart-box {
    height: 193px;
  }
  .page-head {
    margin-bottom: 16px;
  }
  .rule-row {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
  }
  .login-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .login-aside {
    padding: 24px;
  }
  .login-aside h1,
  .login-foot,
  .login-aside .logo-wall {
    display: none;
  }
  .tool-row {
    padding: 12px;
  }
  .search input {
    width: min(225px, 100%);
  }
  .actions {
    gap: 7px;
  }
  .date {
    font-size: 11px;
  }
  .panel-head {
    padding: 14px 16px;
  }
  .drawer-head,
  .drawer-body,
  .drawer-foot {
    padding: 15px;
  }
  .metric {
    padding: 14px;
  }
  .more-metrics strong {
    font-size: 16px;
  }
}
@media (max-width: 430px) {
  .form-grid,
  .desc-list {
    grid-template-columns: 1fr;
  }
  .sku-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-head {
    flex-wrap: wrap;
  }
  .metric .label {
    font-size: 12px;
  }
  .more-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .more-metrics > div:nth-child(2n + 1) {
    border: 0;
  }
  .more-metrics > div:nth-child(4) {
    border-left: 1px solid var(--line);
  }
  .topbar .date .icon {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.login-aside {
  background:
    linear-gradient(
      180deg,
      rgba(23, 29, 19, 0.68),
      rgba(24, 29, 18, 0.16) 44%,
      rgba(21, 27, 18, 0.86)
    ),
    url("/assets/cover.jpg") center/cover no-repeat,
    var(--deep);
}
@media (max-width: 760px) {
  .login-aside {
    background: var(--deep);
  }
}
