:root {
  --bg: #e6e6e6;
  --ink: #222222;
  --muted: #666666;
  --line: #d9d9d9;
  --card: #ffffff;
  --accent: #9c3b2e;
  --accent-ink: #fff8f4;
  --sidebar: #3f3f3f;
  --ok: #2f6b4f;
  --warn: #8a5a12;
  --bad: #9c3b2e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.5 "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.shell { display: flex; min-height: 100vh; }
.side {
  width: 220px;
  background: var(--sidebar);
  color: #f5f5f5;
  padding: 22px 14px;
  flex: none;
}
.brand { padding: 0 10px 18px; }
.brand strong { display: block; font-size: 18px; letter-spacing: 0.08em; }
.brand span { color: #cfcfcf; font-size: 12px; }
.nav a, .nav .group {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: #f3f3f3;
  text-decoration: none;
}
.nav .group { color: #9c948b; font-size: 12px; margin-top: 12px; }
.nav a.child { padding-left: 18px; }
.nav a.active, .nav a:hover { background: #3b342f; }
.main { flex: 1; min-width: 0; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,253,249,.9);
}
.top h1 { margin: 0; font-size: 20px; font-weight: 600; }
.content { padding: 22px 28px 48px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat strong { display: block; font-size: 26px; }
.stat span { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
label.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}
textarea { width: 100%; min-height: 120px; }
.btn {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 4px 8px; font-size: 12px; }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.flash.ok { background: #e7f3ec; color: var(--ok); }
.flash.error { background: #f8e8e4; color: var(--bad); }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #eee; }
.muted { color: var(--muted); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login {
  width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.login h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: 0.06em; }
.pager { display: flex; gap: 8px; margin-top: 12px; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.sku-table input { width: 100%; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
@media (max-width: 960px) {
  .shell { display: block; }
  .side { width: auto; }
  .grid, .split { grid-template-columns: 1fr; }
}
