:root {
  --mqy-primary: #1a8f6e;
  --mqy-primary-dark: #0f3d34;
  --mqy-gold: #c9a227;
  --mqy-bg: #f4f7f6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--mqy-bg); color: #1f2d2a; }
a { text-decoration: none; color: inherit; }
.layout { display: flex; min-height: 100%; }
.sidebar {
  width: 220px; background: linear-gradient(180deg, #0f3d34 0%, #145c4b 100%);
  color: #fff; flex-shrink: 0; display: flex; flex-direction: column;
}
.logo { padding: 22px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.logo h1 { margin: 0; font-size: 18px; letter-spacing: 1px; }
.logo p { margin: 6px 0 0; font-size: 12px; color: rgba(255,255,255,.65); }
.menu { padding: 12px 0; flex: 1; }
.menu-item, .menu-sub { display: block; padding: 12px 20px; color: rgba(255,255,255,.78); font-size: 14px; }
.menu-item i { margin-right: 8px; }
.menu-item:hover, .menu-item.active { background: rgba(255,255,255,.1); color: #fff; }
.menu-item.active { border-left: 3px solid var(--mqy-gold); padding-left: 17px; }
.menu-parent { display: flex; align-items: center; cursor: pointer; }
.menu-parent .menu-arrow { margin-left: auto; margin-right: 0; font-size: 12px; opacity: .7; transition: transform .2s; }
.menu-group.open .menu-arrow { transform: rotate(180deg); }
.menu-group .menu-children { display: none; background: rgba(0,0,0,.12); }
.menu-group.open .menu-children { display: block; }
.menu-sub { padding-left: 38px; font-size: 13px; }
.menu-sub.active { padding-left: 35px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; box-shadow: 0 1px 0 #e8eeec;
}
.topbar .user { color: #4a5c57; font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-quick {
  display: inline-block; background: #1a8f6e; color: #fff !important;
  border-radius: 6px; padding: 7px 14px; font-size: 13px; font-weight: 600;
}
.top-quick:hover { background: #157a5e; }
.top-quick-gold { background: #c9a227; }
.top-quick-gold:hover { background: #b08d1f; }
.order-no-val { color: #c45656; font-weight: 700; }
.content { padding: 20px 24px 32px; }
.stock-warn-bar {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, #fff3e0, #ffecec);
  border: 1px solid #f5c6a0; border-radius: 10px;
  padding: 14px 18px; margin-bottom: 16px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(196,86,86,.08);
}
.stock-warn-bar:hover { border-color: #e89a5c; }
.stock-warn-bar > i { color: #d9822b; font-size: 24px; }
.stock-warn-text { flex: 1; min-width: 0; }
.stock-warn-text b { display: block; color: #c45656; font-size: 16px; margin-bottom: 2px; }
.stock-warn-text span { color: #7a4a2b; font-size: 13px; }
.stock-warn-go { color: #c45656; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.page-card { background: #fff; border-radius: 10px; padding: 18px 20px; box-shadow: 0 6px 18px rgba(15,61,52,.04); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 6px 18px rgba(15,61,52,.04); }
.stat-card .label { color: #7a8b86; font-size: 13px; }
.stat-card .value { font-size: 26px; font-weight: 700; margin-top: 8px; color: var(--mqy-primary-dark); }
.stat-card.warn .value { color: #d9822b; }
.stat-card.danger .value { color: #c45656; }
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f3d34 0%, #1a8f6e 50%, #c9a227 160%);
}
.login-card { width: 400px; background: #fff; border-radius: 14px; padding: 36px 32px; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.login-card h2 { margin: 0 0 6px; color: #0f3d34; }
.login-card p { margin: 0 0 18px; color: #7a8b86; font-size: 13px; }
.login-card input {
  width: 100%; height: 42px; border: 1px solid #d7e2de; border-radius: 8px;
  padding: 0 12px; margin-bottom: 14px; font-size: 14px; outline: none;
}
.login-card input:focus { border-color: #1a8f6e; }
.login-card button {
  width: 100%; height: 42px; background: #1a8f6e; color: #fff; border: 0;
  border-radius: 8px; font-size: 15px; cursor: pointer;
}
.login-card button:disabled { opacity: .7; cursor: default; }
.login-msg { color: #c45656; font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.el-button--primary { background: #1a8f6e !important; border-color: #1a8f6e !important; }
.goods-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: #eef3f1; }
.wx-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wx-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #eef3f1; flex-shrink: 0; }
.wx-avatar-ph { display: flex; align-items: center; justify-content: center; background: #1a8f6e; color: #fff; font-size: 14px; font-weight: 700; }
.wx-name { min-width: 0; line-height: 1.35; word-break: break-all; }
.wx-user .el-button--text { flex-shrink: 0; padding: 0 4px; margin-left: 2px; }
.sku-grid-head, .sku-grid-row { display: flex; gap: 6px; align-items: center; }
.sku-grid-head { margin-bottom: 6px; color: #7a8b86; font-size: 12px; }
.sku-grid-head span, .sku-grid-row .el-input { width: 110px; flex: 0 0 110px; }
.sku-grid-head span:last-child, .sku-grid-row .el-button { width: 44px; flex: 0 0 44px; }
.purchase-cate { margin-bottom: 14px; }
.purchase-cate-name { font-size: 14px; font-weight: 700; color: #1f6b4a; margin: 2px 0 8px; padding-bottom: 6px; border-bottom: 1px solid #e8f0ed; }
.purchase-goods { border: 1px solid #eef3f1; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.purchase-goods-name { font-weight: 700; margin-bottom: 6px; }
.purchase-sku { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.purchase-sku .muted, .muted { color: #7a8b86; font-size: 13px; }
.filter-bar { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.day-bars { display: flex; align-items: flex-end; height: 140px; gap: 12px; padding-top: 10px; }
.day-bar { flex: 1; text-align: center; }
.day-bar .bar { background: linear-gradient(180deg, #1a8f6e, #0f3d34); border-radius: 6px 6px 0 0; margin: 0 auto 6px; width: 28px; }
.day-bar .label { font-size: 12px; color: #7a8b86; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
