:root {
  --bg: #f5f8fa;
  --card: #fff;
  --line: #e8e8ea;
  --txt: #0f0d15;
  --txt-2: #615e69;
  --muted: #a1a6ab;
  --brand: #00a971;
  --brand-hover: #008f60;
  --brand-ink: #0f0d15;
  --brand-soft: #e8f6ef;
  --price: #ff6a00;
  --top-h: 52px;
  --side: 208px;
  --radius: 8px;
  --control: 32px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-hover: 0 12px 32px rgba(16, 24, 40, 0.12);
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --num: "SF Pro Display", "DIN Alternate", "Tabular Nums", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.qc-shell {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(16,24,40,0.04);
}
.qc-top {
  position: relative;
  height: var(--top-h);
  display: flex;
  align-items: center;
  padding: 0 20px 0 10px;
  gap: 6px;
  max-width: 1440px;
  margin: 0 auto;
}
.qc-launcher {
  width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: transparent; color: var(--txt-2);
  display: grid; place-items: center;
}
.qc-launcher:hover, .qc-launcher.is-open {
  background: var(--brand-soft); color: var(--brand);
}
.qc-logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--txt); font-weight: 650; font-size: 15px;
  padding: 0 10px 0 4px; letter-spacing: -0.02em;
}
.qc-logo img { width: 28px; height: 28px; border-radius: 7px; object-fit: contain; background: #0B0B12; }
.qc-sep { width: 1px; height: 14px; background: var(--line); margin: 0 6px; }
.qc-tabs { display: flex; align-items: stretch; height: var(--top-h); gap: 2px; }
.qc-tabs a {
  position: relative;
  display: grid; place-items: center;
  padding: 0 14px; color: var(--txt-2); font-size: 13.5px;
}
.qc-tabs a:hover { color: var(--txt); }
.qc-tabs a.is-on { color: var(--brand); font-weight: 600; }
.qc-tabs a.is-on::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 2px; background: var(--brand); border-radius: 2px 2px 0 0;
}
.qc-search {
  margin-left: 18px;
  width: min(380px, 34vw);
  height: 34px;
  border: 1px solid transparent;
  background: #f3f5f8;
  border-radius: 17px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
  color: var(--muted);
}
.qc-search:focus-within {
  background: #fff; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,124,114,0.12);
  color: var(--txt);
}
.qc-search input { border: 0; outline: 0; background: transparent; width: 100%; }
.qc-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.qc-right a {
  height: 32px; padding: 0 10px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px; color: var(--txt-2);
}
.qc-right a:hover { background: #f3f5f8; color: var(--txt); }
.qc-balance {
  color: var(--price) !important;
  font-family: var(--num);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.qc-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  border: 0;
  margin-left: 8px;
  background: linear-gradient(145deg, #00aa72, #00a971);
  color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(0,169,113,0.25);
}
.qc-user { position: relative; }
.qc-user.is-open .qc-avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--brand); }
.qc-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70;
  width: 320px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 48px rgba(16,24,40,0.16);
  text-align: left; color: var(--txt);
}
.qc-menu header, .qc-menu section { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.qc-menu header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.qc-menu header .btn { height: 28px; padding: 0 10px; font-size: 12px; }
.qc-menu h4 { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.qc-menu section:last-child { border-bottom: 0; }
.qc-id { color: var(--muted); font-size: 12px; margin-top: 4px; }
.qc-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.qc-tools a { color: var(--brand); font-size: 13px; }
.qc-grid img, .mark {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: contain; aspect-ratio: 1 / 1;
  box-shadow: 0 4px 10px rgba(16,24,40,0.08);
  background: transparent;
}
.prod-id img, .row-list img {
  width: 32px; height: 32px; border-radius: 8px;
  object-fit: contain; aspect-ratio: 1 / 1;
}

.qc-panel {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 10px; z-index: 60;
  width: 560px; background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(16,24,40,0.16);
  padding: 8px 8px 12px;
  border: 1px solid rgba(232,234,237,0.9);
}
.qc-panel.is-open { display: block; }
.qc-panel h4 {
  font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 12px 16px 6px;
}
.qc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0 8px 8px; }
.qc-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px 12px; border-radius: 10px; color: var(--txt); font-size: 12.5px;
}
.qc-grid a:hover { background: var(--brand-soft); }

.qc-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 24px 64px; }
.hero-welcome {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 20px;
}
.hero-welcome h1 {
  font-size: 22px; font-weight: 650; letter-spacing: -0.03em;
}
.hero-welcome p { color: var(--muted); margin-top: 4px; font-size: 13px; }

.quick {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 20px;
}
.quick a {
  background: #fff; border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  color: var(--txt);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--txt); }
.quick i {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.quick b { display: block; font-size: 13.5px; }
.quick span { color: var(--muted); font-size: 12px; }

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.prod {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.prod:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.prod-cover {
  height: 118px; background: #d7dde6 center/cover no-repeat;
  position: relative;
}
.prod-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8,16,24,0.38));
}
.prod-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.prod-id { display: flex; align-items: center; gap: 10px; }
.prod-id h3 { font-size: 15px; font-weight: 650; }
.prod-id p { color: var(--muted); font-size: 12px; }
.badge {
  margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 99px;
  background: #f1f3f5; color: var(--txt-2);
}
.badge.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.prod-meta { display: flex; gap: 16px; color: var(--txt-2); font-size: 12px; }
.prod-meta b { font-family: var(--num); color: var(--txt); font-weight: 650; }
.prod-foot { margin-top: auto; display: flex; justify-content: flex-end; }

.btn {
  height: 32px; padding: 0 14px; border-radius: 6px;
  border: 1px solid #d9dee6; background: #fff; color: var(--txt);
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 4px 10px rgba(15,124,114,0.28);
}
.btn-primary:hover { background: var(--brand-hover); color: #fff; }

.card {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
}
.card-h {
  height: 48px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-weight: 650; font-size: 13.5px;
}
.card-b { padding: 16px 18px; }
.metric {
  font-family: var(--num); font-size: 26px; font-weight: 650;
  letter-spacing: -0.04em; line-height: 1.1;
}
.metric.money { color: var(--price); }
.muted { color: var(--muted); }
.row-list { list-style: none; }
.row-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid #f0f2f4; color: var(--txt-2);
}
.row-list li:last-child { border-bottom: 0; }

.banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff8e8; border: 1px solid #f3dd9a;
  color: #7a5410; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px;
}

.layout-side {
  display: grid; grid-template-columns: var(--side) 1fr;
  min-height: calc(100vh - var(--top-h));
}
.rail {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 16px 10px;
}
.rail-g { font-size: 12px; color: var(--muted); padding: 8px 12px 6px; }
.rail a {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px; border-radius: 8px; color: var(--txt-2);
}
.rail a:hover { background: #f5f8fa; color: var(--txt); }
.rail a.is-on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.main-pad { padding: 24px 28px 64px; }
.qc-h1 { font-size: 20px; font-weight: 650; letter-spacing: -0.03em; }
.qc-crumb { color: var(--muted); margin-bottom: 8px; font-size: 12px; }

.toolbar { display: flex; gap: 8px; margin: 16px 0; }
.toolbar input, .toolbar select {
  height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 12px; background: #fff; outline: none;
}
.toolbar input { width: 260px; }
.toolbar input:focus, .toolbar select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,124,114,0.12);
}

.sku-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sku {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.sku:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.sku-cover { height: 110px; background: #e8edf2 center/cover no-repeat; }
.sku-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.sku-body h3 { font-size: 15px; font-weight: 650; }
.vendor { color: var(--muted); font-size: 12px; margin: 4px 0 10px; }
.price {
  color: var(--price); font-family: var(--num);
  font-size: 22px; font-weight: 650; letter-spacing: -0.03em;
}
.price small { font-size: 12px; font-weight: 400; color: var(--muted); }
.sku-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: flex-end; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.kpi { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi b { display: block; margin-top: 6px; font-family: var(--num); font-size: 22px; font-weight: 650; }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td {
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 400;
}
table.data th { color: var(--muted); font-size: 12px; background: #fafbfc; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 99px; font-size: 11px; background: var(--brand-soft); color: var(--brand); font-weight: 600;
}
.tag.off { background: #f1f3f5; color: var(--muted); font-weight: 500; }

.side-stack { display: flex; flex-direction: column; gap: 14px; }

.phone-form {
  width: 100%; max-width: 360px;
  text-align: left; display: grid; gap: 14px;
}
.phone-form label {
  display: grid; gap: 6px;
  font-size: 13px; color: var(--txt-2); font-weight: 500;
}
.phone-form input {
  height: 40px; padding: 0 12px; border-radius: 4px;
  border: 1px solid var(--line); font-size: 14px;
}
.phone-form .submit { width: 120px; }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.6; }

@media (max-width: 980px) {
  .home-grid, .products, .sku-grid, .layout-side, .quick, .kpis { grid-template-columns: 1fr; }
  .qc-search, .qc-tabs { display: none; }
}
