:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: #333a32;
  background: #f5f5f1;
  --accent: #c98d40;
  --line: #e8e7df;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #4e554a;
  padding: 10px 15px;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  background: #cd954f;
  border-color: #cd954f;
  color: white;
}
button.danger {
  color: #c4533e;
}
button.small {
  padding: 7px 10px;
  font-size: 13px;
}
a {
  color: #9d6e30;
  text-decoration: none;
}
input,
select,
textarea {
  border: 1px solid #dedfd5;
  border-radius: 7px;
  background: white;
  color: #333;
  padding: 10px;
  width: 100%;
  min-height: 40px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
label {
  font-size: 13px;
  color: #777f70;
  display: block;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  font-weight: 650;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 16px;
}
.sub {
  font-size: 13px;
  color: #929789;
  line-height: 1.8;
  margin-top: 9px;
}
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 30px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-weight: 700;
  color: #6e552f;
  font-size: 21px;
  letter-spacing: 2px;
}
.brand small {
  display: block;
  color: #9f9c8d;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  margin-top: 8px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 42px;
}
.nav button {
  border: 0;
  text-align: left;
  background: transparent;
  padding: 14px 17px;
  color: #7e8277;
}
.nav button.active {
  background: #faf2e5;
  color: #ad7833;
  font-weight: 600;
}
.sidebar-foot {
  position: absolute;
  bottom: 28px;
  left: 30px;
  right: 25px;
  color: #aaa;
  font-size: 12px;
  line-height: 1.8;
}
.main {
  padding: 32px 38px;
  min-width: 0;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 15px;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.demo {
  background: #fff3dd;
  color: #ab7c35;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 30px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 22px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.stat .value {
  font-size: 30px;
  margin: 14px 0 6px;
  font-weight: 650;
  color: #484e3d;
}
.stat .label {
  font-size: 13px;
  color: #8e9485;
}
.stat .hint {
  font-size: 11px;
  color: #acb09f;
}
.filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 23px;
}
.filters label {
  min-width: 140px;
  flex: 1;
}
.filters label.keyword {
  flex: 2;
  min-width: 180px;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 16px 12px;
  border-bottom: 1px solid #efeee7;
  vertical-align: middle;
  line-height: 1.7;
}
th {
  font-size: 12px;
  color: #8f9585;
  background: #fafaf6;
  font-weight: 500;
  white-space: nowrap;
}
td .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}
.product-cell img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 7px;
}
.muted {
  color: #969d8c;
}
.money {
  color: #cb7851;
  font-weight: 600;
  white-space: nowrap;
}
.status {
  display: inline-block;
  background: #f7f3e8;
  border-radius: 4px;
  padding: 4px 8px;
  color: #9a7a3b;
  font-size: 12px;
  white-space: nowrap;
}
.status.green {
  background: #eef5eb;
  color: #718467;
}
.status.gray {
  background: #f3f3ee;
  color: #9a9a90;
}
.empty {
  text-align: center;
  color: #a2a696;
  padding: 58px 20px;
  line-height: 2;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 23px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 25px;
}
.sku-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr auto;
  gap: 10px;
  margin-top: 12px;
  align-items: end;
}
.sku-row label {
  font-size: 12px;
}
.note {
  background: #faf7ef;
  color: #9b875d;
  font-size: 12px;
  line-height: 1.8;
  padding: 14px;
  border-radius: 6px;
  margin: 16px 0;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(130deg, #f5eddf, #fff);
}
.login-box {
  width: 400px;
  max-width: 94vw;
  padding: 42px;
  background: #fff;
  border: 1px solid #e8e4d8;
  border-radius: 15px;
  box-shadow: 0 15px 80px #9b875710;
}
.login-box label {
  margin-top: 22px;
}
.login-box button {
  width: 100%;
  margin-top: 28px;
}
.section-gap {
  margin-top: 24px;
}
dialog {
  border: 1px solid #e6e4da;
  border-radius: 14px;
  padding: 30px;
  max-width: 880px;
  width: 90vw;
  max-height: 90vh;
  color: #3d4439;
}
dialog::backdrop {
  background: #222a2250;
}
#toast {
  position: fixed;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  background: #3b4136;
  color: #fff;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 100;
  display: none;
}
.order-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  font-size: 13px;
  line-height: 1.8;
}
.photo-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.photo-row img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 7px;
}
.error {
  color: #bb5947;
}
.summary-lines {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.chip {
  font-size: 12px;
  color: #8c907e;
  background: #f5f5ee;
  padding: 6px 12px;
  border-radius: 5px;
}
.danger-note {
  font-size: 12px;
  color: #b8794c;
  margin-top: 10px;
}
.setting-image {
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 170px 1fr;
  }
  .main {
    padding: 24px;
  }
  .brand {
    font-size: 17px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .layout {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 18px;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
    margin-top: 18px;
    gap: 3px;
  }
  .nav button {
    white-space: nowrap;
    padding: 10px;
  }
  .sidebar-foot {
    display: none;
  }
  .main {
    padding: 18px;
  }
  .top {
    align-items: flex-start;
  }
  .top-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .panel {
    padding: 17px;
  }
  .form-grid,
  .order-meta {
    grid-template-columns: 1fr;
  }
  .sku-row {
    grid-template-columns: 1fr 1fr;
  }
  .sku-row label:first-child {
    grid-column: 1/-1;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat .value {
    font-size: 24px;
  }
  .grid-2 {
    display: block;
  }
}
