/* 扫码追溯系统 - 管理后台 样式 */
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: #cbd5e1;
  font-size: 14px; cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.nav-item:hover { background: #334155; color: #fff; }
.nav-item.active {
  background: #1e293b;
  color: #fff;
  border-left-color: #3b82f6;
}
.nav-group {
  padding: 14px 20px 6px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.nav-item.nav-sub {
  padding-left: 36px;
  font-size: 13px;
  color: #94a3b8;
}
.nav-item.nav-sub:hover { color: #fff; }
.nav-item.nav-sub > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  margin-right: 4px;
  border-radius: 4px;
  background: #7b54f0;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}

/* 统计卡片 */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border-left: 4px solid #3b82f6;
}
.stat-card .label { color: #64748b; font-size: 13px; }
.stat-card .value { font-size: 28px; font-weight: 700; color: #1e293b; margin-top: 6px; }
.stat-card.green { border-left-color: #10b981; }
.stat-card.orange { border-left-color: #f59e0b; }
.stat-card.red { border-left-color: #ef4444; }
.stat-card.purple { border-left-color: #8b5cf6; }

/* 数据表 */
.data-table { width: 100%; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.data-table thead { background: #f1f5f9; }
.data-table th { padding: 12px 16px; text-align: left; font-size: 13px; color: #475569; font-weight: 600; }
.data-table td { padding: 12px 16px; font-size: 13px; color: #334155; border-top: 1px solid #e2e8f0; }
.data-table tbody tr:hover { background: #f8fafc; }

/* 表单 */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; color: #475569; margin-bottom: 6px; }
.form-field label .req { color: #ef4444; margin-right: 2px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px;
}
.form-field input:focus, .form-field select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

/* 操作按钮 */
.btn { padding: 8px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all 0.15s; border: none; }
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost { background: transparent; color: #3b82f6; border: 1px solid #3b82f6; }
.btn-ghost:hover { background: #eff6ff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Tag */
.tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-green { background: #d1fae5; color: #047857; }
.tag-orange { background: #fed7aa; color: #c2410c; }
.tag-red { background: #fee2e2; color: #b91c1c; }
.tag-gray { background: #e2e8f0; color: #475569; }

/* 工具栏 */
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.toolbar .filters { display: flex; gap: 8px; align-items: center; }
.toolbar .filters select, .toolbar .filters input {
  padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px;
}

/* Loading */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid #cbd5e1; border-top-color: #3b82f6;
  border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }