* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: #f6f7f9;
  color: #222;
  font-size: 14px;
}

header {
  background: #fff;
  padding: 14px 20px 10px;
  border-bottom: 1px solid #e6e6e6;
  position: sticky;
  top: 0;
  z-index: 5;
}

header h1 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toolbar input[type="number"] {
  width: 80px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  text-align: right;
}

.toolbar button {
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #2c7be5;
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.toolbar button:hover {
  background: #1c66c8;
}

.toolbar button.ghost {
  background: #fff;
  border-color: #c8c8c8;
  color: #555;
}

.toolbar button.ghost:hover {
  background: #f0f0f0;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  text-decoration: none;
  color: #555;
  background: #fff;
  font: inherit;
}

.btn-link:hover {
  background: #f0f0f0;
}

.muted {
  color: #888;
  font-size: 12px;
}

.mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-bottom: 2px solid #e0e3e8;
}

.mode-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-weight: 500;
  transition: color .15s, border-color .15s;
}

.mode-tab:hover { color: #2c7be5; }
.mode-tab.active {
  color: #2c7be5;
  border-bottom-color: #2c7be5;
}

.hint {
  margin-top: 8px;
  color: #555;
  font-size: 12px;
}

main {
  padding: 14px 20px 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

thead th {
  background: #f0f3f7;
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  border-bottom: 1px solid #e0e3e8;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

thead th.num,
tbody td.num,
tfoot td.num {
  text-align: right;
}

thead th:hover {
  background: #e6ebf2;
}

thead th.active-sort {
  background: #dde8fa;
  color: #2c7be5;
}

tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0;
}

tbody tr:hover {
  background: #fafbfd;
}

tbody tr.vip {
  background: #fffbe9;
}

tbody tr.vip:hover {
  background: #fff5cc;
}

tbody tr.warn td.name {
  color: #c0392b;
}

td.name {
  font-weight: 500;
}

td.strong {
  font-weight: 600;
  color: #2c7be5;
}

.col-vip {
  width: 48px;
  text-align: center;
}

.vip-tag {
  display: inline-block;
  background: #e6a700;
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.price-input {
  width: 80px;
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  text-align: right;
}

.price-input:focus {
  outline: none;
  border-color: #2c7be5;
  box-shadow: 0 0 0 2px rgba(44, 123, 229, 0.15);
}

.up { color: #1aa260; font-weight: 600; }
.down { color: #d6453d; font-weight: 600; }

tfoot td {
  padding: 8px 10px;
  background: #fafbfd;
  border-top: 1px solid #e6e6e6;
}
